square / reader-sdk-ios-quickstart

Reader SDK Quick Start Sample iOS App
https://developer.squareup.com/docs/reader-sdk/quick-start/start
Apache License 2.0
23 stars 4 forks source link

Is there Objective C version ? #2

Closed maulikpat closed 6 years ago

maulikpat commented 6 years ago

Is there Objective C version ?

StephenJosey commented 6 years ago

Unfortunately, there is not an Objective C quick start at this time.

maulikpat commented 6 years ago

@StephenJosey I mean for SquareReaderSDK.framework ? Also in this sample framework is missing in project file.

StephenJosey commented 6 years ago

Sorry, I misunderstood. The Reader SDK Reference docs shows both Objective C and Swift functions: https://docs.connect.squareup.com/api/reader/ios/

As for the project file, do you mean the project.pbxproj file shown here (https://github.com/square/reader-sdk-ios-quickstart/tree/master/ReaderSDKSample.xcodeproj)? For instructions on using this sample, please see: https://docs.connect.squareup.com/payments/readersdk/quickstart

maulikpat commented 6 years ago

@StephenJosey I downloaded this sample but couldn't compile it. As SquareReaderSDK.framework is missing.

screen shot 2018-08-22 at 10 28 49 pm

Also thanks for : https://docs.connect.squareup.com/api/reader/ios/Classes/SQRDReaderSDK.html

Can you please tell me from where I download this SquareReaderSDK.framework for Objective C ?

StephenJosey commented 6 years ago

Did you install ReaderSDK from Step 2 from the previous link I provided? It tells you how to install the Square ReaderSDK framework. The "Quick Start" guide on our doc site takes you through the steps of getting the sample to work. https://docs.connect.squareup.com/payments/readersdk/quickstart/page2

The framework works with both Swift and Objective C, there is not a separate download that you need to do. Refer to the link I provided earlier on how to call Objective C functions.

maulikpat commented 6 years ago

@StephenJosey ok so I can only download sdk using terminal with curl right ?

screen shot 2018-08-23 at 12 15 39 pm

Sorry I was thinking to download from git hub same as POS SDK.

Thanks for help. I will explore new reader sdk as it now allows to take payments within the app and no need to open POS app from Sqaure.

StephenJosey commented 6 years ago

No worries, and that is correct @maulikpat ! Glad you're able to explore our Reader SDK, but please don't hesitate to let us know if you have any other questions or concerns.

maulikpat commented 6 years ago

@StephenJosey One more question Can I test payment from India ? My account is created from USA only. POS SDK is not allowing this due to location service must be enable.

StephenJosey commented 6 years ago

@maulikpat unfortunately, sandbox is not supported in our POS API nor our Reader SDK, and thus must be used in one of our supported countries.

maulikpat commented 6 years ago

@StephenJosey I am ok with real transections. Is it doable ?

StephenJosey commented 6 years ago

Sorry for the confusion - no, there is no way to test in India with the POS API or Reader SDK currently.

maulikpat commented 6 years ago

:( ok thanks for help.

maulikpat commented 6 years ago

@StephenJosey any chance for Objective C version for demo ?

StephenJosey commented 6 years ago

Still no Objective C version, unfortunately. If you need to know about the functions, please check out the Reader SDK Technical Reference: https://docs.connect.squareup.com/api/reader/ios/index.html. It includes both Swift and Objective C.

maulikpat commented 6 years ago

@StephenJosey one more thing regarding framework downloading, I have more than 10 clients with square account so do I need to download separate framework for each by passing app ID and passwords ? or I can use same framework for all ?

StephenJosey commented 6 years ago

If you plan on more than yourself using this application, you will need to look into OAuth so that they can allow your application to have access to their Square accounts: https://docs.connect.squareup.com/basics/oauth/overview

maulikpat commented 6 years ago

No what I mean is, 1 application with 1 square account. Same app with another client's square account configured. So do I need to have separate framework download using cURL or same framework can be used for another client with their own credentials.

StephenJosey commented 6 years ago

You say "another client's square account", so you mean more than one Square account will be using your application, right? If so, you will need to use OAuth as I mentioned above. It will ask them to sign in to their Square account and give your application access to their account. Each Square account will have their own OAuth access token which you will utilize.

maulikpat commented 6 years ago

There will be separate app for each client. There wont be any case like same app with multiple client account setups. So same framework will be used or need to follow this : https://github.com/square/reader-sdk-ios-quickstart/issues/2#issuecomment-415310194 for each client ?

StephenJosey commented 6 years ago

I'm sorry, but I don't seem to be following. If you've created one single application and will be installing it on multiple devices, you do not need to re-download the framework. So depending on what you're actually trying to do, please review the following:

  1. If you plan on having the same application installed on multiple devices with the same Square account logged in all devices, then there's nothing else you need to do.

  2. If you plan on having the same application installed on multiple devices with different Square accounts logged in, then you will need to use OAuth as I mentioned previously.

  3. If you're truly creating a new application (you mentioned "separate app") for every device, then yes, you would need to re-download the SDK for every application you create, but I don't believe this is what you actually mean.

maulikpat commented 6 years ago

3rd one is what I mean. I have my product and I am giving to my clients with their Square account. These apps will have different bundle IDs as well. So apps will be separate for each client.

StephenJosey commented 6 years ago

OK, in that case, you will need to re-download the framework for each one. Just to reiterate, though, if the application is identical in functionality, OAuth would be the easier and more secure route.

Please let me know if you have additional questions.

maulikpat commented 6 years ago

@StephenJosey thanks for answering all my questions. I will have questions for different areas as I have implemented Reader SDK and testing.