You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to the Build Rust Code build phase (from this tutorial; I assume compiling proc macros etc requires the MacOS SDK), all the dependencies build successfully, but the final linking fails with:
ld: building for 'iOS', but linking in dylib (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libobjc.A.tbd) built for 'macOS macCatalyst zippered(macOS/Catalyst)'
Probably the XCode build environment is somehow messed up during the generation of the XCode project?
Steps To Reproduce
cargo mobile init on MacOS Somona
open and run the generated XCode project in XCode 15.3
Expected behavior
XCode builds the project successfully out of the box.
Platform and Versions (please complete the following information):
Host OS: MacOS Sonoma 14.5
Target OS: aarch64 iOS
Rustc: 1.79.0
Ouput of cargo mobile doctor:
[✔] cargo-mobile v0.12.2
• Contains commits up to "Publish New Versions (#344)\n"
• Installed at "~/.cargo/.cargo-mobile2"
• macOS v14.5 (23F79)
• rustc v1.79.0 (129f3b996 2024-6-10)
[!] Apple developer tools
• Xcode v15.3
• Active developer dir: "/Applications/Xcode.app/Contents/Developer"
• ios-deploy v1.12.2
• XcodeGen v2.41.0
✗ xcode-rust-plugin plugin absent
✗ xcode-rust-plugin lang spec absent
✗ xcode-rust-plugin lang metadata absent
• xcode-rust-plugin is up-to-date
✗ Failed to check xcode-rust-plugin UUID status: Failed to lookup Xcode
UUID: command ["defaults", "read"] exited with code 1
• Development team: Gephyra OU (5M9G3KQ5FK)
[!] Android developer tools
✗ Have you installed the Android SDK? The ANDROID_HOME environment
variable isn't set, and is required: environment variable not found
/usr/local/bin/ios-deploy
[!] Connected devices
✗ Failed to get iOS device list: Failed to request device list from
ios-deploy: command ["ios-deploy", "--detect", "--timeout", "1",
"--json", "--no-wifi"] exited with code 253
Additional context
Modifying the Build Rust Code build phase to this (essentially first building with LIBRARY_PATH=MacOS_SDK, which builds all dependencies but fails to link, then un-setting the LIBRARY_PATH to build with the iOS SDK, which succeeds in linking) somehow works, albeit with an error thrown and ignored in the middle:
$ cargo mobile doctor
[✔] cargo-mobile v0.17.2
• Contains commits up to "publish new versions (#389)\n"
• Installed at "~/.cargo/.cargo-mobile2"
• macOS v14.2.1 (23C71)
• rustc v1.78.0 (9b00956e5 2024-4-29)
[!] Apple developer tools
• Xcode v15.4
• Active developer dir: "/Applications/Xcode.app/Contents/Developer"
✗ Failed to check ios-deploy version: No such file or directory (os error 2)
• XcodeGen v2.42.0
✗ xcode-rust-plugin plugin absent
✗ xcode-rust-plugin lang spec absent
✗ xcode-rust-plugin lang metadata absent
• xcode-rust-plugin is up-to-date
✗ Failed to check xcode-rust-plugin UUID status: Failed to lookup Xcode UUID: command ["defaults", "read"] exited with code 1
• Development team: ************
[!] Android developer tools
✗ Have you installed the Android SDK? The `ANDROID_HOME` environment variable isn't set, and is required: environment variable not found
[✔] Connected devices
• ****’s Device of Ultimate Destiny (iPhone13,2)
Describe the bug
cargo mobile init
then building in XCode fails to build the Rust Code with errorThe Rust dependencies do not finish building. Now when I add this line:
to the Build Rust Code build phase (from this tutorial; I assume compiling proc macros etc requires the MacOS SDK), all the dependencies build successfully, but the final linking fails with:
Probably the XCode build environment is somehow messed up during the generation of the XCode project?
Steps To Reproduce
cargo mobile init
on MacOS SomonaExpected behavior
XCode builds the project successfully out of the box.
Platform and Versions (please complete the following information):
Host OS: MacOS Sonoma 14.5
Target OS: aarch64 iOS
Rustc: 1.79.0
Ouput of
cargo mobile doctor
:Additional context
Modifying the Build Rust Code build phase to this (essentially first building with LIBRARY_PATH=MacOS_SDK, which builds all dependencies but fails to link, then un-setting the LIBRARY_PATH to build with the iOS SDK, which succeeds in linking) somehow works, albeit with an error thrown and ignored in the middle:
The text was updated successfully, but these errors were encountered: