react-native-jsi-template icon indicating copy to clipboard operation
react-native-jsi-template copied to clipboard

Solution to library not automatically being included in iOS Podfile

Open nohns opened this issue 3 years ago • 7 comments

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!

nohns avatar Oct 24 '21 20:10 nohns

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.

ammarahm-ed avatar Oct 25 '21 02:10 ammarahm-ed

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 :)

nohns avatar Oct 26 '21 06:10 nohns

also just faced this issue would be good to update blog and podfile!

mfbx9da4 avatar Jan 21 '22 11:01 mfbx9da4

@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.

ammarahm-ed avatar Jan 21 '22 20:01 ammarahm-ed

Do you mention that step in the blog though?

image

Shouldn't you say

Now add "react-native-jsi-yourlibrary": ".." to example/package.json

mfbx9da4 avatar Jan 26 '22 11:01 mfbx9da4

@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.

ammarahm-ed avatar Jan 26 '22 15:01 ammarahm-ed

Screen Shot 2023-07-19 at 5 00 18 PM I could not config CMakeList point to jni.h

chanphiromsok avatar Jul 19 '23 10:07 chanphiromsok