I would like to detect if a binary is including the back-deployed library for Swift Concurrency. By following this advice I'm using otool -L
to inspect the dynamic libraries for the binary. When setting a deployment target of iOS 15 I see the following value:
/usr/lib/swift/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 5.9.0)
Instead, when targeting iOS 14 I get:
@rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 5.9.0, weak)
I would expect an equivalent behaviour of iOS 15 when targeting iOS 14 but limiting the availability of the async
function using @available(iOS 15.0, *)
, however, the value returned from otool -L
is the same I would get on iOS 14 without limiting the function availability.
I'm probably missing something on how this works, or maybe otool
isn't the correct tool for detecting it, but is there a way to detect if Swift Concurrency will be only used in iOS 15 while targeting iOS 14? (so it won't use the back-deployed library...)