Our CI build has a linker failure because of an incorrect dependency declaration in the podspec for this module:
❌ Undefined symbols for architecture x86_64
Symbol: _OBJCMETACLASS$_RCTViewManager
Referenced from: _OBJCMETACLASS$_RNKMPreviousNextViewManager in RNKMPreviousNextViewManager.o
How did you link to the library (autolinking, manual, rn link, cocoapods)?
auto-linking
What version of React Native?
0.63.4
What version of the library?
6.5.4-1
iOS version?
14.x (at least)
Did the problem happen after updating React Native?
No
Are you using the library for the first time?
No
It's a bug? Provide a link to a minimal reproduction case.
This is a build order issue, so not guaranteed 100% reproducible. It's generally only a problem for clean builds, and I've only seen it on projects that have use_frameworks! since Xcode 12. Apparently it was never correct to depend on "React" the target, and the correct dependency is "React-Core" the framework (and any others you use outside React-Core). Before Xcode 12, Xcode didn't seem to be fussy about this. Most native modules have now switched, although we still have a couple of package patches in our project. Just added this one and got the familiar error and found the incorrect dependency.
Our CI build has a linker failure because of an incorrect dependency declaration in the podspec for this module:
❌ Undefined symbols for architecture x86_64
This is a build order issue, so not guaranteed 100% reproducible. It's generally only a problem for clean builds, and I've only seen it on projects that have use_frameworks! since Xcode 12. Apparently it was never correct to depend on "React" the target, and the correct dependency is "React-Core" the framework (and any others you use outside React-Core). Before Xcode 12, Xcode didn't seem to be fussy about this. Most native modules have now switched, although we still have a couple of package patches in our project. Just added this one and got the familiar error and found the incorrect dependency.
Adding a PR which solves this for our CI build.