Skip to content
iOS framework for
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Carthage/Build Release for version 4.0.2 May 28, 2019
frameworks Release for version 4.0.2 May 28, 2019
images Release for version 4.0.0 May 24, 2019
.gitignore Adds gitignore May 28, 2019
LICENSE Release for version 4.0.0 May 24, 2019 Release for version 4.0.2 May 28, 2019 Release for version 4.0.2 May 28, 2019
skafos.podspec Release for version 4.0.0 May 24, 2019


Skafos is the tool for deploying machine learning models to mobile apps and managing the same models in a production environment. Built to integrate with any of the major cloud providers, users can utilize AWS, Azure, Google, IBM or nearly any other computational environment to organize data and train models. Skafos then versions, manages, deploys, and monitors model versions running in your production application environments


  1. Sign up for Skafos account at Skafos
  2. Create a ML project using Skafos dashboard at Quickstart
  3. Configure your app to use Skafos, including enable background updates via push notifications.


CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Skafos into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'Skafos', '~> 4.0.2'


Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Skafos into your Xcode project using Carthage, specify it in your Cartfile:

github "skafos/ios" "4.0.2"


Inside your app delegate, add the following:

import Skafos

Then configure the framework with your project token:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  // ...

  Skafos.initialize("your project token")

  return true

Now you are all set to call Skafos and ask it to load your model.

Skafos.load("your asset name") { (error, asset) in
  if let error = error {
    print("Oh man, an error: \(error)")


  if let model = asset.model {
    self.classifier.model = model

  for file in asset.files {
    print("File name: \( and path: \(file.path)")

  // And if you have multiple MLModels you can always loop through those too:
  for model in asset.models {
    print("Model name: \(, path: \(model.path), and model itself: \(model.model)")

Note: Swizzle is enabled by default, if you chose to disable swizzle, add swizzle: false to your initialize function and add the following to your app delegate:

 func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
    Skafos.application(application, performFetchWithCompletionHandler: completionHandler)

  func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) {
    Skafos.application(application, handleEventsForBackgroundURLSession: identifier, completionHandler: completionHandler)


Skafos swift framework uses the Apache2 license, located in the LICENSE file.


Contact us by email, or by twitter @skafos.

You can’t perform that action at this time.