iOS Simulator requires Rosetta mode in Apple M1 computers

The problem:

When Image Manipulation API is used, iOS Simulator requires Rosetta mode in Apple M1 computers, and so an error will appear when compiling or running the application.

How to identify the error?

If you do not run your simulator with Rosetta compatibility, the following errors can be manifested in two ways (depending on XCode/MacOS versions):

Possible error #1:

Error: No such module 'Lottie' or Invalid diagnostics signature when compile with chip Apple Sillicon (chip M1)

This error is displayed in GeneXus output when GeneXus compiles iOS application.

Possible error #2:

If error #1 is not displayed during GeneXus compilation, the following error may appear on XCode:

'/<PATH>/<APPLICATION_NAME>.app/Frameworks/<FRAMEWORK_NAME>.framework/<FRAMEWORK_NAME>' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),

When the application is opened in the iOS Simulator, it immediately crashes, and the error above is displayed multiple times (for each framework referenced by GeneXus)

If any of these errors appear, you won't be able to run your simulator (you have to use a device instead). In order to workaround the errors, and try to run the simulator, you should follow the steps below.

How to enable Rosetta compatibility?

Warning: in some versions of XCode/MacOS, this mode is not available, or may not work properly even when following the steps below. In such cases, it will not be possible to test your application using iOS Simulator, you will need a physical device.

XCode lower than 14.3:

Enable it by selecting the "Open using Rosetta" in the XCode.app properties. Check GeneXus documentation or GeneXus SAC for more detail.

XCode equals or higher than 14.3:

Open XCode, go to “Product” in the menu bar and select "Destination -> Destination Architectures -> Show both". New simulator will be displayed after this.

nativemobile_xcode_rosettasimulator