Some of my colleagues are seeing errors related to the squarereadersdk when building our app on Xcode:
ld: warning: ignoring file /Users/temp/code/myapp/Pods/SquareReaderSDK/SquareReaderSDK.framework/SquareReaderSDK, building for iOS Simulator-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x76 0x65 0x72 0x73 0x69 0x6F 0x6E 0x20 0x68 0x74 0x74 0x70 0x73 0x3A 0x2F 0x2F )
Undefined symbols for architecture x86_64:
"_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 x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We’ve been trying for days to fix this. From cloning a brand new project to re-installing cocoapods, playing with the Xcode settings etc.
By the way, we are using the following version: pod 'SquareReaderSDK', '1.4.8'
What version of XCode are you using? Also, Square Reader SDK doesn’t currently support Cocoa Pods as far as I’m aware, so I’m not sure where you’re getting the pod from. In our documentation we require you to run a ruby command to download the Reader SDK framework: https://developer.squareup.com/docs/reader-sdk/build-on-ios#step-2-install-reader-sdk.
Thanks! I discussed this with a member of our iOS team and they mentioned it could be due to derived data within Xcode. Could you try deleting your derived data in Xcode and see if the issue is resolved? Here’s some info on how to do this just in case: https://stackoverflow.com/a/42760524.
I did that already and unfortunately the errors didn’t clear up. I deleted derived data, cleaned the project, deintegrated pods, re-ran pod install, and still same errors are showing.
I encountered the same error and due to an improperly configured Git LFS install. You can confirm that that’s the problem by choosing the library in the File Navigator in Xcode. On a properly downloaded binary Xcode will show the default white paper icon. For an incorrectly configured Git LFS install Xcode will correctly surmise that the file is not a binary and show the git=lfs metadata:
To add to phughes’s post, if git lfs is used in a private pod, after executing the commands above, you have to run pod cache clean 'podname' --all (after deintegrating the pod in question) and reinstall the pod.
If you are experiencing any errors related to the SquareReader framework for iOS when building your project in Xcode, it is likely that you are using an older version of the framework. Please ensure that you are using the latest version of the SquareReader framework by following the instructions in the Square Reader SDK for iOS Getting Started guide.