Releasing the Box Preview SDK for iOS

At Box Dev, our annual developer conference, we announced several mobile SDKs to help developers enable content access, browsing, and sharing within their apps. The Box Mobile SDKs were designed to allow you to quickly integrate key Box functionality when you need it and remove tedious development work out of building enterprise apps.

Today, we're announcing that our Preview SDK is available for iOS to help you create powerful content experiences in your iOS apps. You can check out the SDK on GitHub.

The Box Preview SDK allows you to leverage Box's powerful preview technology with just a few lines of code. Now, you can securely preview files from Box and provide a rich, interactive experience for more than 120 file types, including 3D files and DICOM images, right in your apps using our best-in-class UI.

As we open the SDK to developers, we can only imagine some of the ways it might be used:

  • A healthcare app that allows physicians to review X-ray scans with a patient with DICOM preview.
  • An insurance app that allows claims adjusters to evaluate PDF documents and accident photos right in the app.
  • An education app that allows teachers to show lesson slides in PowerPoint quickly from a tablet.

Using the Preview SDK in iOS

After adding the SDK to your podfile and importing the SDK, you can quickly retrieve a Box file using our Content or Browse SDK. Then the BOXFilePreviewController will create a Preview Client and present the file in your app.

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];

Behind the scenes, our Preview Caching will cache content, previews, and thumbnails in the local file system, significantly reducing load times for users. By default, files up to 1 GB will be cached for 90 days. To customize caching settings, you can explicitly create a Preview Client to pass in.

We can't wait to see what you build with our mobile SDKs, and welcome your feedback along the way. You can reach us on Twitter at @BoxPlatform, look for an answer on Stack Overflow, or contact us.

Tags: preview, mobile, ios, sdk