-
Notifications
You must be signed in to change notification settings - Fork 312
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
Exclude arm64 simulator from CocoaPods-managed targets in Xcode 12 #2667
Conversation
A more reliable and faster way to install Carthage seems to be directly from the binaries hosted on GitHub
it's ~1 minute faster and I have not yet seen flaky results. |
The Xcode 11 CocoaPods integration tests are really unhappy with these changes. There are scores of these errors:
along with several warnings along these lines:
Next step is to determine whether the errors are specific to this integration test or whether they would also appear in application projects built in Xcode 11. |
87a3673
to
939bf68
Compare
@frederoni found a workaround that should hopefully work in Xcode 11.x, so we won’t need to drop Xcode 11.4–11.6 support just yet. I’m inclined to keep all the changes around test fixtures out of scope for this release-blocking issue, but we will need to hook up the UI tests to Xcode 12 and iOS 14 soon. |
Xcode 12 with CocoaPods, clean build for iPhone 8 simulator in Release configuration:
|
I'm seeing a linker error building Apex I believe this is the same issue that is reported in #2665 |
de70e46
to
bd75555
Compare
bd7555501f5eddc749e3ac7c5bbdd471b5e29449 seems to have done the trick in both Xcode 11 and Xcode 12 for all supported build configurations. |
For the earlier tests, the test project was including both podspecs explicitly rather than going through CocoaPods trunk – the roundabout workflow we use for prereleases. The CocoaPods installation tests on CI use the same workflow. The good news is that I was able to push the test MapboxCoreNavigation podspec to CocoaPods trunk: CocoaPods/Specs@9f68b48.
Unfortunately, the test MapboxNavigation podspec failed validation:
But the build setting values don’t differ between the two podspecs, at least not literally. Perhaps the resolved value differs somehow. I wonder if we can leave out the |
MapboxNavigation.podspec
Outdated
s.user_target_xcconfig = { | ||
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '$(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))', | ||
'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200' => 'arm64 arm64e armv7 armv7s armv6 armv8' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove this bit, then I’m able to push to CocoaPods trunk: CocoaPods/Specs@f966ab4.
$ pod trunk push test-1ec5-MapboxNavigation.podspec --allow-warnings
Updating spec repo `trunk`
Validating podspec
-> test-1ec5-MapboxNavigation (1.0.0+2)
- WARN | source: The version should be included in the Git tag.
- NOTE | xcodebuild: note: Using new build system
- NOTE | xcodebuild: note: Building targets in parallel
- NOTE | xcodebuild: note: Using codesigning identity override: -
- NOTE | [iOS] xcodebuild: note: Planning build
- NOTE | [iOS] xcodebuild: note: Constructing build description
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Polyline' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'MapboxMobileEvents' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')
- NOTE | xcodebuild: note: detected encoding of input file as Unicode (UTF-8) (in target 'test-1ec5-MapboxNavigation' from project 'Pods')
- NOTE | [iOS] xcodebuild: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Solar' from project 'Pods')
Updating spec repo `trunk`
--------------------------------------------------------------------------------
🎉 Congrats
🚀 test-1ec5-MapboxNavigation (1.0.0+2) successfully published
📅 September 30th, 21:54
🌎 https://cocoapods.org/pods/test-1ec5-MapboxNavigation
👍 Tell your friends!
--------------------------------------------------------------------------------
This workaround automatically modifies the We’ve also found that the workaround does not work in CocoaPods 1.10.0.beta.2 due to CocoaPods/CocoaPods#10026. Upgrading to CocoaPods 1.10.rc.1 fixes that issue. |
702ee99
to
c8fbff2
Compare
c8fbff2
to
b3dc679
Compare
Temporarily modified the podspecs to exclude the arm64 simulator from the CocoaPods-generated target and application target, based on the workaround in CocoaPods/CocoaPods#10065 (comment) CocoaPods/CocoaPods#10104 (comment) but conditionalized for Xcode 12, just like the Carthage workaround in #2649. Unlike that workaround, this one isn’t sensitive to patch releases of Xcode, so we don’t need the extra case for Xcode 12.0.1 seen in #2663.
Unfortunately, this workaround automatically modifies the
EXCLUDED_ARCHS[sdk=iphonesimulator*]
andEXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200
build settings of the application target, which could eventually be incompatible with another pod if that other pod employs the same workaround. #2672 tracks removing this workaround.This workaround apparently requires Xcode 11.7 and above to build from source, so I’ve also made that a minimum requirement for both CocoaPods and Carthage users for consistency.Before merging:
Fixes #2665.
/ref #2652
/cc @mapbox/navigation-ios