We are trying to implement Square Reader in-person payments in our mobile app developed in Flutter/ Dart.
we followed below link to get going:
We have setup two applications in square portal, one for staging environment and another for prod environment. We have also enabled repository credentials for both apps.
My application details:
Mobile app in Flutter/ dart
Embedded Square reader sdk xc framework in Xcode using staging app credentials as listed in step:
Download and configure the latest version of SquareReaderSDK.xcframework in your project root by replacing YOUR_SQUARE_READER_APP_ID and YOUR_SQUARE_READER_REPOSITORY_PASSWORD with your Reader SDK credentials.
The command below will download the framework into the current directory. The framework must be in either the ios directory or the ios/Frameworks directory of your Flutter project.
ruby <(curl https://connect.squareup.com/readersdk-installer) install
Square reader sdk works okay on my mobile app in IOS emulator but crashes on actual physical device (Ipad).
I have the following questions:
1: How to apply prod repository credentials? The confusion is when installing the framework we are supplying staging credentials. so do I need to un-install the framework and re-install it with prod repo credentials?
2: On the physical device (Ipad), where the user will be using a Square Reader device, do we need to install any additional software from Square? Will initiating the checkout flow automatically open the Square reader UI?
The answer to this is probably no, but still asking, do we have to pass in test credit cards and check the general functionality of the app before moving it to production.
On last thing, No need to install any additional software on the IPad device to use the Square Reader, correct?
Basically deploy the mobile app which has embedded reader sdk framework, grab the square reader plug it into the lightning port to begin accepting payments and that will be it right?
I am unable to make this Square reader SDK work.
When I run my code on Mac with ios simulator with VS code, the transactions are going thru okay, but when I deploy it onto an IPAD, after I enable the microphone, location and blue tooth and I hit the checkout button I see a white screen and the app crashes( in the sense it gets minimized into an icon) and I keep clicking the icon all I see is a white screen. nothing is happening.
Please suggest what could be wrong, I am not sure how to see the logs on the IPAD for more details strangely this does not happen in the development PC on VS code, so I need your help to look into this.
Thank you for your reply.
Yes the device is still connected and the white screen too. This works fine on my PC where I could see the logs, but on IPAD I only see a white screen, not sure how to look at the log information on IPAD.
Well after googling a bit, I found a way to look into the device logs, and I am surprised for crash reason: missing NSBluetoothAlwaysUsageDescription. I followed the instruction on the link:
(reader-sdk-flutter-plugin/get-started.md at master · square/reader-sdk-flutter-plugin · GitHub) which only had NSBluetoothPeripheralUsageDescription
I think it will help people like me if someone from Square team would update these instructions.
Let me give another try with the changes. Thank you!
I enabled the developer mode and successfully tested the credit card transaction with real card.
I recommend the following:
DO NOT bind installations with user credentials.
Use standard channel such as pub dev package that should have the necessary methods to make the calls with credentials etc.
Provide the ability for the consumer to configure environments such as Dev, Beta, Prod , and apply restriction (such as no test credit card) to only prod, this way from the developer perspective it will become lot easier to implement.
I think its not a good idea to release a product with lots of restrictions.
Bryan, Thank you for all your help.
Could you please confirm if we must enable Developer Mode to use Square Reader SDK for in-person payments.
I just want re-confirm so that we can inform the client the reason why they should enable it on all devices used.
Based on what I could see so far is that if I include Blue tooth in info plist, the application is prompting for Developer Mode Required and if I don’t include Blue tooth the application is crashing reporting missing blue tooth. I upgraded the ios to 16.1 on the ipad for this test.
Good morning Bryan,
Did you get a chance to confirm that Square Reader SDK is prompting for Developer Mode on Ios 16.2 versions.
If not please do so, we are at a point where we must provide a reason for not upgrading to Ios 16.2.