rust-ios-android
rust-ios-android copied to clipboard
iOS library does not have armv7, armv7s or aarch64 architectures
The libsample.a file contains only arm64 and x86_64 architectures.
$ lipo -info target/universal/release/libsample.a
Architectures in the fat file: target/universal/release/libsample.a are: x86_64 arm64
Building the project is failing with error
▸ Linking RustSample
⚠️ ld: ignoring file /tmp/rust-ios-android/sample/ios/libsample.a, missing required architecture armv7 in file /tmp/rust-ios-android/sample/ios/libsample.a (2 slices)
❌ Undefined symbols for architecture armv7
> Symbol: _rust_regex_find
> Referenced from: -[RustRegex find:] in RustRegex.o
❌ ld: symbol(s) not found for architecture armv7
cargo lipo does not build 32 bit targets by default.
https://github.com/TimNN/cargo-lipo/issues/26#issuecomment-464512429
The desired targets should be explicitly mentioned using the --targets flag for 32 bit targets
cargo lipo --targets=aarch64-apple-ios,x86_64-apple-ios,armv7-apple-ios,armv7s-apple-ios
Oh. Since cargo-lipo is removing the 32-bit targets and Apple is also deprecating the 32-bit targets the proper fix would be to remove the 32-bit targets here as well.
I was unable to run the iOS demo without the armv7 target. I am new to mobile app development, so I don't know whether it is a configuration issue.
@kennytm you cannot just remove these targets
I'm not questioning the fact that these targets are not built by default now, that's certainly a good choice, but please do not consider completely removing them. Some applications still needs to support versions of iOS older than 11.
Regarding the issue, there should be some documentation about the defaults in usage here and how we can built for extra platforms because it is hard to tell that there is the choice to enable these other platforms.