Closed devonhuangcodes closed 5 years ago
Also experiencing the same issue, any fix or workaround?
Did you run react-native link
prior?
Yup I have already tried that
If it works via xcode and not through cli, it might mean that you're running an old version of the app in simulator without the native code built. I would double check that the right app is being launched when you start the app via cli.
I'm not too sure what I did or what happened. It might've been resolved when I did a clean build to fix a previous issue. I just tried running it using the cli just now and it started working. Closing this issue. Thanks for your insights Paul
Right click to Libraries in xcode, chose add newnew file to "your project", find in node_module , open react-native-orientaion-locker , chose RCTOrientationation.xcodeproj, Go to Build Phases, in Link BinariesBinary with Libraries, add libRCTOrientation.a. enjoy
Right click to Libraries in xcode, chose add newnew file to "your project", find in node_module , open react-native-orientaion-locker , chose RCTOrientationation.xcodeproj, Go to Build Phases, in Link BinariesBinary with Libraries, add libRCTOrientation.a. enjoy
Just to clarify:
${ROOT}/node_nodules/react-native-orientation-locker/iOS/RCTOrientation.xcodeproj
to XCode -> ${YOUR_PROJECT_NAME}/Libraries
${YOUR_PROJECT_NAME}, open
Build Phases - Link Binary With Libraries`Products/libRCTOrientation.a
, and drag-drop it to the list of Binaries from the step 2.
I manually linked this library and it works perfectly on Android. On iOS, it also works fine when I run the app through xcode. However, when I try to run the app through react-native-cli using the command react-native run-ios, I get the following error: