NSObject

class NSObject : NSObjectProtocol

Note

In order to expose a Swift extension to Objective-C the extension must be mode on a concrete class and not a protocol. Ideally this extension would be made on ObjcIdentifiedModel but this is not possible as of Swift 4 and Xcode 9.

  • Injects a Fritz managed model into this instance allowing the SDK to instrument model predications.

    Warning

    When Xcode generates a Swift class based on a MLModel file it provides a read-write model property that allows the SDK to safely overwrite the model with a Fritz managed model. When using Objective-C, Xcode generates a class with a readonly model property which forces us to use setValue:forKey: instead of a type-safe setter. It’s crucial to test your apps on future beta versions of iOS as Apple could change the underlying implementation of the model property causing this method to crash. If this is the case, we will have updated SDKs ready for those newer versions.

    Note

    This method will have no affect on any object that does not conform to ObjcIdentifiedModel.

    Declaration

    Swift

    @objc(fritz)
    public func fritz() -> Self

    Return Value

    The same instance that this method was called.

  • Manually check for an OTA model update

    Declaration

    Swift

    @objc(updateIfNeeded:)
    public func updateIfNeeded(completionHandler: @escaping (Bool, Error?) -> Void)
  • Manually check for an OTA model update

    Declaration

    Swift

    @objc(updateIfNeeded:)
    public static func updateIfNeeded(completionHandler: @escaping (Bool, Error?) -> Void)