Skip to content

siddharthsuneel/box-ios-preview-sdk

 
 

Repository files navigation

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.

About

Box iOS Preview SDK

Resources

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.pdf

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 71.6%
  • Ruby 28.4%