Why linker link static libraries with errors? iOS

后端 未结 17 1364
自闭症患者
自闭症患者 2020-11-27 14:39

I have a problem with linking my mixed language framework to a project.

1) I create a framework with Swift and Objective-C classes.

2) The main logic was stored in the

17条回答
  •  星月不相逢
    2020-11-27 15:12

    What solved it for me when trying to integrate Lottie in my React Native project was to uninstall the lottie-ios and lottie-react-native modules with npm.

    npm uninstall lottie-react-native lottie-ios
    

    Make sure the files are unlinked as well

    npx react-native unlink lottie-react-native lottie-ios
    

    I also had the bridging-file in my project from previously trying that method without success so in order to replicate my process, follow the suggested answer and add that file to your project as well.

    After these steps, I went ahead and deleted my Pods folder, cleaned my build from xcproject and xcworkspace (maybe one of these is enough). After that I went ahead and installed the modules again

    npm i --save lottie-react-native lottie-ios@3.1.3
    

    (Make sure to check the current docks over at the lottie repo for the up-to-date versions.)

    After you have reinstalled the modules, cd into your ios folder and run pod install.

    Open up your xcworkspace in Xcode and run your project (make sure your build is clean).

    This solved my issue.

    Best of luck.

提交回复
热议问题