react-native-jsi-template
react-native-jsi-template copied to clipboard
Solution to library not automatically being included in iOS Podfile
Hi Ammar!
Thanks for the great work you have done here!
While following your directions on your blog, I had an issue where the library pod was not automatically discovered when I created the new example project within the library directory. I figured out it was because this line was missing in example/ios/podfile
:
pod 'react-native-jsi-template', :path => '../..'
I inserted it, ran pod install
and everything is now discovered as it should. I don't know why it did not automatically add it, as it says in the blog it should. But you could maybe add this as a heads up for people that do not see their library show up in Xcode when they open their project. Just a suggestion, as it took a little bit of time for me to troubleshoot what was wrong :)
Greetings!
I think it happened because I renamed the project and the Podfile.lock has the library with the old name so it couldn't find it.
I followed your blog with my own library from stratch, so I have not cloned this library. It was just a thing that I thought could help others having the same issue as me :)
also just faced this issue would be good to update blog and podfile!
@mfbx9da4 Reading this again, I have realized that the directions on the blog are correct. The difference is that you have to add your library via npm install ../react-native-jsi-yourlibrary
first in your app project. Then pod will automatically detect your library and add it accordingly.
Do you mention that step in the blog though?
Shouldn't you say
Now add "react-native-jsi-yourlibrary": ".." to example/package.json
@mfbx9da4 Delete the example and init a new example app because it used older version of RN at the time of writing.
I will update the blog soon. There are some other changes that need to be mentioned too.