Swiftpack.co - Package - highmobility/hm-auto-api-swift

What is in this repository

AutoAPI parsing source code in Swift, that can be made into a framework by swift build (macOS and Linux only), or through Xcode. Using the latter allows additionally to build for iOS, tvOS or watchOS.

In addition, if using this as a dependency with Swift Package Manager, the suitable architecture is handled by Xcode.

Lastly, there's a command-line parser for quickly debugging AutoAPI data.

Framework Usage

For iOS, it's recommended to build the universal framework - thus enabling running on a simulator as well.
There's an AppStoreCompatible.sh script for thinning the framework before submission to iTC.

For macOS and Linux, executing swift build and using the product is recommended (use the --show-bin-path option to get the output path).

For other Apple platforms, the universal framework can be made with lipo from Xcode's simulator and device products. When creating a universal one, the module maps need to be copied as well.

For details on the API itself, please see the documentation.

Parser Usage

Simply execute ./AutoAPICLT [input] on the command-line.

Input can be in hex, base64 or "scrambled" (see the flags).
The parser outputs only what it was able to understand.

Flags:
-b64: input is in Base64 instead
-dc: input is like in Developer Center examples
-ep: expand properties

screenshot

Github

link
Stars: 0
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

7.3.3 - Mar 18, 2019

Added multi state response to MultiCommand.

10.0.1 - Mar 11, 2019

Fixed AACapability's debugging property .debugTree: HMDebugTree to parse the new L10 properly.

10.0.0 - Feb 25, 2019

Rewritten property-capability-command architecture.

  • Properties are wrapped in a new type AAProperty, with it's main accessors:
    • .value: ValueType?
    • .failure: AAPropertyFailure?
    • .timestamp: Date?
  • AACapability renamed to AACapabilityValue:
    • It's .command renamed to .capability
  • AACommand rewritten and renamed to AACapability:
    • Also conforms to AACapabilityClass
  • Outgoing commands' methods return a rewritten type AACommand (used to return [UInt8]):
    • Has .bytes accessor for getting the data to send
  • Percentage changed from UInt32 (0-100 value) to Double (0.0-1.0 value).

9.0.0 - Jan 3, 2019

Removed:

  • All legacy types.

New:

  • AAPropertyFailure type to convey that getting a property failed.

Added:

  • AAFueling

    • .gasFlapLockState: AALockState?
    • .gasFlapPosition: AAPositionState?
  • AALights

    • .fogLights: [AAFogLight]?
    • .readingLamps: [AAReadingLamp]?
    • .interiorLamps: [AAInteriorLamp]?
    • .controlLights(... fogLights: [AAFogLight]?, readingLamps: [AAReadingLamp]?, interiorLamps: [AAInteriorLamp]?)
  • AAMultiCommand

    • .states: [AAVehicleState]? – returned when a multi-command is sent.

Updated:

  • AADoorLocks

    • .insideLocks: [AADoorLock]?
    • .locks: [AADoorLock]?
    • .positions: [AADoorPosition]?
  • AAFailureMessage

    • .reason: AAFailureReason?
  • AAFueling

    • .controlGasFlap(lockState: AALockState?, position: AAPositionState?) – renamed.
  • AALights

    • .frontExterior: AAFrontLightState?

7.3.2 - Dec 3, 2018

New:

  • MultiCommand for sending multiple commands at the same time

Added:

  • Diagnostics
    • .mileageMeters: UInt32?