Search code examples
iosiphoneios8cocoapodsios9.3

Unable to build for iOS 8 after iOS 9.3 update?


I've been working on an iPhone app for a long time and have always targeted iOS 8.1 as the deployment target, and tested on an iOS 8.1 device and an iOS 9 device.

After the iOS 9.3 update, the app builds ok on the iOS 9 device, but I get linker errors when building for iOS 8:

"_OBJC_METACLASS_$_AFHTTPRequestOperationManager", referenced from:
  _OBJC_METACLASS_$_GroupMeAPIClient in GroupMeAPIClient.o
  ...
"_OBJC_CLASS_$_AWSS3PutObjectRequest", referenced from:
      objc-class-ref in AmazonAPIClient.o
"_OBJC_CLASS_$_BranchUniversalObject", referenced from:
      objc-class-ref in PhotoVC.o
      ....
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I know it has something to do with Pods because every symbol in the error log is a class coming from a Pod, however I can't find any info on this particular problem.

Is there a way to get the Podfile working for both iOS 8.1 and iOS 9.3? Here is my podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.1'
target ‘xxx’ do
    pod 'AFNetworking', '~> 2.5'
    pod 'SDWebImage'
    pod 'AWSiOSSDKv2', '~> 2.0'
    pod 'SSKeychain'
    pod 'Fabric'
    pod 'Crashlytics'
    pod 'Branch'
end

Solution

  • This question appears to describe a similar problem. Did OTHER_LDFLAGS get overridden for you too?

    In any case, running pod install --verbose is likely to give you some diagnostically useful information you could add here. Cleaning out Derived Data and removing the /Pods folder to have everything remade from scratch is probably a good idea as well.