Forked from karlclement/PopupStoreControllerDelegate.m
Created
December 11, 2018 21:40
-
-
Save zidge/44a04d99648ea95449e5bc9ebdc8da44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)popupStoreLibWasOpened:(PopupStoreController *)lib | |
{ | |
/* | |
* Here a user has opened the Pop-up Store controller successfully | |
*/ | |
NSLog(@"Pop-up Store lib was opened"); | |
} | |
- (void)popupStoreLibUserTappedContinue:(PopupStoreController *)lib | |
{ | |
/* | |
* Here a user has tapped the continue button after the initial image handshake was completed | |
* The user will then be taken to the store with their desired image | |
*/ | |
NSLog(@"Pop-up Store user tapped continue"); | |
} | |
- (void)popupStoreWasLoadedWithImage:(PopupStoreController *)lib | |
{ | |
/* | |
* Here the web request to load Pop-up Store with a users image completed successfully | |
* A user is presented with a cart containing their image and print options | |
*/ | |
NSLog(@"Pop-up Store cart page loaded successfully with image"); | |
} | |
- (void)popupStoreLibPrintHandshakeCompleted:(PopupStoreController *)lib | |
{ | |
/* | |
* The library implements a two-step handshake documented here: https://developers.canvaspop.com/documentation/image-handshake#two-step | |
* Here the high resolution, printable version of the desired image was uploaded succesfully | |
* | |
*/ | |
NSLog(@"Pop-up Store print image handshake completed"); | |
} | |
- (void)popupStoreEventWasEmitted:(PopupStoreController *)controller withEvent:(NSString*)eventName withPayload:(NSDictionary *)payload | |
{ | |
/* | |
* Here a user has interacted with Pop-up Store and an HTML5 pushMessage() was emitted. | |
* Depending on the event, it may have an associated payload value sent along with the event name. | |
* | |
* For further details emitted events and their payloads see here: | |
* https://developers.canvaspop.com/documentation/events | |
*/ | |
NSLog(@"PopupStore event was emitted with payload"); | |
NSLog(@"Event: %@", eventName); | |
if(payload) | |
NSLog(@"Payload: %@", payload); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment