Developer Resources



The SanDisk iXpand™ is a family of storage accessories for devices running Apple’s iOS. iXpand devices enable transfer and storage of photos, music, videos and files between iPhones, iPads, PCs and Mac computers. iXpand accessories are accessible over Lightning® and USB connectors.

The SanDisk iXpand SDK enables third party application developers to access and manage iXpand devices from their own iOS applications through the Lightning interface.

The following figure shows the high level architecture for applications developed on the iXpand SDK:

Figure 1 High Level Block Diagram


The iXpand SDK contains two sets of APIs:

File system APIs provide familiar filesystem API to the iXpand device for managing storage releated software operations. System APIs provide access to administration functionality not directly related to storage.

The iXpand SDK is available as an iOS framework file. A developer needs to include the framework and header files within the the target application’s source tree for successful integration.

The following diagram shows the concepts explained above:

Figure 2 Conceptual Block Diagram

Modules Overview

In order to access iXpand SDK, developers must first initialize “iXpandSystemController" and "FileSystemController" respectively. All system APIs are accessible as part of "iXpandSystemController" and file system APIs are accessible over “FileSystemController”.

To initialize the iXpand, "iXpandSystemController" instance is created first followed by calling "initDrive" and "OpenSession". When "OpenSession" is completed, iXpand is ready to communicate. Instances of "FileSystemController" can be created to deal with File System APIs. When all operations with iXpand device are completed, the application can close communication with the device using "closeSession" API.


Include the “iXpandSDK.framework” along with other libraries that your application requires.

Figure 3 Adding Library

In the application code, include the following headers to allow access to the APIs:

        #import <iXpandSDK/iXpandFileSystemAPI.h>

        #import <iXpandSDK/iXpandSystemAPI.h>


The code snippet below shows how to initialize the iXpand drive:

if (![[iXpandSystemController sharedController] initDrive:accessory]) {           
            dispatch_sync(dispatch_get_main_queue(), ^{
                [self.consoleString appendString:@"Drive Initialisation failed"];
                [self updateConsole];
     } else {
    If( [[iXpandSystemController sharedController] openSession]) {
         // iXpand is successfully opened

The following code snippet shows an example of opening a file and writing to iXpand:

If([[iXpandFileSystemController sharedController]
            Int handle = [[iXpandFileSystemController sharedController]
            openFileAbsolutePath:path openMode:mode];
            if (handle != -1)
                       uint32_t dataLength = 0;
                       uint32_t uintDataSize = 0;
                       uint32_t uintDataTranLen = 0;
                       uintDataSize = (uint32_t)[self returnFileSize:test0];
                        while((dataLength != -1) && (uintDataSize != 0))
                                   @autoreleasepool {
                                         uintDataTranLen =
            ((uintDataSize > MAX_DATABUFFER) ? MAX_DATABUFFER : uintDataSize);
                              [[fileHandle readDataOfLength:uintDataTranLen] getBytes:byDataBuf];
                             NSData *aData = [NSData dataWithBytes:byDataBuf length:sizeof(byDataBuf)];
                             dataLength = [[iXpandFileSystemController sharedController] writeFile:handle writeBuf:aData writeSize:uintDataTranLen];
                             uintDataSize -= dataLength;
                  [[iXpandFileSystemController sharedController] closeFile:handle];
                       [fileHandle closeFile];

The following code snippet shows closing a session with iXpand after a file operation is done:

[[iXpandSystemController sharedController] closeSession];


iXpand doesn’t generate thumbnails and metadata information of media files. The developer will need to create or use a Third party application or library to render thumbnail and metadata if required.

NOTE: The iXpand accessory doesn’t protect application specific files.

The application developer has the flexibility to organize iXpand files in any manner as intended.

We recommend you call iXpand File system APIs from a non-UI thread to offer a better user experience.



Visit our Downloads page to get the iXpand SDK **. You'll learn how the iXpand SDK can benefit your app with the extension, transfer, and repository capabilities of external storage. The SDK includes a sample app that shows how to initiate & close session with the iXpand device, and performs file operations for Read, Write, and Delete.







** iXpand downloads require a free Developer Portal account - click here to register




Do more with the
iXpand SDK

Click the buttons below to visit the iXpand Developer Home & Workflow pages



Get started, access the SDK, build your apps, & learn more

View Home


Register & submit your app for review and contact support

View Workflow