Xcode 12 introduces support for Apple Silicon Macs. Even though you're working on an iOS project, this can impact you as developers now need to build for arm64 simulators, an architecture that used to be reserved for physical iDevices.
After updating, your project might fail to build if you update to Xcode's recommended build settings.
The error looks like this:
❌ ld: in /Users/.../Batch/Batch.embeddedframework/Batch.framework/Batch(Batch-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/.../Batch/Batch.embeddedframework/Batch.framework/Batch'
There are two solutions to this:
Update to Batch 1.16
Disable arm64 simulator builds temporarily
If you already updated to Batch 1.16 but are still encountering this error, this is due to Batch being used with the old fat framework distribution method.
If you're integrating manually, please migrate to the XCFramework distribution.
If you're integrating using Carthage, you will need to disable the arm64 simulator builds until Carthage supports XCFrameworks and Batch releases a compatible version.
If you're integrating using Cocoapods, make sure you're using a version that supports Xcode 12 (1.10 and higher). If this still doesn't work, please contact our support team.
Disabling the simulator arm64 build
First, open your main target's
Build Settings and expand
Debug, click on +.
Then, click on
Any SDK on the line that was added, and select
Any iOS Simulator.
Double-click on the empty space on the right, press + in the popup and write
Press enter and click outside of the popup.
Repeat the steps for
Release. Your build settings should look like this:
You might need to repeat the steps for your test target.
BatchExtension error when archiving for the App Store
BatchExtension was originally distributed as a closed-source dynamic framework. It may cause bitcode issues when submitted using Xcode 12.
Integrations should now be made using the open-source version of the extension, using Swift Package Manager, Carthage or CocoaPods
See the 1.16 migration document for more information.
This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.