Skip to main content
All CollectionsPush NotificationsiOS
Xcode 12 fails to build a project containing Batch
Xcode 12 fails to build a project containing Batch

Frequently encountered Xcode 12 issues and their fixes

Arnaud avatar
Written by Arnaud
Updated over a year ago

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.

Linking error

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 Excluded Architectures.

Next to 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 arm64.

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.

Did this answer your question?