Box iOS Preview SDK
Objective-C Ruby
Latest commit 812c062 Jan 27, 2017 @RicoYao RicoYao committed on GitHub Merge pull request #17 from box/version_1.0.3
Update to version 1.0.3

README.md

Project Status

Box iOS Preview SDK

This SDK makes it easy to present Box files in your iOS application.

Developer Setup

  • Ensure you have the latest version of XCode installed.
  • We encourage you to use Cocoa Pods to import the SDK into your project. Cocoa Pods is a simple, but powerful dependency management tool. If you do not already use Cocoa Pods, it's very easy to get started.

Quickstart

Step 1: Add to your Podfile

pod 'box-ios-preview-sdk'

Step 2: Install

pod install

Step 3: Import

#import <BoxPreviewSDK/BoxPreviewSDK.h>

Step 4: Set the Box Client ID and Client Secret that you obtain from creating a developer account

[BOXContentClient setClientID:@"your-client-id" clientSecret:@"your-client-secret"];

Step 5: Present a file

BOXFile *file = ... // A BOXFile that you retrieved through the Content SDK or Browse SDK. See the Sample Application for an example.
BOXFilePreviewController *filePreviewController = [[BOXFilePreviewController alloc] initWithContentClient:[BOXContentClient defaultClient] file:file];
[self.navigationController pushViewController:filePreviewController animated:YES completion:nil];

Using an existing Content Client to initialize a BOXFilePreviewController will create a Preview Client behind the scenes with the default caching policy. To customize caching settings, you can explicitly create a Preview Client to pass in.

Sample App

A sample app can be found in the BoxPreviewSDKSampleApp folder. To execute the sample app:

Step 1: Install Pods

cd BoxPreviewSDKSampleApp
pod install

Step 2: Open Workspace

open BoxPreviewSDKSampleApp.xcworkspace

Documentation

You can find guides and tutorials in the doc directory.

Contributing

This SDK is currently not open source. Please submit issues in GitHub to report bugs and suggest improvements.

Copyright and License

Copyright 2015 Box, Inc. All rights reserved.

Licensed under the Box Terms of Service; you may not use this file except in compliance with the License.