Melange
Platform IntegrationiOS

Setup

Set up ZETIC Melange in your Xcode project.

This guide walks you through adding the ZETIC Melange SDK to your iOS project. Melange provides a unified Swift interface that handles compilation, optimization, and execution on the Apple Neural Engine automatically.

Prerequisites

  • Xcode 14 or later
  • A physical iOS device (iPhone 8 or later recommended)
  • iOS 15.0+
  • A Personal Key from the Melange Dashboard

Simulators do not have Neural Engine hardware. Always test on a physical device for accurate performance results.

Add Melange Package

We use Swift Package Manager (SPM) to automatically resolve and link the binary dependencies required for NPU acceleration.

  1. Open your project in Xcode.
  2. Go to File then Add Package Dependencies.
  3. Enter the package URL: https://github.com/zetic-ai/ZeticMLangeiOS
  4. Click Add Package.

Select Target

Link the ZeticMLange library to your specific application target:

  1. Select your target in the Add to Target column.
  2. Click Add Package.

Verify Setup

Add a simple initialization test to confirm the SDK is working:

import ZeticMLange

// Test initialization
let model = try ZeticMLangeModel(personalKey: PERSONAL_KEY, name: MODEL_NAME)

If the initialization completes without error, your setup is ready.

The initializer performs a network call on first use to download the model binary. The binary is cached locally after the first download, so subsequent initializations are fast.


Next Steps