particle-iot / spark-setup-ios

(DEPRECATED) Spark device setup library - Soft AP Cocoapod/Carthage lib for iOS
Apache License 2.0
19 stars 25 forks source link

Return deviceId when called with initWithSetupOnly and if status is SparkSetupMainControllerResultSuccessNotClaimed and #58

Open anigo333 opened 7 years ago

anigo333 commented 7 years ago

My scenario requires customers to just connect the device to Wifi and not claim it to their accounts. So the result received is SparkSetupMainControllerResultSuccessNotClaimed. However it seems the deviceId is not set when the result is SparkSetupMainControllerResultSuccessNotClaimed? if you look at https://github.com/spark/spark-setup-ios/blob/bcc114543d9da007360f2fcc94f556e9428df8eb/Classes/UI/SparkConnectingProgressViewController.m line 397, the deviceId gets set inside checkDeviceIsClaimed which only gets called if needToClaimDevice is true and it seems that is always set to false if we use initWithSetupOnly?