iOS auth not returning new user back to the app


I have integrated auth in the iOS and it works fine and redirects the user back once logged in but if I create a new user while doing the auth, it just redirects the user to the user Home inside the browser (showing Home, ID, Settings etc) and does not return the user back to the iOS app.

I am using Blockstack-webapp for redirection.

@shreyas any pointers?


@hammadtariq Apologies for our slow response. Were you able to resolve this issue or are you still seeing this?


No problem at all. It’s still there, in fact, I will be finalizing my app in a couple of days as rest of the functionality is almost complete and I am worried about iOS app store testing as they can reject the app due to the incomplete functionality. Is there any way I can fix this?

Just to confirm, I am using this branch for development:

pod 'Blockstack', :git => '', :branch => 'multiplayer_support'


@hammadtariq apologies for not getting back sooner, I’m not sure how I missed this. Are you handling the redirect URL? In the Blockstack-webapp example, it is: window.location="myblockstackapp://?authResponse=" + authResponse, so you should replace myblockstackapp with your app’s registered value.

Also, I don’t believe the App Store will reject your app because of this. Though it should still be fixed. And I recommend updating to the latest version of the SDK, there’s been many changes and fixes :).


No worries @shreyas yes, I am handling redirect-URL as my sign-in is returning fine. What happens is that browser is not return the user back if he/she is registering for the first time, it just opens the default user home page after registering the user.

I will integrate the new version once the app is ready, right now I am in QA phase so I want to know that it works fully for once and then I can go on to change the version.

Just as a side question, is there anyway to get the user’s profile picture in new version?


@shreyas I updated the pod to latest 0.3.0 and the issue resolved itself. Thanks for the good work!


@hammadtariq Glad to hear – I couldn’t reproduce the issue :). Also, in the latest version of the SDK there is a new field, image, on the Profile object. You can access it like this: Blockstack.shared.loadUserData().claim.image.

NOTE: If you had retrieved and stored user data using a previous version of the SDK, the image field may be empty. This is a known issue. Logging out and back in, or reinstalling the app will fix this.


Also, the latest SDK version should be 0.4.0. Is this not the case?


Hey, thanks @shreyas. It’s coming as 0.3.0, I just checked it again by running pod install. About the image and the email, thank you very much for those, they were much needed!


@shreyas the image is part of 0.4.0? I just tried using pod 'Blockstack', '~> 0.4.0' that didn’t work, also claim. does not have any image.


Yep, it’s part of 0.4.0. Cocoapods says the version that is live is v0.4.0 ( Try pod update.


@shreyas thanks that did the trick (many breaking changes though :)) I was able to update everything. Then signed the user out and signed back in, found claim.image but it is nil while I have an image set for this particular profile. Is there anything I can do to fix this?


@hammadtariq perhaps that is a bug. Try uninstalling and reinstalling the app please!