ActiveLook / ios-sdk

iOS SDK for ActiveLook eyewear
https://www.activelook.net/
Apache License 2.0
10 stars 8 forks source link

ActiveLookSDK.shared() does not reflect its documentation #8

Closed pierrerougeotf closed 4 months ago

pierrerougeotf commented 2 years ago

The documentation for ActiveLookSDK.shared method states either to fill all parameters or to give no parameters at all to the method

// This is the method used to initialize the ActiveLookSDK singleton and access it later on. // To initialize it, this function is called with all parameters set. // To access it afterwards, just call it without any arguments: ActiveLookSDK.shared() // - throws: // - ActiveLookError.sdkInitMissingParameters // if the function is called with incomplete parameters. // - ActiveLookError.sdkCannotChangeParameters // if the function is called more than once during the application's lifetime, with all the parameters correctly set. // - parameters: // - token: The token used for authenticating with the firmware repository. // - onUpdateStart Registered callback for update start event notification // - onUpdateProgress Registered callback for update progress event notification. // - onUpdateSuccess Registered callback for update success event notification. // - onUpdateError Registered callback for update error event notification. // - returns: the ActiveLookSDK's singleton //

The method signature is not compliant with that

public static func shared(token: String? = nil,
                              onUpdateStartCallback: startClosureSignature? = nil,
                              onUpdateProgressCallback: progressClosureSignature? = nil,
                              onUpdateSuccessCallback: successClosureSignature? = nil,
                              onUpdateFailureCallback: failureClosureSignature? = nil) throws -> ActiveLookSDK

Furthermore, in swift coding style Type names start with an uppercase

pierrerougeotf commented 2 years ago

Proposed patch issue-8.patch.zip