Skip to content
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

Problem with x86_64-apple-ios-simulator #238

Open
kanjanaMi opened this issue Aug 7, 2023 · 2 comments
Open

Problem with x86_64-apple-ios-simulator #238

kanjanaMi opened this issue Aug 7, 2023 · 2 comments

Comments

@kanjanaMi
Copy link

kanjanaMi commented Aug 7, 2023

Hi,
I try to create swift package following to this guideline.

cargo build --target aarch64-apple-ios

cargo build --target x86_64-apple-ios
cargo build --target aarch64-apple-ios-sim
mkdir -p ./target/universal-ios/debug

lipo \
    ./target/aarch64-apple-ios-sim/debug/libmy_rust_lib.a \
    ./target/x86_64-apple-ios/debug/libmy_rust_lib.a -create -output \
    ./target/universal-ios/debug/libmy_rust_lib.a

swift-bridge-cli create-package \
  --bridges-dir ./generated \
  --out-dir MySwiftPackage \
  --ios target/aarch64-apple-ios/debug/libmy_rust_lib.a \
  --simulator target/universal-ios/debug/libmy_rust_lib.a \
  --name MySwiftPackage

I imported SwiftPackage following to guideline but I found this error.
Could not find module 'MySwiftPackage' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator

I also tried set flag Excluded architectures and build active architecture only but it didn't work.
Screen Shot 2566-08-07 at 15 24 04

I'm using M1 and my hacky workaround is checking the flag Open using Rosetta.
Do you have any suggestions to fix this?

@idxn
Copy link

idxn commented Aug 11, 2023

+1 I found the same problem. Do you also have any workarounds you may suggest?

@chinedufn
Copy link
Owner

I don't have an M1 so I'm not sure that I can try to reproduce this.

Do any of the answers in here work? https://stackoverflow.com/questions/56957632/could-not-find-module-for-target-x86-64-apple-ios-simulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants