react-native ios Podfile issue with “use_native_modules!”

前端 未结 18 2076
一生所求
一生所求 2020-12-05 17:15

In my react-native project (react-native@0.60) in the ios/ dir I run pod install and get this error:

[!] Invalid `Podfile` file: no implicit con         


        
18条回答
  •  心在旅途
    2020-12-05 17:49

    The issue is that:

    use_native_modules!
    

    is unsupported by earlier versions of CocoaPods. For example, our install was the app downloaded from the CocaoPods website. That version is 1.5.2.

    Run:

    pod --version
    

    to check which version. If need be, uninstall and then re-install but in Terminal by running:

    sudo gem install cocoapods
    

    At least as of late October 2019, the current gem version available is 1.8.4. Once successfully installed, re-attempt the pod install and hopefully all is well.

提交回复
热议问题