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.
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 => 'https://github.com/blockstack/blockstack-ios.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?
@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.
@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?
@shreyas tried doing that its still nil, in fact also tried resetting the keychain using Blockstack.shared.promptClearDeviceKeychain(), it gives the invalid address error, I have attached a screenshot.
I was trying to reset the keychain because that problem where just the using the iOS sdk was overwriting the profile of the user (discussed here) was coming back.
That reset did work actually instead of giving that error.
However, then I ran into another problem when I created a new blockstack ID to test using the desktop browser, when I restored into the iOS simulator, the sign in work but it is giving Blockstack.shared.loadUserData()?.username and Blockstack.shared.loadUserData()?.claim as nil.
So, these are basically 3 different problems. Let me know if you need any more information or if you are not able to reproduce them.
I was basically hoping to use newly formed test IDs to submit as part of my submission to the app store. However, seems like I will have to find a work around.
They somehow went there during the Signup, most definitely while trying to create a new ID and they got redirected to the user home at the end of the auth. I am simply returning the auth using the default web app redirect. The namespace I am using timski:// and it generally works 100% of the time if I am just signing in.
The issue they got is what I have seen once as well. I am not sure what to do now. Should I appeal and say this is not a wallet app and you are just seeing the default homepage of a Blockstack ID and you should try to sign in again? Otherwise, how can we fix this?
@hammadtariq Looking into the above mentioned issues. I’ll have more info for you by tomorrow. Really appreciate the detail you have provided.
Regarding the rejection, that is definitely bizarre. I’d say appeal the submission and tell them this is not a wallet app, and the given screenshot is not part of your app. It is a web component of the authentication tool that is visible to the user during authentication only. I think that should work–I have appealed rejections before and they have indeed reconsidered.