Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28525] iOS: Cannot run apps with non-arm64 modules on Apple Silicon (even with Rosetta)

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2021-09-06T11:14:09.000+0000
Affected Version/sn/a
Fix Version/sRelease 10.1.0
ComponentsiOS
LabelsM1, build, iOS, module
ReporterHans Knöchel
AssigneeJoshua Quick
Created2021-08-17T09:08:33.000+0000
Updated2021-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.

Comments

No comments

JSON Source