douglasjunior / react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
https://www.npmjs.com/package/react-native-keyboard-manager
MIT License
934 stars 60 forks source link

Undefined symbol (linker) error for clean builds with use_frameworks! #76

Closed markwilcox closed 3 years ago

markwilcox commented 3 years ago

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

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.