Post

Replies

Boosts

Views

Activity

How to conditionally link an xcframework?
Hi all, I have an xcframework for iOS that only contains an arm64 framework, not a simulator framework. When run on the simulator, no code from the framework is needed (it is stubbed/mocked out). However, I'm struggling to find how to link the xcframework only for device builds. So the situation is this: If I link the framework, device builds compile and run fine. For simulator, it fails with this error: error: While building for iOS Simulator, no library for this platform was found If I don't link the framework, simulator builds and runs fine, but on devices I get a dyld error at runtime. These results are understandable, but I'd like to know if it's possible to include the xcframework only for device builds, as this would seem to solve my problems... Any help would be appreciated.
2
0
1.3k
Jun ’21