Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate initialize reader SDK step #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

joseph-perez
Copy link
Contributor

Hi there!

I was thinking these js hooks would be helpful in automating some of the set up for the reader SDK. Specifically step 5 in Squares docs here https://docs.connect.squareup.com/payments/readersdk/setup-ios. The js hooks will automatically add and remove the Square code needed in the AppDelegate.m file in the Cordova project.

These are the two pieces of code that are added or removed in the AppDelegate.m file.

#import <SquareReaderSDK/SquareReaderSDK.h>

[SQRDReaderSDK initializeWithApplicationLaunchOptions:launchOptions];

@craigtweedy
Copy link
Contributor

Hey @joseph-perez this looks great!

Is there a reason we'd want to go down the hooks route? In iOS we can ask to be notified when the app has launched, is there a possibility of using this within our plugin class?

I'll pull down this and give it a test either way.

@joseph-perez
Copy link
Contributor Author

Ah gotcha, I didn't know that you could be notified by setting up a notification ☹️. I gave it a shot for a while today trying to get it working that way but didn't really get anywhere with it. To be honest I don't have a lot of experience with Swift or objective-c so it could definitely be me not doing something correctly in the Swift class. Sorry about that ☹️.

For the future, if I find a bug or something like that would you want me to create an issue and then in a pull request reference the issue or just create an issue. I think I might have found a small bug that I fixed earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants