Compile packages for arm64 only, how?

When compiling my iOS-only app for Release, one of the packages (GRDB in this case) is compiled for both armv7 and arm64, the rest (all local packages) only for the arm64, which is what I want. The app executable is down to just the arm64 slice. How is this controlled? How can I get the package to compile for only arm64 without altering the package? There’s nothing in the app project or manifest files whict dictates anything armv7 as far as I can see.

Thnaks in advance.

I haven't tried this for iOS but in the Swift Package Index we're using swift build --arch arm64 and xcodebuild ... -destination "platform=macos,arch=arm64" to build on Apple Silicon. I would image those would work similarly for iOS.

Here are some links to builds showing the build commands:

More builds are available on the overview page: https://swiftpackageindex.com/apple/swift-algorithms/builds

As a side note, does anyone know if swift build is able to produce fat binaries by any chance?

Yes, I'm using

xcrun swift build -c release --arch arm64 --arch x86_64
1 Like
Terms of Service

Privacy Policy

Cookie Policy