I’m having trouble with readers connecting. They can pair but fail to connect. They identify fine but connection fails. I have tried multiple models and they work fine in the Square app. I’ve tried the Forget/pair again cycle a bunch of times and still the same thing.
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Configure the Reader SDK on iOS for Square Stand
Reader SDK Quickstart
Square Developer Documentation
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
What version of Mobile Payments SDK are you running into these issues? Also what’s the application ID, and location_id
.
Not sure if you saw this… posted not as a direct reply:
2.0.0-alpha3, sq0idp-ZlaqDvw4im546ItB8CplYg, QJ8ZNBEK1Y74Z
Any help will be greatly appreciated as we’re trying to rush an updated build to our customers before iOS 18 drops on Monday!
Are you getting any error messages?
This shows a sequence of pairing a reader. They pair fine and authorization seems fine but they just won’t connect. Retry fails pretty fast.
Also when I was doing it programmatically (not just letting the settings manager dialog do it) I was getting the genericError
for ReaderConnectionFailureInfo.failureReason
Thanks for all the details. The team is looking into this.
Very much appreciated. I will send info as I get it.
Here is the sequence of updates the delegate gets:
[“READERSDK: reader Contactless and Chip (7920) Reader state changed to: connecting”]
[“READERSDK: reader Contactless and Chip (7920) Connection state changed to: connecting”]
[“READERSDK: reader Contactless and Chip (7920) Connection state changed to: connecting”]
[“READERSDK: reader Contactless and Chip (7920) Reader state changed to: failedToConnect”]
[“READERSDK: reader Contactless and Chip (7920) Connection state changed to: failedToConnect”]
[“READERSDK: reader Contactless and Chip (7920) Connection Failed”]
[“READERSDK: description = Generic Error - No Suggestion”]
[“READERSDK: recoverySuggestion = 0”]
[“READERSDK: failureReason = 1”]
What timezone are you in?
mountain
…and some more characters to get over 20
Are you modifying our Framework by any chance, unintentionally or intentionally (such as file size optimization)? The one in question is Frameworks/SquareMobilePaymentsSDK.framework/SquareMobilePaymentsSDK
.
Our security validation is flagging a mutate in one of our frameworks, it is expected to be unmodified and we’re wondering if you’re doing anything different during development or packaging the app.
Oh, very interesting. I don’t see anything for sure in debug builds but that gives me something to hunt down.
This explains why I was able to make a barebones test app and have it work fine. I have a few suggestions for your guides from that experience btw. Off the top of my head here are a few things that might be good to include in an integration checklist:
- add the reader protocols to Info.plist (“Supported external accessory protocols”)
- new project had build setting “User Script Sandboxing” = true which breaks the post-build script phase. That was a pain to find
Okay, thanks you so much for the feedback.
Okay, we tried a few things and as far as we can tell we are having the same problem. We confirmed:
- builds are not set to optimize
- we removed all old cocoapods stuff
- deleted all old readerSDK files
- cleaned, deleted all intermediate files and still getting the same problem
We will keep going but do you guys have more suggestions? Or a way to validate the SquareMobilePaymentsSDK
file somehow?
We’re pretty stumped here-- the only thing that seems like could modify it would its own setup
script. Which, actually seems to serve that very purpose (code signing and such). We certainly aren’t doing anything to it–we just want it to work!
Any other ideas?? Are there things on square’s end that we can look into? Like this mutate thing–do we maybe get flagged for some time period?
Also, not to be a pain but we are getting a little concerned about our timeline. Monday could be a big problem for us if nobody can take a payment.
Is there a way to work on this a little more closely?
Thanks for the help
Can you try running the following commands in order, to get a fresh new copy of the SDK and try again?
pod deintegrate
pod cache clean SquareMobilePaymentsSDK
pod install
If that doesn’t work could you send over a zip of the SquareMobilePaymentsSDK folder inside your projects Pods folder?
I’m using the swift package. I was so excited to be rid of cocoapods! I’ll bring it back though if I have to.
I could send a zip of the SquareMobilePaymentsSDK from my build folder. How do you want me to send it?
The MPSDK xcframework lives in the Derived Data folder. Could you send us the SquareMobilePaymentsSDK
folder found in ~/Library/Developer/Xcode/DerivedData/{your-project-name-xxxxx}/SourcePackages/artifacts
.
Okay, sent them on slack