-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difficulty following the "Xcode + Cargo" example with Xcode 15.0 beta #231
Comments
Checked the build log (25916 lines long), noticed advice to run "rustup target add aarch64-apple-ios-sim", now there's only one error: "Sandbox: bash(18727) deny(1) file-read-data /Users/user/Desktop/code/ios-rust-analyzer/IosRustAnalyzer/build-rust.sh" Copy and pasting the build script into the Build Phases > Run Script box (and changing Shell to /bin/bash), the build log contains the following: error: failed to run custom build command for `ios-rust-analyzer v0.1.0 (/Users/user/Desktop/code/ios-rust-analyzer)` Here is
..so somehow need to allowlist the build-swift-build program for writing files I guess? |
In /Users/user/Desktop/code/ios-rust-analyzer/target/universal/debug/libios_rust_analyzer.a(ios_rust_analyzer-0ef8df2bcd6643d0.qkrptas7sr7chi3.rcgu.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/user/Desktop/code/ios-rust-analyzer/target/universal/debug/libios_rust_analyzer.a' for architecture arm64
|
Hmm, isn't this already the case in the guide
I'm not understanding what the problem was and what the fix was? |
Oh, right, because I was running the build-rust.sh script manually as otherwise the swift-bridge-build GeneratedBuild code doesn't have write permission for some reason, and was forgetting to set PLATFORM_NAME. The problem is the Run Script step fails on macOS 14.0 beta Sonoma, possibly because of increased privacy defaults. |
Ok, followed the guide to the end now and it works, just wanted to report the build errors with the Run Script portion (included in my second post). |
Got it. How did you fix the permissions issue? |
I didn't, I ran the build-rust.sh script manually. I'm completely new to mac development and since the OS and IDE are both beta versions I put off trying to fix the permissions thing in favour of getting the example to run. (And now I'm trying to build for rust targets |
I'm not sure if this is related, but in XCode 15.3 I had to go into my project's Build Settings and configure: |
I followed it exactly, until the step "Pressing the Run button should now open up the iOS simulator with Xcode's default "Hello World" iOS app." where instead of the iOS simulator there are errors:
This is on a Mac Mini M2 2023 running macOS 14.0 beta Sonoma.
The text was updated successfully, but these errors were encountered: