question

Damian Mehers avatar image
Damian Mehers asked

Apple Silicon/M1 "building for iOS Simulator, but linking in object file built for iOS, for architecture arm64"

Hi,

Trying to build and run an iOS app in the Simulator on an Apple Silicon (M1) based Mac using LWA gives the error


ld: in /Users/damian/Projects/myapp/Frameworks/LoginWithAmazon.framework/LoginWithAmazon(AMZNAuthorizationManager.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64


The exact same code built and ran on Intel based macs.


I think that the LWA SDK will need to be built/shipped with support for Apple Silicon - any thoughts on this? Happy to beta test.


Damian

ios
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Chandan avatar image
Chandan answered

double click of architecture and select other and remove all lines and add two things arm7s and arm7

Example Image Click Here


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Damian Mehers avatar image
Damian Mehers answered

When I build for the simulator after removing everything and adding `arm7s` and `arm7` then I get `None of the architectures in ARCHS (arm7, arm7s) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64, arm64e, i386, x86_64).`


If I leave `Standard Architectures` and add `arm7s` and `arm7` I get the same error as before.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Ben Humphries avatar image
Ben Humphries answered

I'm having this same problem, and I was able to get the app to link properly by excluding arm64. Unfortunately, this requires that I use Rosetta version of the simulator which is not a viable option for my team. Are there any plans to update the FlingSDK to support M1?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.