Mobile Integration | Documentation | CanvasPop Photo Printing API

Mobile Integration

Want to integrate Pop-up Store in your mobile application? This is the place to find out how.

iOS Library

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.

Library Preview

Current version: 1.0.4 (download)

Video

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.

Manual Installation

Installing PopUpLibLib.framework is simple.

  1. Download the repo from Github
  2. Drag PopUpLib.bundle and PopUpLib.framework into your project.

    Screenshot 1

  3. 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

    Screenshhot 2

    Screenshot 3

    Screenshot 4

    Screenshot 5

If you encounter any issues, please feel free to report them here: https://github.com/canvaspop/canvaspop-ios-library/issues

Integration

Integrating the CanvasPop iOS library into your app is very simple.

There are two main files included with the framework.

File Description
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
  1. 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:

  2. 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.

    Parameters

    • image - the image that will be printed
    • applicationKey - your partner API key
    • delegate - Any class that implements the PopupStoreControllerDelegate protocol (usually self)
  3. 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:

    Required

    Optional

    The following methods are optional and may be implemented to receive callbacks.

Support

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.

Email: api.support@canvaspop.com

Twitter: @CanvasPopApi

Looking for more information on the API itself? Check out https://developers.canvaspop.com/

Bugs

Noticed a bug in the library or documentation?

Please feel free to report any issues here: https://github.com/canvaspop/canvaspop-ios-library/issues

Manual Integration

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

  1. Complete an image handshake
  2. Load Pop-up Store via either the /loader endpoint, or the Pull API

Resources