Swiftpack.co -  Package - highmobility/auto-api-swift
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
📱 AutoAPI Swift lib - the parsing library for the Auto API vehicle data model
.package(url: "https://github.com/highmobility/auto-api-swift.git", from: "12.0.0")

AutoAPI Swift SDK

The AutoAPI Swift SDK purpose is to help developers serialise AutoAPI data in Swift, so they wouldn't have to worry about parsing and generating the bytes themselves. The SDK is generated based on the AutoAPI spec.

Table of contents


Serialising: The library is designed to serialise AutoAPI data to and from Swift types.

Support for Updates: Updates to the AutoAPI spec (non-binary) will work with older versions of the library and the new types of data are accessible.


The library is distributed as a Swift Package, allowing it to be used with Xcode's built-in SPM or directly in a Package.swift.

For using the package through Xcode, it can be added in File > Swift Packages > ... or going to project settings and selecting Swift Packages in the top-center.
When targeting a Swift package, the Package.swift file must include .package(url: "https://github.com/highmobility/auto-api-swift", .upToNextMinor(from: "[__version__]")), under dependencies.


AutoAPI Swift SDK requires Xcode 11.0 or later and is compatible with apps targeting iOS 10.0 or above.

Getting started

Get started by reading the iOS AutoAPI guide in high-mobility.com.

Check out the spec for more details on the structure and logic, or some other libs generatated on that spec: Android, Elixir.


There are 3 sample apps available on Github.com to showcase usage of AutoAPI (and HMKit):

  • Scaffold
    • Demonstrates the most basic usage of AutoAPI.
  • Data Viewer
    • Tries to parse and show the AutoAPI data received from a vehicle. Limited functionality to send commands.
  • AutoAPI Explorer
    • Incorporates all the "abilities" of the previous sample apps along with more commands to send to the vehicle and takes a shot at a nice(r) UI.


We would love to accept your patches and contributions to this project. Before getting to work, please first discuss the changes that you wish to make with us via GitHub Issues, Spectrum or Slack.

The generator used to create this lib, based on the AutoAPI spec, will be open-sourced in the near future. Until then, changes to the Swift interface need to go through our private generator. If you'd like to make changes to the AutoAPI, please see here.

Releases are done by tagged commits (as required by SPM, please read more about it here and here).

See more in CONTRIBUTING.md


This repository is using MIT license. See more in LICENSE


Stars: 1
Last commit: 3 weeks ago

Release Notes

12 weeks ago

New AutoAPI level 12 binary-to-swift and back parser.

  • This library is now only distributed as a Swift Package which is also the main recommended way of using/integrating it.
  • Most notable change from previous L11 is the AutoAPI being able to convey unit-information for different values
    • properties (and sub-values), that express a measurement, output Measurement<UnitType> now instead of just a decimal number, i.e. engine_power or odometer.
  • Some properties have been deprecated (with a reference to the new property) and a boatload of new ones is added (including new capabilities).
  • Each property now has an availability component that can be fetched with the corresponding getter in a capability.

For more details regarding new datapoints and other changes, please see the source. The protocol changes from L11 to L12 can be seen here.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco