Undefined symbols for architecture armv7: cocoaPods iPhone 5

前端 未结 3 578
轮回少年
轮回少年 2021-01-11 22:26

I\'m getting this error, only when I try to build and run on an iPhone 5. It works fine on an iPhone 6 or greater. These are all cocoaPods generating the error. I\'ve ran p

相关标签:
3条回答
  • 2021-01-11 22:49

    This works great in most cases :

    1. Make sure your Project targets have $(inherited) present in the Other Linker Flags in Build Settings.
    2. If the above hasn't solved it already, Close Xcode.
    3. Open Finder, and select Go in Menu bar and then Go to folder
    4. Paste the following - ~/Library/Developer/Xcode
    5. Find the (devil) folder named DerivedData
    6. Delete it, that is move to trash (Optional : Clean the trash)
    7. Open your Workspace in Xcode now (Optional : Clean your project)
    8. Build your project... thank me later.

    If this doesnt work, create a new question and post your logs of pod install there. Something is going wrong in installation itself. Make sure you are using a stable latest version of Cocoapod.

    0 讨论(0)
  • 2021-01-11 22:51

    None of the answers above helped me. It turns out using frameworks for my pods instead of static libraries fixed it. Adding use_frameworks! to Podfile fixed it:

    platform :ios, '9.3'
    use_frameworks!
    
    ...rest of podfile
    
    0 讨论(0)
  • 2021-01-11 22:52

    In Xcode, hold the option key and select Product / Clean Build Folder. Then rebuild. I've had this exact problem and this "deep clean" resolves it for me.

    Also, ensure that for your Pods project that the build setting for Build Active Architecture Only is set to NO.

    0 讨论(0)
提交回复
热议问题