Simulator arm64

2,412 views
Skip to first unread message

Jaroslav Gasparik

unread,
Jan 19, 2022, 9:00:29 AM1/19/22
to j2objc-discuss
Hello, i have problem with building for simulator.

Showing All Messages

In /usr/local/bin/j2objc-2.8/lib/libjre_emul.a(IOSArray.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

What with this?


Thanks



Tom Ball

unread,
Jan 19, 2022, 4:29:18 PM1/19/22
to j2objc-...@googlegroups.com
Xcode's "lipo" command will show you what architectures a library supports:

$ lipo -info ~/j2objc-2.8/lib/libjre_emul.a
Architectures in the fat file: /Users/tball/j2objc-2.8/lib/libjre_emul.a are: x86_64 arm64 arm64e

The iOS simulator's architecture is x86_64 (the latest Xcode doesn't support an i386-based simulator that the answer refers to), whereas a real iOS device (such as an iPhone or iPad) can be arm64 or arm64e. So when building an app for the simulator you need to specify x86_64, not an ARM architecture.

--
You received this message because you are subscribed to the Google Groups "j2objc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to j2objc-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/j2objc-discuss/fdfecbf0-6f00-4408-b5e2-dd81e886a58cn%40googlegroups.com.

Jaroslav Gasparik

unread,
Jan 20, 2022, 4:18:49 AM1/20/22
to j2objc-discuss
Thanks

So is there a specific solution? Or do I only have to use physical machines?
Unfortunately, I'm not a very good developer for apple and Xcode doesn't tell me much.

Thank you in advance for your reply.

Dne středa 19. ledna 2022 v 22:29:18 UTC+1 uživatel Tom Ball napsal:

Tom Ball

unread,
Jan 20, 2022, 1:00:23 PM1/20/22
to j2objc-...@googlegroups.com
To run your app on an ARM CPU, you'll need a physical iOS device. Unless your app explicitly uses telephony or other iPhone-specific features, a cheap iPad should be sufficient and can be shared between team members (I have an iPad Mini 6). Be careful not to get *too* old a device, though, as you want to run with the latest version of iPadOS. Here's the list of compatible devices from MacRumor.com.

You can develop iOS apps just using the simulators, though, just select the device (Xcode automatically selects the correct architectures based on the chosen device, so don't explicitly set them):

XcodeDevice.jpg

It is best to test with multiple devices and rotate it regularly, to verify that your app is displayed correctly.

Reply all
Reply to author
Forward
0 new messages