iOS Print SDK. Easily add print on demand functionality to your app within minutes! Print Postcards, Magnets, Photo Prints, Posters, Stickers, T-Shirts, PhotoBooks, etc.
Objective-C C HTML CSS Ruby JavaScript

README.md

iOS SDK

Kite

Circle CI Platform CocoaPods Compatible Carthage compatible Twitter

The Kite SDK makes it easy to add print on demand functionality to your app.

Harness our worldwide print and distribution network. We'll take care of all the tricky printing and postage stuff for you!

To get started, you will need to have a free Kite developer account. Go to kite.ly to sign up for free.

Products

Use our SDK to unlock hidden revenue streams and add value for your users. In under ten minutes you could be selling:

  • Magnets
  • Polaroid Style Prints
  • Square Prints
  • Postcards
  • Frames
  • A4 (invoices, letters, etc)
  • Large Format Posters (A3, A2, A1)
  • Square and Round Stickers
  • T-Shirts & other Apparel
  • Phone Cases
  • New products being added monthly

Features

  • Print a wide variety of products on demand
  • Dynamic & realtime control over the pricing of products in your app pricing using our web Developer Dashboard
  • Revenue & order volume analytics available in the web dashboard
  • Review, refund or reprint any order within the web dashboard
  • Localized currency support
  • Worldwide address search & lookup
  • No server infrastructure required. We can handle everything for you from processing payments to printing & postage
  • Your branding not ours. You can create your own custom checkout & payment UI or customize ours

Requirements

  • Xcode 8
  • iOS 8.0+ target deployment

Installation

The recommended approach for installing is via the CocoaPods, however we also support Carthage and adding the SDK via git submodules.

CocoaPods

CocoaPods is a dependency manager for iOS, which automates and simplifies the process of using 3rd-party libraries like the Kite SDK in your projects. If you're using it just add the following to your Podfile:

pod "Kite-Print-SDK"
pod 'PayPal-iOS-SDK/Core', '~> 2.12.5'

#Uncomment these lines if you want Facebook photo picking support
#pod 'FBSDKCoreKit', '~> 4.16.0'
#pod 'FBSDKLoginKit', '~> 4.16.0'

#Uncomment the following line if you want Apple Pay support
#pod 'Stripe', '~> 8.0.6'

If you'd like to offer your users the opportunity to add photos via Instagram or Facebook then uncomment the appropriate lines above and follow the instructions to Enable Facebook & Instagram Photo Selection.

You can also provide your own photo source (for example from within your app or a custom back end). Please read the documentation here.

PayPal functionality is also optional although recommended as you'll typically see a higher conversion rate with it.

Carthage

Carthage is another dependency manager for iOS, which automates and simplifies the process of using 3rd-party libraries like the Kite SDK in your projects. If you're using it just add the following to your Cartfile:

github "OceanLabs/iOS-Print-SDK"
github "paypal/PayPal-iOS-SDK"

#Uncomment the following line if you want Apple Pay support
#github "stripe/stripe-ios" ~> 8.0.6

Git submodules

See our Git submodule installation guide

Quick Integration

We really mean it when we say integration can be done in minutes.

  • Step 1: Import the SDK

Objective-C:

#import <OLKitePrintSDK.h>

Swift:

import KiteSDK
  • Step 2: Set the API key and the environment:

Objective-C:

[OLKitePrintSDK setAPIKey:@"YOUR_API_KEY" withEnvironment:kOLKitePrintSDKEnvironmentLive]; //Or kOLKitePrintSDKEnvironmentSandbox for testing

Swift:

OLKitePrintSDK.setAPIKey("a45bf7f39523d31aa1ca4ecf64d422b4d810d9c4", with: .live) //Or .sandbox for testing
  • Step 3: Create and present Kite:

Objective-C:

OLKiteViewController *vc = [[OLKiteViewController alloc] initWithAssets:@[[OLAsset assetWithURL:[NSURL URLWithString:@"http://psps.s3.amazonaws.com/sdk_static/4.jpg"]]]];
[self presentViewController:vc animated:YES completion:NULL];

Swift:

