giphy-ios-sdk: Unable to build with Giphy on Xcode 12

Using Xcode 12 GM, I’m unable to build against GiphyUISDK. I get the following errors:

/Users/drew/Repos/Grizzy/Pods/Giphy/GiphySDK/GiphyUISDK.framework/
Modules/GiphyUISDK.swiftmodule/arm64-apple-ios.swiftinterface:5:8: 
Compiling for iOS 10.0, but module 'DeepDiff' has a minimum deployment 
target of iOS 12.0: /Users/drew/Library/Developer/Xcode/DerivedData/
Trash-bxabdlnwfmgvwsdglfuqpydusfbm/Build/Products/Development
-iphoneos/DeepDiff/DeepDiff.framework/Modules/DeepDiff.swiftmodule/
arm64-apple-ios.swiftmodule

/Users/drew/Repos/Grizzy/Trash/Clips/ClipsViewController.swift:11:8: 
Failed to build module 'GiphyUISDK' from its module interface; the 
compiler that produced it, 'Apple Swift version 5.1 (swiftlang-
1100.0.270.13 clang-1100.0.33.7)', may have used features that 
aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang
-1200.0.29.2 clang-1200.0.30.1)'

I’m confused about the “Compiling for iOS 10” part, because everywhere in my project I’m explicitly specifying 12.1 as the deployment target.

I tried updating my Podfile post_install handler to explicitly set IPHONEOS_DEPLOYMENT_TARGET, but no dice.

Is there any obvious solution to this I’m overlooking?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 35 (11 by maintainers)

Commits related to this issue

Most upvoted comments

very much appreciate the speedy confirm. yes I will push an official release shortly

hey @KrisConrad my apologies for the late reply. this is now fixed in 2.0.4.

@cgmaier I have been using https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec for the last week and it’s working great, thank you.

However, I just discovered that in the simulator, it only appears to work for debug builds.

Non-debug builds fail with this error:

Screen Shot 2020-09-23 at 11 09 16 AM

I see this error when building for the simulator for iOS 12, 13, and 14.

I tried deleting DerivedData and deleting the Cocopods cache and Pods directories and running pod update giphy and the issue persisted.

Non-debug builds do work fine on the device, so that is a workaround for the short term.

@cgmaier If you don’t mind, please post here when the next official release is available.

hey @tmspzz I pasted the wrong link following some discussion here: - should have pasted https://github.com/Carthage/Carthage/issues/3019

my high level understanding of the issue is that Xcode 12s command line build process produces duplicate architectures in order to support simulators on the new Apple Silicon macs (arm) which create conflicts. I believe the solution provided in the above thread is to exclude those Apple Silicon simulator architectures.

this whole ordeal reaffirms the value of SPM / .xcframework support https://github.com/Giphy/giphy-ios-sdk-ui-example/issues/49

@cgmaier Also, thank you !!! 😄

@cgmaier This is working for me now using the podspec on AWS.

I had to take Xcode outside and have a stern conversation with it, but ultimately it came around.

@drewolbrich I don’t think it’s picking up the correct binary. Are you sure you’re not including, say 1.3.0 ?

@cgmaier I tried adding Giphy via https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec as you posted above and clearing my CocoaPods cache and Pods directory, and running pod update Giphy, and I still see the same errors: (btw I’d rather not run a full pod update because that would update all the other pods we’re including)

Screen Shot 2020-09-16 at 11 35 35 AM

Screen Shot 2020-09-16 at 11 35 24 AM

What version of Xcode are you using to build GiphyUISDK?

GiphyXcode12Error.zip

Here’s minimal sample project reproducing the issue.