mattrglobal / ffi-bbs-signatures

An FFI wrapper around the implementation of BBS+ signatures in Ursa
Apache License 2.0
23 stars 22 forks source link

Need to add support for iOS Simulator on Apple Silicon Macs #58

Open SteveG-MATTR opened 2 years ago

SteveG-MATTR commented 2 years ago

I'd like to propose that we update the Obj-C wrapper created by ffi-bbs-signatures to include support for Apple Silicon iOS simulators.

The Objective C wrapper produces a libbbs.a file that is intended to link into an iOS target. Prior to Apple Silicon this supported iOS Simulators by including a slice for x86 architectures alongside one for arm64. (A single .a file cannot have more than one slice for the same architecture).

Since the adoption of Apple Silicon it is necessary to produce a slice for arm64-sim, otherwise linking fails. However we can't have an arm64 and an arm64-sim slice in the same .a file because they have the same architecture.

Apple suggests that the best solution is to provide multiple .a files, one for devices and another for simulators. These can be packaged together in a single framework for binary distribution.

The following page describes how to create a framework containing multiple .a files: https://developer.apple.com/forums/thread/650511