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

Device.swiftmodule is not built for arm64 #2

Open
zakray opened this issue Oct 31, 2024 · 2 comments
Open

Device.swiftmodule is not built for arm64 #2

zakray opened this issue Oct 31, 2024 · 2 comments

Comments

@zakray
Copy link

zakray commented Oct 31, 2024

After installing Device via swift package, I'm unable to run my app via the simulator. I get "Build failed because Device.swiftmodule is not built for arm64, please try a run destination with a different architecture". After I got that error, a new simulator option with Rosetta appeared, but trying to build on that gave me a number of errors about "undefined symbol".

It does work fine on a real device. This is running latest macOS with Xcode 16 on an M2 Mac. Any ideas?

@parmar-mehul
Copy link

parmar-mehul commented Nov 29, 2024

iOS 18.1, MacOS 15.1.1 (24B91), Xcode Version 16.1 (16B40)
Swift 5.10

Hello @zakray ,

I am also facing similar error, and build failed with Undefined symbols for architecture arm64
Unable to run on Device also. Any solution or suggestion? @kudit

Screenshot 2024-11-29 at 3 10 25 PM

@parmar-mehul
Copy link

parmar-mehul commented Nov 29, 2024

@zakray , Please note.

My mistake, Sorry ((
Issue Resolved

iOS 18.1, MacOS 15.1.1 (24B91), Xcode Version 16.1 (16B40)
Swift 5.10

The problem was caused by duplicating the Device library dependency in my project. I had added https://github.com/kudit/Device.git (v2.6.1) in two places:
1. Directly in my project’s target.
2. Indirectly as a dependency of a private package.

This resulted in the library being included twice in the same project, causing conflicting symbols and undefined symbol errors.

To resolve the issue, I removed the direct reference to Device from my project since it was already included via my private package’s dependencies. This eliminated the duplication, and the errors were resolved.

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

2 participants