SAPMLModel

public struct SAPMLModel

SAPMLModel specifies the model that needs to be distributed from Mobile Services. SAPMLModel encapsulates model properties such as name, version, URL of the model. SAPMLModelManager APIs take SAPMLModel instances to download, delete and list downloaded models.

  • Name of the Core ML model

    Declaration

    Swift

    public let name: String
  • If a Core ML model file is bundled with app, URL of the file

    Declaration

    Swift

    public let localURL: URL?
  • url

    URL of downloaded model file on device storage. This is set after the download is completed

    Declaration

    Swift

    public var url: URL? { get }
  • Version of the Core ML model file downloaded from Mobile Services. This is set after the download is completed

    Declaration

    Swift

    public var version: String? { get }
  • Initialize the SAPMLModel to specify the model that needs to be distributed from Mobile Services. It is also possible to use an initial version of the model that is bundled within the app, and have subsequent updated versions distributed remotely from Mobile Services

    Declaration

    Swift

    public init(named: String, localURL: URL?)