skip to Main Content

When building a React Native 0.66 project today (used to be working), there is error complaining about library not found for a module which is located at my-proj/node_modules/aliyun-oss-react-native/. After react-native link alien-oss-react-native and pod install, the error remains. Some post suggests adding search path on my-proj->Building Setting->Linking or Search Paths. There are quite a few files under my-proj/node_modules/aliyun-oss-react-native/iOS/, 2 questions here: 1. which path shall be added to Xcode (such as my-proj/node_modules/aliyun-oss-react-native/iOS/)? 2. Shall the path be added to both Linking and Search Paths in Xcode?

Here is the screen shot of Search Paths in Xcode:

enter image description here

Under TARGETS, myproj->Build Settins, Other Linker Flags, the module lib which causes error is listed as first one. My guess is that all libs under the Other Linker Flags may not be recognized by Xcode. Not sure how this happens.

enter image description here

3

Answers


  1. Chosen as BEST ANSWER

    The solution works here is open the myapp.xcworkspace in Xcode instead of myapp.xcodeproj. The build upon workspace went through without any error.


  2. Try to make search paths "recursive".

    Login or Signup to reply.
  3. The "library not found" errors occur most of the time because installing the react-native node package and running pod install is often not enough.
    The error might go away after running a clean build in xcode using the xcworkspace file. After that running "npm run ios" or "npm start" in your termal should work again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search