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.
This document describes the various points at which the SDK can be launched into.
This is the most common way of launching the SDK. The user is able to select a product to customise and purchase from a range of product groups ranging from phone cases to magnets.
[OLKitePrintSDK setAPIKey:@"19622ec7352a63a21700ea0323590f617bf380fe" withEnvironment:kOLKitePrintSDKEnvironmentSandbox];
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];
If you only want to present a subset of products (or an individual product) to the user for purchase then use this method. If you filter by just a single product then the user journey will begin at the "detail" screen for that product.
[OLKitePrintSDK setAPIKey:@"19622ec7352a63a21700ea0323590f617bf380fe" withEnvironment:kOLKitePrintSDKEnvironmentSandbox];
OLKiteViewController *vc = [[OLKiteViewController alloc] initWithAssets:@[[OLAsset assetWithURL:[NSURL URLWithString:@"http://psps.s3.amazonaws.com/sdk_static/4.jpg"]]]];
vc.filterProducts = @[@"stickers_square"];
[self presentViewController:vc animated:YES completion:NULL];
If you're handling the product selection/creation journey within your own app it's possible to use the SDK just to accept payment on your behalf and place the order with Kite
[OLKitePrintSDK setAPIKey:@"REPLACE_WITH_YOUR_API_KEY" withEnvironment:kOLKitePrintSDKEnvironmentSandbox];
OLPrintOrder *order = [[OLPrintOrder alloc] init];
OLAsset *frontImage = [OLAsset assetWithURL:[NSURL URLWithString:@"http://psps.s3.amazonaws.com/sdk_static/4.jpg"]];
[order addPrintJob:[[OLPostcardPrintJob alloc] initWithTemplateId:@"postcard" frontImageOLAsset:frontImage message:@"Hello World" address:[OLAddress kiteTeamAddress]]];
OLKiteViewController *vc = [[OLKiteViewController alloc] initWithPrintOrder:order];
[self presentViewController:vc animated:YES completion:NULL];