Linker errors when building with Xcode 12 and CocoaPods — building for iOS Simulator, but linking in dylib built for iOS #2665
Labels
build
Issues related to builds and dependency management.
release blocker
Needs to be resolved before the release.
Milestone
Xcode 12 raises linker errors about architectures when building the navigation SDK using CocoaPods. These warnings also cause CocoaPods to reject any attempt to push the MapboxCoreNavigation or MapboxNavigation pod to CocoaPods trunk.
Problem details
To validate the fix in #2662 for the CocoaPods linter error in #2646 (comment), I tried pushing to a throwaway pod on CocoaPods trunk and ran into errors doing so with the combination of CocoaPods 1.10.0.rc.1 and Xcode 12:
The verbose output contains additional details about the linker errors:
Workarounds
As a temporary workaround, I
xcode-select
ed Xcode 11.7 and tried again, this time successfully: CocoaPods/Specs@23ef623.However, this workaround only makes it possible to push the pod to CocoaPods trunk; application developers using Xcode 12 are still affected by the linker errors. A more robust workaround requires modifying the podspecs to exclude Apple Silicon from the valid architectures: CocoaPods/CocoaPods#10065 (comment) CocoaPods/CocoaPods#10104 (comment).
Solution
A more long-term solution will require rebuilding MapboxAccounts with all the architectures required by Xcode 12. In the meantime, we should apply the workaround in CocoaPods/CocoaPods#10065 (comment) CocoaPods/CocoaPods#10104 (comment) to the podspecs in this repository.
/cc @mapbox/navigation-ios @mapbox/core-sdk
The text was updated successfully, but these errors were encountered: