IOS plugin involving arm64 and x86_64

The info that comes with the pluginSDK reads:

±Plugin Name // name of your plugin
± Build Resources // includes shared library parts
±Linux X86
±Linux x86-64
±Linux ARM
±iOS Device // New for 2020r2 (x86_64)
±iOS Simulator // New for 2020r2 (arm64)
±Mac arm64 // New for 2020r2
±Mac x86-64
±Mac Universal // include x86_64 and arm64 targets as a single binary
±Windows x86-64
± IDE Resources // includes pictures/docs for your plugin
±Controls Palette // includes icon you’d see in the toolbar
±Help // plugin docs, must include index.html

The physical device is associated with an intel chip??
±iOS Device // New for 2020r2 (x86_64)

The simulator is associated with the arm64 chip only??
±iOS Simulator // New for 2020r2 (arm64)

I guess these are typo mistakes. So the simulator should be able to run on intel and M1 Macs, right? The device is just arm64, right?

Good question.

Maybe for a future IDE we may need iOS simulator plugin part to be build with -arch x86_64 -arch arm64 flags to have both architectures?

Not maybe. It has to be, because Apple still sells intel machines (the high end).

No, I mean the iOS plugins from me, @Björn_Eiríksson and Xojo itself may need to include arm64 for iOS simulator for a future IDE with Apple Silicon support. At least if Xojo Inc. plans to use the simulator without Rosetta.

I thought iOS simulator ARM just runs the main image ?

Since there is after all nothing to simulate there.

Xojo Inc. may clarify. But iPhone Simulator and Device are two different SDKs in Xcode.

Yeah, You can build a universal simulator and put it in the IOS Simulator folder, so that should take care if Xojo-IDE runs natively on M1.

Well, if they just take the iOS device plugin for iOS simulator on M1, I would be happy as that would allow me to skip that extra work.

Yes that’s a typo, thanks for pointing it out. We only (currently) support the x86_64 simulator part, but you may build the simulator part as a Universal binary with an arm64 part as well. If we don’t find an arm64 part we’ll likely just use the Device portion when we do support the arm64 simulator part in the future.

1 Like

Thanks. Use device plugin and we have nothing to change :slight_smile:

I did the work today. My plugins grew another 50 MB and now have iOS Simulator dylib with both arm64 and x86_64 inside. Looks like due to the Simulator and Device being two separate SDKs, you can’t simply link all easily. I had to rebuild a lot of libraries for simulator arm64 target, too.

1 Like

Of course. Have been there 2 months earlier :wink: