Apple Silicon Macs are now widely available. You might even be reading this on one!
For iOS developers, this changes how apps are built for the simulator: an iOS Simulator arm64 build is now required. arm64 iOS binaries cannot be used to compile for a simulator running on Apple Silicon.
Starting with Batch 1.16, we started shipping x86_64/arm64 Mac Catalyst and arm64 iPhoneSimulator builds in our XCFramework.
Note: If you're using Batch's older distribution (Batch.embeddedframework) rather than XCFrameworks, you will still get the same architectures as older versions.
That is arm64/arm64e/armv7/armv7s for the iPhoneOS SDK and i386, x86_64 for the iPhoneSimulator SDK.
Please update to the XCFramework format as soon as possible.
Batch's Cocoapods distribution will automatically do that for you, whereas Carthage doesn't support XCFrameworks at the time of writing.
According to our testing (Xcode 12.2, macOS 11.1 beta 1), Apple Silicon Macs run the simulator in two ways:
Natively (arm64) for iOS 14.2
Using Rosetta 2 (x86_64) for iOS 13/12/11
This means that running your app on an iOS 14 (or higher) simulator requires that all of your binary dependencies contain an iOS Simulator arm64 build. Batch's XCFramework distribution does.
You can run older versions of Batch and other binary dependencies using iOS 13 (or lower) simulators.
Batch 1.15 or lower
Batch 1.16 or higher
iOS 14+ simulator on Apple Silicon
iOS 14+ simulator on Intel
iOS 13/12/11 simulators
/<path to your project>.xcodeproj The linked framework 'Pods_project.framework' is missing one or more architectures required by this target: arm64.
/<path to your project>.xcodeproj The linked framework 'Pods_project.framework' is missing one or more architectures required by this target: x86_64.
This can happen when switching between simulator versions on a Cocoapods project. Cleaning the project should fix the issue.
ld: in /<path to your project>/Pods/Batch/Batch.embeddedframework/Batch.framework/Batch(Batch-arm64-master.o), building for iOS Simulator, but linking in object file built for iOS, file '/<path to your project>/Pods/Batch/Batch.embeddedframework/Batch.framework/Batch'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This error occurs when an arm64 iPhoneSimulator slice cannot be found for one of your binary dependencies.
You're either running an older version of Batch, or didn't migrate to the XCFramework distribution of the SDK.
If you cannot upgrade or use the XCFramework, try using an older simulator which runs with Rosetta.