let kiteViewController = OLKiteViewController.init(assets: [OLAsset(url: URL(string: "http://psps.s3.amazonaws.com/sdk_static/4.jpg"))])
present(kiteViewController!, animated: true, completion: nil)
  • Step 4:: πŸŽ‰ProfitπŸŽ‰

πŸ’°πŸ’΅πŸ’ΆπŸ’·πŸ’΄

iOS Security (ATS)

iOS includes a security feature called App Transport Security. In order to connect to the Kite servers you will need to add some exceptions to your project's info plist file. We need to add forward secrecy exceptions for Amazon S3 (which Kite uses) and PayPal (optional). The following is what you need to copy your app's info plist:

    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>paypal.com</key>
            <dict>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
            <key>amazonaws.com</key>
            <dict>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>

There are a few more entries to add if you opt for Facebook and Instagram integration as mentioned above. More info here.

Use Cases

The Print SDK supports two primary use cases: Kite Print Shop Experience, and Custom User Experience.

Kite Print Shop User Experience

Kite

The Kite SDK includes a robust product selection, photo editing and payment experience that's proven to convert well with users. It can take care of everything for you, no need to spend time building any user interfaces.

This is the quickest approach to integration and perfect if you don't want to spend a great deal of time building a custom experience. You can be up & running within minutes!

To use our Print Shop experience:

  1. Create and present (or push) an OLKiteViewController passing it an array of photos, we'll do the rest.
  2. Register your payment details with us so that we can pay you when your users place orders

Custom User Experience

You can build your own UI if you don't want to use or customize the provided Print Shop experience. You can still use the Print SDK to handle the print order creation and submission:

  1. Create a print order representing the product(s) you wish to have printed and posted
  2. Set the shipping address to which the order will be delivered
  3. Take payment from the user for the order and submit it to our servers for printing and posting
  4. Register your payment details with us so that we can pay you when your users place orders

Credentials & Environments

Your mobile app integration requires different API Keys values for each environment: Live and Test (Sandbox).

You can find these Kite API credentials under the Credentials section of the development dashboard.

Sandbox

Your Sandbox API Key can be used to submit test print orders to our servers. These orders will not be printed and posted but will allow you to integrate the Print SDK into your app without incurring cost. During development and testing you'll primarily want to be using the sandbox environment to avoid moving real money around. To test the sandbox payment you can use your own PayPal sandbox account or contact us at hello@kite.ly

When you're ready to test the end to end printing and postage process; and before you submit your app to the App Store, you'll need to swap in your live API key.

Live

Your Live API Key is used to submit print orders to our servers that will be printed and posted to the recipient specified. Live orders cost real money. This cost typically passed on to your end user (although this doesn't have to be the case if you want to cover it yourself).

Logging in to our Developer Dashboard allow's you to dynamically change the end user price i.e. the revenue you want to make on every order. Payment in several currencies is supported so that you can easily localize prices for your users. The dashboard also provides an overview of print order volume and the money you're making.

ApplePay

See our ApplePay setup documentation if you want to enable checkout via ApplePay.

Push Notifications

Push notifications are a powerful marketing tool that if used effectively can increase both user engagement and customer life time value by driving more sales within your application. Kite supports sending push notifications to your customers, see our Push Notification setup documentation.

SDK Entry Points

Depending on your use case you might want to launch to a specific product, or even bypass the product selection/creation process entirely and jump straight to the checkout/payment journey. See our SDK entry point documentation for more details.

Documentation

  • These docs in the SDK, which include an overview of usage, step-by-step integration instructions, and sample code
  • The sample app included in this SDK
  • Header files are thoroughly documented; refer to them as needed for extra details about any given property or parameter
  • The Kite Print API & SDK Developer Docs, which cover error codes and optional server-side integration instructions

Print API

We also have a REST print API for those who prefer to invent wheels :)

Migration from Kite SDK v5.x.x

We have made significant changes under the hood. Please see the Migration Documentation for any public-facing changes that might affect you.

HP Print SDK

You can optionally offer print-at-home functionality by enabling the HP Print SDK, which will integrate it nicely within the Kite SDK. Please see here for details.

License

Kite iOS Print SDK is available under a modified MIT license. See the LICENSE file for more info.