The only point at which the iOS BlinkUp SDK (19.3.1) will return an agent URL is in the the code black registered by the devicePollingDidComplete: parameter of the blinkUpController presentInterfaceAnimated: method. This returns a BUDeviceInfo object, of which agentURL is a property. That’s if the device enrollment process went smoothly. Of it didn’t, devicePollingDidComplete: will return a non-null NSError value, so you should always check for a non-null error before you check for an agentURL.
The Android SDK (6.0.0) provides a callback function structure which you pass to BlinkUpController via the latter’s getTokenStatus() method. If there’s an error or timeout, the agent URL won’t be defined. This can trip you up if you’re storing the agent URL as a global and reading its value without first checking the result of the TokenStatusCallback.
The process might fail (ie. enrollment is rejected, so no agent URL is returned) if you’re using an invalid Plan ID, eg. a development Plan ID for a production device. See the Android SDK link above for more info on this.