M1 Mac/ ARM: SquareReaderSDK for iOS/iPadsOS Xcode Projects to compile on M1 Macs

To integrate SquareReaderSDK into our iOS project, this is how we download and integrate and it compiles/run on Intel Macs and our target devices - iOS/iPadOS as expected.

ruby <(curl https://connect.squareup.com/readersdk-installer) install --app-id $APP_ID --repo-password $REPO_PWD

We are migrating to M1 macs and we see the below errors.

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SQRDTender", referenced from:
      objc-class-ref in SquareService.o
  "_OBJC_CLASS_$_SQRDReaderSDK", referenced from:
      objc-class-ref in SquareService.o
  "_OBJC_CLASS_$_SQRDReaderSettingsController", referenced from:
      objc-class-ref in SquareService.o
  "_OBJC_CLASS_$_SQRDMoney", referenced from:
      objc-class-ref in SquareService.o
  "_OBJC_CLASS_$_SQRDCheckoutController", referenced from:
      objc-class-ref in SquareService.o
  "_OBJC_CLASS_$_SQRDCheckoutParameters", referenced from:
      objc-class-ref in SquareService.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there a different SDK that targets both Intel and ARM/M1 archs?

:wave: Unfortunately at this time M1 support isn’t currently available. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

I was able to get this to build on my M1 Macbook Pro using this workaround.

Step 1.
Add -target x86_64-apple-darwin to Other C Flags in Xcode

Step 2.
Add arm64 to excluded frameworks in Xcode

Great! We did start to support M1 devices shortly after this post in version 1.6.0 of Reader SDK. :slightly_smiling_face:

Hello Bryan,

M1 MBP does not show my reader (Model: SPC1-01) in the list of available Bluetooth devices when scanned. I believe it should be like any other bluetooth device or just similar to how we connect to iPhone or iPad.

Do you have instructions please?

Thank you.

Hey @iamchandra! Are you attempting to connect the Reader directly to your MBP? This topic is about compiling an Xcode project that uses Reader SDK, not connecting the device itself to the Mac. You’ll need to connect the Reader to a mobile device :slight_smile:

Hello Josh,

Thank you for your reply.
I understand the context. I am the original author of this thread.
So, when the change log mentioned that it supports Apple Chipset (M1), does this only mean M1 iPads? Or, M1 macs too?

If shall I start different thread, please let me know.

Best!

Sorry about that! I misread and thought the poster above your last reply was the original author.

That change log includes M1 Macs, but only in the context of compiling a project with the Reader SDK framework on M1 Macs. The actual Reader hardware should be connected to a mobile device to test your application.

@Bryan-Square Hi, any thoughts for M2 Mac? Getting below errors but I am able to compile and run not sure how. I have v1.6.9 installed.

Is this a new error for an M2? Were you not seeing this before? Also are there any other details in the error message? :slight_smile: