Failed to lookup Xcode UUID: command ["defaults", "read"] exited with code 1
Opened this issue · 5 comments
Describe the bug
A clear and concise description of what the bug is. If you are using tauri-cli, please consider open an issue in Tauri main repo first.
cargo mobile init
output:
Generating base project...
Installing iOS toolchains...
info: component 'rust-std' for target 'aarch64-apple-ios' is up to date
info: component 'rust-std' for target 'aarch64-apple-ios-sim' is up to date
info: component 'rust-std' for target 'x86_64-apple-ios' is up to date
/opt/homebrew/bin/xcodegen
/opt/homebrew/bin/idevicesyslog
/usr/local/bin/pod
Apple dependencies are up to date
Installing `rust-xcode-plugin`...
Updating `rust-xcode-plugin` repo...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
HEAD is now at 3030245 dd UUID for Xcode 14.0 and 14.1
action request: Failed to install Rust Xcode plugin; this component is optional,
so init will continue anyway, but Xcode debugging won't work until this is
resolved!
Failed to lookup Xcode UUID: command ["defaults", "read"] exited with code 1
ln: /Users/admin/Desktop/hello/gen/apple/assets: No such file or directory
error: Asset dir couldn't be symlinked into Xcode project
Failed to create a symbolic link from "../../assets" to directory "/Users/
admin/Desktop/hello/gen/apple" (file and directory clobbering enabled): `ln`
command failed: command ["ln", "-n", "-s", "-f", "../../assets", "/Users/
admin/Desktop/hello/gen/apple/assets"] exited with code 1
admin@sscn-macos hello %
I tried:
defaults read
It can output a lot of information without failure.
Steps To Reproduce
Steps to reproduce the behavior. It must use cargo-mobile2 itself and wry template directly instead of tauri-cli.
cargo new hello
cd hello
cargo mobile init
Expected behavior
A clear and concise description of what you expected to happen.
I just want to build an iOS application.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform and Versions (please complete the following information):
Host OS: macos14.5
Target OS:ios
Rustc:1.79.0
Ouput of cargo mobile doctor
:
cargo mobile doctor
[✔] cargo-mobile v0.12.2
• Contains commits up to ""
• Installed at "~/.cargo/.cargo-mobile2"
• macOS v14.5 (23F79)
• rustc v1.79.0 (129f3b996 2024-6-10)
[!] Apple developer tools
• Xcode v15.4
• Active developer dir: "/Applications/Xcode.app/Contents/Developer"
• ios-deploy v1.12.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: peng (PZB27U28WK)
[!] Android developer tools
✗ Failed to get SDK version: Failed to open "/Users/admin/android-sdk/tools/
source.properties": No such file or directory (os error 2)
• NDK v26.1.10909125 installed at "~/android-sdk/ndk/26.1.10909125"
/opt/homebrew/bin/ios-deploy
[✔] Connected devices
• iPhone (iPhone SE)
admin@sscn-macos hello %
Additional context
Add any other context about the problem here.
I can consistently reproduce this when cargo mobile init
is (re)invoked when the gen
folder is already present. The workaround is to delete the gen
folder and run it, but of course it would be better if this tool could automatically handle that case.
I will also try deleting gen.
Still unsuccessful:
admin@sscn-macos hello % rm -rf gen
admin@sscn-macos hello % clear
admin@sscn-macos hello % cargo mobile init
Generating base project...
Installing iOS toolchains...
info: component 'rust-std' for target 'aarch64-apple-ios' is up to date
info: component 'rust-std' for target 'aarch64-apple-ios-sim' is up to date
info: component 'rust-std' for target 'x86_64-apple-ios' is up to date
/opt/homebrew/bin/xcodegen
/opt/homebrew/bin/idevicesyslog
/usr/local/bin/pod
Apple dependencies are up to date
Installing `rust-xcode-plugin`...
Updating `rust-xcode-plugin` repo...
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
HEAD is now at 3030245 dd UUID for Xcode 14.0 and 14.1
action request: Failed to install Rust Xcode plugin; this component is optional,
so init will continue anyway, but Xcode debugging won't work until this is
resolved!
Failed to lookup Xcode UUID: command ["defaults", "read"] exited with code 1
Generating Xcode project...
⚙️ Generating plists...
⚙️ Generating project...
⚙️ Writing project...
Created project at /Users/admin/Desktop/hello/gen/apple/hello.xcodeproj
Installing Android toolchains...
info: component 'rust-std' for target 'aarch64-linux-android' is up to date
info: component 'rust-std' for target 'armv7-linux-androideabi' is up to date
info: component 'rust-std' for target 'i686-linux-android' is up to date
info: component 'rust-std' for target 'x86_64-linux-android' is up to date
Generating Android Studio project...
victory: Project generated successfully!
Make cool apps! 🌻 🐕 🎉
admin@sscn-macos hello %
Hm interesting, my project built fine after that. At least the asset error seems to be fixed, but I am not sure what's going on with the Rust Xcode plugin.
I ran the following command according to the instructions of Rust Xcode Plugin:
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
But the output is:
2024-08-22 07:50:44.434 defaults[8735:325806]
The domain/default pair of (/Applications/Xcode.app/Contents/Info, DVTPlugInComp
atibilityUUID) does not exist
May I ask what the situation is? Is it because my version of xcode is too high?