Latest 1.4.1
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Authors ,


An iOS client written in Objective-C for tus resumable upload protocol.

Pull Requests

Pull requests are always welcome! However, please submit a PR to the development branch in order to keep the master branch match up with the TUSKit pod at all times.


TUSKit is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TUSKit"

Example Project

To run the example project, clone the repo, and run pod install from the Example directory first.

The Protocol

You’ll need a friendly server before using TUSKit or any other tus client. You can find a list of tus implementations here.

Usage (1.4.0)


A NSURLSession that manages, creates, and reloads TUS uploads using a single NSURLSession and data store.

@property (strong, nonatomic) TUSSession *tusSession;
self.tusSession = [[TUSSession alloc] initWithEndpoint:[[NSURL alloc] initWithString:UPLOAD_ENDPOINT] dataStore:uploadStore allowsCellularAccess:YES];

Endpoint – An NSURL of your server.

dataStore – The TUSUploadStore you’ve created for your uploads.

allowsCellularAccess – Allow uploads over cell data.


The data storage for uploads.

TUSUploadStore * uploadStore = [[TUSFileUploadStore alloc] initWithURL:[applicationSupportURL URLByAppendingPathComponent:FILE_NAME]];

URL – URL To Local File.


Easily add uploads to your data storage using the your TUSSession.

TUSResumableUpload *upload = [self.tusSession createUploadFromFile:fileUrl retry:3 headers:@{} metadata:@{}];

fileUrl – URL To Local File.

retry – The number of times you wish the upload to retry.

Headers – An NSDictionary of your custom headers for the upload.

Metadata – Any extra metadata you wanna attach to your upload

Resume – Starts and resumes upload.

[upload resume];

Stop – Stops upload.

[upload stop];

State – Get the current state of an upload.

[upload state];


Progress Block

A block fired throughout the progress of your upload.

static TUSUploadProgressBlock progressBlock = ^(int64_t bytesWritten, int64_t bytesTotal) {
    // Update your progress bar here
    NSLog(@"progress: %llu / %llu", (unsigned long long)bytesWritten, (unsigned long long)bytesTotal);

Set it to your TUSResumableUpload object.

upload.progressBlock = progressBlock;

Failure Block

A block fired when your upload fails.

static TUSUploadFailureBlock failureBlock = ^(NSError* error){
    // Handle the error
    NSLog(@"error: %@", error);

Set it to your TUSResumableUpload object.

upload.failureBlock = failureBlock;

Result Block

A block fired when your upload is successful.

static TUSUploadResultBlock resultBlock = ^(NSURL* fileURL){
    // Use the upload url
    NSLog(@"url: %@", fileURL);

Set it to your TUSResumableUpload object.

upload.resultBlock = resultBlock;

Please refrence the Example Project for more usage examples


Users want to share more and more photos and videos. But mobile networks are fragile. Platform APIs are a mess. Every project builds its own file uploader. A thousand one week projects that barely work, when all we need is one real project, done right.

We are going to do this right. We will solve reliable file uploads for once and for all. A new open protocol for resumable uploads built on HTTP. Simple, cheap, reusable stacks for clients and servers. Any language, any platform, any network.

TUSKit is a ready to use tus client for iOS.



TUSKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "TUSKit",
    "version": "1.4.1",
    "summary": "The tus client for iOS.",
    "description": "An iOS implementation of the tus resumable video upload protocol.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "Michael Avila": "[email protected]",
        "Mark Robert Masterson": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.4.1"
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    "requires_arc": true,
    "module_name": "TUSKit",
    "module_map": "Supporting Files/module.modulemap",
    "source_files": [
        "Supporting Files/*.{h}"

Pin It on Pinterest

Share This