Want to integrate Pop-up Store in your mobile application? This is the place to find out how.
The iOS library helps you integrate our Photo Printing API in less than half an hour! Follow the instructions provided below to integrate the library within your iOS application. The library is universal and works on both iPhone and iPad devices.
Once a print is purchased within your application, our designers can turn any image into a big beautiful piece of art. We print, package, and ship all orders with love directly to your customers.
Current version: 1.0.4 (download)
Installation via Cocoapods
Installing the library is simple and should only take a few minutes. This may be done manually or via cocoapods.
Add the following to your Podfile:
Run pod install
This will give you all of the necessary files to begin integrating our photo printing API. For next steps, see the section on 'Integration' below.
Installing PopUpLibLib.framework is simple.
- Download the repo from Github
Drag PopUpLib.bundle and PopUpLib.framework into your project.
In the Build Phases tab of your app's Target, under the "Link Binary With Libraries" section, hit the add button and add: MobileCoreServices.framework, CFNetwork.framework, SystemConfiguration.framework, libz.dylib
If you encounter any issues, please feel free to report them here: https://github.com/canvaspop/canvaspop-ios-library/issues
Integrating the CanvasPop iOS library into your app is very simple.
There are two main files included with the framework.
|PopUpLib.h||The file you include in your project i.e. #import <PopUpLib/PopUpLib.h>|
|PopUpStoreController.h||The view controller you will need to initiate and present|
Choose where your users will launch the Pop-up Store Controller. Inside the header file for your controller, add #import <PopUp/PopUpLib.h> and implement the PopupStoreControllerDelegate protocol:
- At the desired time (e.g. tapping a button, after taking/editing a photo), instantiate a PopupStoreController. If one was created successfully (i.e. the call did not return nil), present the Pop-up Store controller.
- image - the image that will be printed
- applicationKey - your partner API key
- delegate - Any class that implements the PopupStoreControllerDelegate protocol (usually self)
Implement the PopupStoreControllerDelegate protocol. There are currently six delegate methods; one that is required and five that may be optionally implemented. They are as follows:
The following methods are optional and may be implemented to receive callbacks.
We're always happy to help out with code or any other questions you might have. It's important to us that you are able to get PopUp Store integrated into your application as quickly and smoothly as possible.
Looking for more information on the API itself? Check out https://developers.canvaspop.com/
Noticed a bug in the library or documentation?
Please feel free to report any issues here: https://github.com/canvaspop/canvaspop-ios-library/issues
To integrate Pop-up Store into your mobile application you'll need to send the desired image via one of the image handshake APIs.
Once the handshake is completed, you may open a web view using the
/loader endpoint. The displayed store is a fully responsive site, complete with events that are emitted to allow you
to keep track of user interactions.
Steps to implement
- Complete an image handshake
- Load Pop-up Store via either the
/loaderendpoint, or the Pull API