I haven't checked for a while, but since appstore's inception dynamic libraries weren't allowed, and static libraries were the only possible kind for non-Apple libraries.
Yes, I think you're right. I have been building and using a static Rust library for iOS but I want to switch to dynamic during development.
I can build and use a Rust dylib with a macOS application fine. I was hoping the iOS simulator at least would let me build a dynamic Rust library (seeing as it is the same platform as macOS), but even that has the same unsupported crate type warning when trying to build for it.
Actually, I wonder if a C dynamic library (plain C source) would work with the iOS simulator - just as a proof of concept...
UPDATE:
So, building a simple C dynamic library for the iOS simulator works:
(even without -isysroot it still works but with a warning...)
I can load the dylib with Swift on the iOS simulator: let handle = dlopen("test2.dylib", RTLD_LAZY);
This bodes well for the cargo build process to be made to build a dynamic library for the iOS simulator. It looks like the trick is -mios-simulator-version-min and there are issues on github relating to this.
Could a workaround, to let me build a dylib from Rust for the iOS simulator, be to build/target macOS but add that compiler flag somehow? Any thoughts?