Universal static lib for iOS Simulator (x86_64 and arm64/M1) and iPhone (arm64). How?

Hello everyone!

Got stacked with issues of creating universal static lib for all of possible platforms? Is it possible to create fat *.a library file that will contain all of possible versions:

  1. Simulator arm64
  2. Simulator x86_64
  3. iPhone arm64

Hello,

You have to use XCFrameworks.

With the introduction of M1, lipo cannot be used anymore, because it will complain that arm64 simulator and iPhone arm64 are the same thing.

Universal static lib for iOS Simulator (x86_64 and arm64/M1) and iPhone (arm64). How?
 
 
Q