I created my own iOS app that uses the particle-iot/particle-setup-ios pod.
Out firmware is running in MANUAL mode so we’re taking care of wifi and cloud connections.
My app is failing to claim the device correctly. It’s failing in step 4: checkDeviceIsClaimed.
Here’s the logic reponsible for the onboarding, you can see step 4 in the following file:
After it fails, I put the photon in listening mode again, and it works correctly. Any ideas why this is happening?
Has anyone found a complete explanation about Particle.connect() ? Does it block the main thread()? Does it block it until it connects to the cloud? What happens if that’s called with no wifi credentials yet?
It’s hard to tell what is happening just by this information alone. We have recently addressed one issue in our SDK that might have caused this if you have many devices on your account. How many devices do you have on the account you are using to claim new devices? If this is happening with an account that only has few devices, can you please confirm that you are signed in from your mobile app to Particle Cloud.
It was falling in that IF statement.
That request (unlike the others) has no retry logic, so it sent the user directly to the final screen with the Failure result.
So I had to replace with the following logic in order to the claim request again: