[TIMOB-28525] iOS: Cannot run apps with non-arm64 modules on Apple Silicon (even with Rosetta)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-09-06T11:14:09.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.1.0 |
Components | iOS |
Labels | M1, build, iOS, module |
Reporter | Hans Knöchel |
Assignee | Joshua Quick |
Created | 2021-08-17T09:08:33.000+0000 |
Updated | 2021-09-06T11:14:09.000+0000 |
Description
This will become a very common issue over the next few months as more Macs will run on the M1/MX chips: The build fails due to the
arm64
architecture. In the native world, Apple resolves this by providing Rosetta, an architecture bridge that allows apps to be started in x86_64
(Intel) mode.
So practically, users can just start their VSCode or Terminal with Rosetta (right click > Info > "Use Rosetta") and the app would compile with x86_64. But currently, the Titanium CLI uses process.arch
to detect the architecture, which causes a problem, because it still detects arm64
and therefore fails early, although the build would run through.
To fix this, the command uname -a
can be used and returns the actual used process architecture. And since iOS apps don't run on Windows anyway, we don't have to fear Windows compatibility for the command.
No comments