10

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 pod install, pod update, wiped out the pods and started over, nothing:

enter image description here

I've tried all the answers from here: Undefined symbols for architecture armv7 for Cocoapods libraries with no luck. Here is the verbose output from pod install

Analyzing dependencies

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods-Celeo`: (``)

Finding Podfile changes
  - Braintree
  - ConciseKit
  - EDStarRating
  - Google
  - IDMPhotoBrowser
  - KAProgressLabel
  - MBProgressHUD
  - MagicalRecord
  - SFHFKeychainUtils
  - TwilioConversationsClient
  - TwilioSDK

Resolving dependencies of `Podfile`

Comparing resolved specification to the sandbox manifest
  - Braintree
  - ConciseKit
  - DACircularProgress
  - EDStarRating
  - FirebaseAnalytics
  - FirebaseInstanceID
  - Google
  - GoogleAnalytics
  - GoogleInterchangeUtilities
  - GoogleSymbolUtilities
  - GoogleUtilities
  - IDMPhotoBrowser
  - KAProgressLabel
  - MBProgressHUD
  - MagicalRecord
  - SDWebImage
  - SFHFKeychainUtils
  - TwilioCommon
  - TwilioConversationsClient
  - TwilioSDK
  - pop

Downloading dependencies

-> Using Braintree (4.3.1)

-> Using ConciseKit (0.1.2)

-> Using DACircularProgress (2.3.1)

-> Using EDStarRating (1.1)

-> Using FirebaseAnalytics (3.2.0)

-> Using FirebaseInstanceID (1.0.6)

-> Using Google (3.0.3)

-> Using GoogleAnalytics (3.14.0)

-> Using GoogleInterchangeUtilities (1.2.1)

-> Using GoogleSymbolUtilities (1.1.1)

-> Using GoogleUtilities (1.3.1)

-> Using IDMPhotoBrowser (1.8.4)

-> Using KAProgressLabel (3.2)

-> Using MBProgressHUD (0.9.2)

-> Using MagicalRecord (2.3.2)

-> Using SDWebImage (3.7.6)

-> Using SFHFKeychainUtils (0.0.1)

-> Using TwilioCommon (0.2.2)

-> Using TwilioConversationsClient (0.24.1)

-> Using TwilioSDK (1.2.10)

-> Using pop (1.0.9)
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding frameworks to Pods project
  - Adding libraries to Pods project
  - Adding resources to Pods project
  - Linking headers
  - Installing targets
    - Installing target `Braintree` iOS 7.0
    - Installing target `ConciseKit` iOS 4.3
    - Installing target `DACircularProgress` iOS 5.0
    - Installing target `EDStarRating` iOS 4.3
    - Installing target `IDMPhotoBrowser` iOS 7.0
    - Installing target `KAProgressLabel` iOS 4.3
    - Installing target `MBProgressHUD` iOS 4.3
    - Installing target `MagicalRecord` iOS 6.1
    - Installing target `SDWebImage` iOS 5.0
    - Installing target `SFHFKeychainUtils` iOS 4.3
    - Installing target `pop` iOS 6.0
    - Installing target `Pods-Celeo` iOS 9.0
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
    - Generating deterministic UUIDs
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`

Integrating client project

Integrating target `Pods-Celeo` (`Celeo.xcodeproj` project)
  - Running post install hooks
    - cocoapods-stats from
    `/Library/Ruby/Gems/2.0.0/gems/cocoapods-stats-1.0.0/lib/cocoapods_plugin.rb`

Sending stats
      - Braintree, 4.3.1
      - ConciseKit, 0.1.2
      - DACircularProgress, 2.3.1
      - EDStarRating, 1.1
      - FirebaseAnalytics, 3.2.0
      - FirebaseInstanceID, 1.0.6
      - Google, 3.0.3
      - GoogleAnalytics, 3.14.0
      - GoogleInterchangeUtilities, 1.2.1
      - GoogleSymbolUtilities, 1.1.1
      - GoogleUtilities, 1.3.1
      - IDMPhotoBrowser, 1.8.4
      - KAProgressLabel, 3.2
      - MBProgressHUD, 0.9.2
      - MagicalRecord, 2.3.2
      - SDWebImage, 3.7.6
      - SFHFKeychainUtils, 0.0.1
      - TwilioSDK, 1.2.10
      - pop, 1.0.9
  Pod installation complete! There are 11 dependencies from the Podfile and 21
  total pods installed.
Community
  • 1
  • 1
Travis Beck
  • 1,128
  • 9
  • 21

3 Answers3

32

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.

TomSwift
  • 39,369
  • 12
  • 121
  • 149
  • I don't really know if that would have worked or not, because I had no option but to revert to cocoapods 0.39 and rebuild from scratch due to deadlines. But I'll go ahead and reward you with the answer. – Travis Beck Jun 14 '16 at 00:37
  • 2
    It works for me! The issue happend during the migration from 0.39.0 to 1.0.1.. thanks! – Palleraccio Jul 19 '16 at 09:58
  • 1
    This didn't work for me. Like Travis, I had to revert back to 0.39.0 then install pod again. The pod libraries were working for my arm64 devices, but when I tried to run on my armv7 (iPad mini) the architectures just weren't getting built. So this was definitely an issue with the newer version of cocoapods. – Jason Shehane Oct 28 '16 at 16:10
  • @JasonShehane Refer my answer below. – Mayur Deshmukh Jan 12 '17 at 10:24
  • Thanks... Exactly this did the trick.... Something to do with cocoapod version i guess.... – iSaalis Feb 17 '17 at 10:50
  • Clean Build Folder saves my day. Wasted 6hrs for this error. Thanks man. – jayellos Feb 22 '17 at 02:26
  • @Mayr, thanks for the response! But for my particular case using frameworks instead of static libraries fixed it for me. See below for my answer. – Jason Shehane Dec 07 '17 at 20:04
8

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.

Mayur Deshmukh
  • 1,169
  • 10
  • 25
1

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
Jason Shehane
  • 413
  • 4
  • 6