Last updated: May 29, 2024

<span aria-hidden="true" id="announcing-our-new-ios--macos-sdk-transloaditkit"></span>

# Announcing our new iOS & macOS SDK: TransloaditKit

![Mark Masterson](/assets/images/teammates/mark.jpg?dpl=dpl_EgVneLSpgfLPyuLUzfbHZX9Uye4a)

**Mark Masterson**

iOS & macOS developer · Los Angeles, California, USA · Show bio

[](https://github.com/MMasterson)

There is a yet another new new SDK in town! This time around, it's the iOS/macOS SDK. Written completely in Objective-C, yet supporting Objective-C and Swift - this SDK is set to be the new standard for iOS and macOS. With the release of version `1.0.0`, it supplies basic Transloadit functionality while utilizing `tus` style uploads. Further updates are also already in the works to fully support all of what Transloadit has to offer.

![The Apple logo, with a silhouette of Steve Jobs' head on the right side.](/_next/static/immutable/media/opengraph-image.0csbnecrv05j-.jpg)

It's very easy to start using Transloadit for Objective-C and Swift, using CocoaPods. Here are a few simple steps you'll have to take:

1. Simply add `'Transloadit'` to your Podfile
2. Run `pod install`
3. Add your Transloadit keys to your `Info.plist` file

```xml
	<key>TRANSLOADIT_KEY</key>
	<string>YOUR_TRANSLOADIT_KEY</string>
	<key>TRANSLOADIT_SECRET</key>
	<string>YOUR_TRANSLOADIT_SECRET</string>

```

1. Be sure to import Transloadit on the pages where you need it

Objective-C:

```objectivec
#import "Transloadit.h"

```

Swift:

```swift
// Due to Swift being unable to handle non-modular headers, TransloaditKit currently requires a dependency while running on Swift
import Arcane
import TransloaditKit

```

And that's it, you're all set!

<span aria-hidden="true" id="a-quick-example-of-creating-an-assembly"></span>

## A quick example of creating an Assembly

First, you'll have to create an Assembly Step:

Objective-C:

```objectivec
// Assembly Steps
NSMutableArray<Step *> *steps = [[NSMutableArray alloc] init]; // An array to hold the Steps
Step *step1 = [[Step alloc] initWithKey:@"encode"]; // Create a Step object
[step1 setValue:@"/image/resize" forOption:@"robot"]; // Add the details
[steps addObject:step1]; // Add the Step to the array

```

Swift:

```swift
// Assembly Steps
var AssemblySteps: Array = Array<Step>() // An array to hold the Steps
var Step1 = Step (key: "encode") // Create a Step object
Step1?.setValue("/image/resize", forOption: "robot") // Add the details
AssemblySteps.append(with: Step1) // Add the Step to the array

```

And then we create the Assembly itself

Objective-C:

```objectivec
// We then create an Assembly object with the Steps and files
Assembly *TestAssemblyWithSteps = [[Assembly alloc] initWithSteps:steps andNumberOfFiles:1];
[TestAssemblyWithSteps addFile:fileUrl]; // Add the file

[transloadit createAssembly:TestAssemblyWithSteps]; // Create the Assembly

```

Swift:

```swift
// We then create an Assembly object with the Steps and files
var TestAssembly: Assembly = Assembly(steps: AssemblySteps, andNumberOfFiles: 1)
TestAssembly.addFile(fileURL) // Add the file

Transloadit.createAssembly(TestAssembly) // Create the Assembly


```

And now for our blocks!

Objective-C:

```objectivec
// Blocks
// This block fires after the creation of your Assembly
transloadit.assemblyCompletionBlock = ^(NSDictionary* completionDictionary){
  [TestAssemblyWithSteps setUrlString:[completionDictionary valueForKey:@"assembly_ssl_url"]]; // Set the URL for your Assembly so the file knows where to go
  [transloadit invokeAssembly:TestAssemblyWithSteps]; // Starts the Assembly
  [transloadit checkAssembly:TestAssemblyWithSteps]; // Ping the status of your Assembly
};

// Fires after your Assembly has completed
transloadit.assemblyStatusBlock = ^(NSDictionary* completionDictionary){
  NSLog(@"%@", [completionDictionary description]);
};

```

Swift:

```swift
Transloadit.assemblyCompletionBlock = {(_ completionDictionary: [AnyHashable: Any]) -> Void in
/*Invoking the Assembly inside the completion block is NOT required, however, for the sake of a small UI it is advisable. In order to do so, we will need to add the URL to the Assembly object so that when we do invoke it, it knows where to go.*/
  TestAssemblyWithSteps.urlString = completionDictionary.value(forKey: "assembly_ssl_url")
  Transloadit.invokeAssembly(TestAssembly) // Starts the Assembly
  Transloadit.checkAssembly(TestAssembly)
}

// Fires after your Assembly has completed
transloadit.assemblyStatusBlock = {(_ completionDictionary: [AnyHashable: Any]) -> Void in
  print("\(completionDictionary.description)")
}

```

And that's it for basic usage! As always, we encourage the community to help us improve, grow and expand the experience of our SDKs.

You can find more information over at our [docs](/docs/sdks/transloaditkit.md) and the[GitHub Page⁠](https://github.com/transloadit/TransloaditKit/).

[#integrations](/blog/tags/integrations.md)[#ios-sdk](/blog/tags/ios-sdk.md)

### 👩‍💻 Join 20k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Your email:

Get access

## File uploading and encoding. Made simple.

Transloadit streamlines file handling for developers, trusted by brands like Coursera and The New York Times. We’re known for a reliable API, top-notch support, and a strong commitment to open source, with projects like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io) setting standards in file processing.

[Sign up](/c/)[Book a Demo](https://survey.typeform.com/to/kRg47Xi5)

No credit card needed

Cancel anytime
