adyen-ios: [BUG] ayden-ios fails to build via carthage on Xcode 12 betas 2, 3 , 4
Describe the bug
When trying to add ayden-ios as a dependency to a project using Xcode 12 beta 3
via Carthage
, the compilation fails with the following error:
⇒ carthage bootstrap --platform ios --use-ssh
*** No Cartfile.resolved found, updating dependencies
*** Fetching adyen-ios
*** Fetching adyen-3ds2-ios
*** Checking out adyen-3ds2-ios at "2.1.0-rc.5"
*** Checking out adyen-ios at "3.6.0"
*** xcodebuild output can be found in /var/folders/83/g4z5yhjj5cl5ww7gyf3h869m0000gp/T/carthage-xcodebuild.VDLNeQ.log
*** Downloading adyen-3ds2-ios.framework binary at "2.1.0-rc.5"
*** Building scheme "Adyen" in Adyen.xcodeproj
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -project /Users/einternicola/Code/watches/CarthageAydenExample/Carthage/Checkouts/adyen-ios/Adyen.xcodeproj -scheme Adyen -configuration Release -derivedDataPath /Users/einternicola/Library/Caches/org.carthage.CarthageKit/DerivedData/12.0_12A8169g/adyen-ios/3.6.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/83/g4z5yhjj5cl5ww7gyf3h869m0000gp/T/adyen-ios SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /Users/einternicola/Code/watches/CarthageAydenExample/Carthage/Checkouts/adyen-ios)
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/83/g4z5yhjj5cl5ww7gyf3h869m0000gp/T/carthage-xcodebuild.VDLNeQ.log
To Reproduce Steps to reproduce the behavior:
- Download and install Xcode12 beta 3
- Use xcode select to set this as your xcode:
xcode-select --switch /Applications/Xcode-beta.app
- Create a new Xcode project
- Create a Cartfile with the following contents:
github "Adyen/adyen-ios" == 3.6.0
- Execute the following command:
carthage bootstrap --platform ios --use-ssh
- Observe the failure (similar to what I noted above)
Expected behavior I expect Carthage to build ayden-ios successfully.
Screenshots
Smartphone (please complete the following information):
- Device: MacBook Pro (16-inch, 2019)
- OS: macOS Catalina 10.15.5 (19F101)
- Xcode: 12.0 beta 3 (12A8169g)
- SDK Version 3.6.0
Additional context N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 28 (7 by maintainers)
I have just tried building again using the Xcode 12 GM (Version 12.0 (12A7208)) and it still failing. It provides even less information in the log though:
Cartfile contents:
Command:
carthage update --platform ios
Result:
Log (excerpt):
@descorp here is a Cocoapods thread on the podspec workaround to exclude arm64: https://github.com/CocoaPods/CocoaPods/issues/10065
Adyen will need to add this to both Adyen3DS2 and Adyen podspecs, since Adyen depends on Adyen3DS2. But as noted in that thread and the Intercom example posted above, this is a temporary workaround. As soon as people start using Apple Silicon Macs for development, this is going to cause big problems. Migrating to XCFramework or fixing the binary is the real solution.
The issue I am facing is that I develop a private Cocoapod for my employer, and our pod depends on Adyen. We are unable to publish our pod to our private Cocoapods spec repo because
pod spec lint
fails due to this architecture issue. The workaround we have found is to privately host a copy of the Adyen and Adyen3DS2 podspecs with the workaround added:and we have to add this workaround to our private podspec as well.
@juanuribeo13, I’ve discovered recently that if you set
ONLY_ACTIVE_ARCH
parameter toYES
in your target and pods then it compiles and archives without this error.You can add this to your Podfile and see if it helps:
@descorp Hi, am having issue in running Unit tests while having “Ayden” pod, issue am facing is this? Build is successful but when unit tests starts running, it got failed.
Hey @descorp
I think that the issue with Cocoapods could be fixed by excluding
arm64
for simulator builds in.podspec
file.It was done with Intercom as you can see here: https://github.com/intercom/intercom-ios/pull/385
Not all heroes wears capes! 🦸♂️ Thanks a lot @intere
From what I can see - this is a temporary (I hope so) issue, that should be fixed with stable\next Xcode build. Issue caused by using armv7 functionality on new arm64 architectures (looks like the
String
is a man suspect)It could be fixed in two ways:
Unfortunately, we can’t promise to fix it on our end quick enough( not before it is done by Cartages, at least 😄 ) I’ll keep my eye on Cartage.
This might also be of some help: https://developer.apple.com/forums/thread/649918
In doing some more research, this might not be an Adyen specific issue: https://github.com/Carthage/Carthage/issues/3019
Full log file: carthage-xcodebuild.VDLNeQ.log
Hi @intere
Thanks for the feedback! Could you also print out
xcodebuild
log?