Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build with Giphy on Xcode 12 #96

Closed
drewolbrich opened this issue Sep 15, 2020 · 35 comments
Closed

Unable to build with Giphy on Xcode 12 #96

drewolbrich opened this issue Sep 15, 2020 · 35 comments

Comments

@drewolbrich
Copy link

drewolbrich commented Sep 15, 2020

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?

@cgmaier
Copy link
Contributor

cgmaier commented Sep 15, 2020

hey @drewolbrich going to download the GM. in the meantime, can you share your Podfile?

@drewolbrich
Copy link
Author

Hi @cgmaier thank you for responding.

I had the same issue with the previous version of Xcode 12 beta, but I did not have time to investigate it then. The issue is not unique to the GM.

Our Podfile is here: http://traipse.com/giphy/Podfile.txt
(please don't judge 😄 )

The Giphy reference is down near the bottom.

If I remove the pod 'Giphy' line from the Podfile and remove all references to Giphy in our source code, then the app builds correctly as expected. Although, it now occurs to me that when I did that earlier today, I believe I also had to manually remove references to Giphy and the frameworks that Giphy references.

Let me know if there is anything else you need or would like me to try.

@tmspzz
Copy link

tmspzz commented Sep 16, 2020

This happens if the deployment target is >= 13.4

@kaandedeoglu
Copy link

GiphyXcode12Error.zip

Here's minimal sample project reproducing the issue.

@drewolbrich
Copy link
Author

This happens if the deployment target is >= 13.4

GiphyXcode12Error.zip

Here's minimal sample project reproducing the issue.

Thank you.

@drewolbrich
Copy link
Author

This happens if the deployment target is >= 13.4

fwiw my project's deployment target is 12.1.

@tmspzz
Copy link

tmspzz commented Sep 16, 2020

It seems that this doesn't happen from source, but if one of the dependencies is delivered as a binary.

E.g. https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/1.3.0/GiphySDK.zip

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

can you guys try this? compiled with Xcode 12 compiler:

pod 'Giphy', :podspec => 'https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec'

@drewolbrich
Copy link
Author

can you guys try this? compiled with Xcode 12 compiler:

pod 'Giphy', :podspec => 'https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec'

@cgmaier I am in the middle of juggling something else, maybe for 1/2 hour, but I will try that immediately after I'm done.

@kaandedeoglu
Copy link

@cgmaier This didn't work for us. We also had to run it through a modified local podspec since PINCache 3.1.0 doesn't exist on trunk yet.

@tmspzz
Copy link

tmspzz commented Sep 16, 2020

We also tried manually integrating the previous version & using carthage. Both seems to work. This might be a Cocoapods issue.

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

ok gotcha. not sure what happened with PINCache 3.1.0 - as that version is causing issues for people, I may revert to a prior version and specify limitations in the Podspec. thanks for your patience!

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

thanks guys - I just updated the podspec here:

pod 'Giphy', :podspec => 'https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec'

be sure to run this first!

rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update

@drewolbrich
Copy link
Author

@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?

@tmspzz
Copy link

tmspzz commented Sep 16, 2020

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

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

Screen Shot 2020-09-16 at 12 02 28 PM

it works with 13.3 target deployment info - but when I bump up to 13.4 I get compile error, though different than those noted above.

seems similar to this issue, if not the same one:
#77

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

hey all - have an update! believe some aspect of these issues has to do with the extra architectures included in build process to support simulators for apple silicon Macs.

some discussion here:
Carthage/Carthage#3019

this works for me now for deployment targets below & above 13.4

rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update Giphy

@kaandedeoglu
Copy link

@cgmaier The instructions above did fix the issue here, amazing, and thanks for the quick investigation ⭐ 🥂 Can we expect you to make this into an official Podspec soon?

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

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

@tmspzz
Copy link

tmspzz commented Sep 16, 2020

@cgmaier can you elaborate on how the issue is connected to the extra simulator arch for Apple Silicon Macs?

@drewolbrich
Copy link
Author

@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
Copy link
Author

@cgmaier Also, thank you !!! 😄

@cgmaier
Copy link
Contributor

cgmaier commented Sep 16, 2020

hey @tmspzz I pasted the wrong link following some discussion here: - should have pasted Carthage/Carthage#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 #49

@drewolbrich
Copy link
Author

drewolbrich commented Sep 16, 2020

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

@SwiftfulThinking
Copy link

SwiftfulThinking commented Sep 18, 2020

We have a bunch of other Pods in our Podfile and when after running the recommended commands above, we end up with a bunch of new errors ("duplicate architecture symbols", among others). If we uninstall all Pods and then reinstall all Pods, it removes all of our new errors, but the original error from this chain still persists. Please let us know when the official updated release is available for the Giphy pod!

In the meantime, we were able to temporarily get around the issue with the following:

Screen Shot 2020-09-18 at 2 10 29 PM

@drewolbrich
Copy link
Author

@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
Copy link
Contributor

cgmaier commented Sep 28, 2020

hey all, I've finally pushed an official release here https://github.com/Giphy/giphy-ios-sdk-ui-example/releases/tag/v2.0.3

@cgmaier
Copy link
Contributor

cgmaier commented Sep 28, 2020

@drewolbrich I am seeing another workaround here: Carthage/Carthage#3019 (comment)

@cgmaier cgmaier closed this as completed Sep 28, 2020
@KrisConrad
Copy link

@cgmaier when using the official v2.0.3 sdk my app crashes now after presenting the GiphyViewController. It looks like the crash is happening somewhere in PINCache.

When using the podspec linked in previous comments the crash does not happen. It looks like that pod spec is installing PINCache 2.3 where the official one installs v2.0.

@drewolbrich
Copy link
Author

@cgmaier

@drewolbrich I am seeing another workaround here: Carthage/Carthage#3019 (comment)

Thank you, this worked beautifully.

@cgmaier
Copy link
Contributor

cgmaier commented Oct 6, 2020

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

@KrisConrad
Copy link

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

Awesome, thanks!

@sourceSoftTauseef
Copy link

@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.

Hello cgmaier this command is not working in my mac

@sourceSoftTauseef
Copy link

its giving the issue like this
Failed to fetch podspec for Giphy at https://s3.amazonaws.com/sdk.mobile.giphy.com/SDK/2.0.3-Xcode-12/Giphy.podspec.
Error: 403 Forbidden

djrluna pushed a commit that referenced this issue Apr 21, 2021
update docs with new core sdk download link
@aemre
Copy link

aemre commented Aug 25, 2023

any update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants