Hi! I was wondering if anyone else encountered similar issues and what the solution ended up being.
We're encountering weird sign-in issues on our iOS version of our app. It seems like an uninstall and reinstall solves it, but the issue seems to only impact users who underwent the transfer process from one iOS device to another. What I am curious about:
- What is copied over from one device to another in this process?
- Is there a way outside of owning multiple test devices to replicate this flow?
- Our current suspicion is that NSUserDefaults is not being cleared by our app on first start, and that stale data is copied over during this transfer process, breaking the sign-in until a re-install wipes everything properly.
Does it seem like we're on the right track with this assumption, or completely out to lunch?
To be clear, we’re talking about the Quick Start feature, as described by Use Quick Start to transfer data to a new iPhone or iPad. If not, lemme know.
It’s hard to give a definitive list but:
-
The bulk of your container is transferred.
-
That includes the files that hold the
UserDefaults
database. -
It doesn’t including disposable things, like temporary and cache files.
Not really. There are things you can try, but it’s hard to guarantee that they’ll yield exactly the same state. The only way to be sure is to do the same thing that your users are doing.
If you don’t have a second device handy, you could:
-
Use Xcode’s container support to download and then replace the app’s container.
-
Make a password protected local backup of the device, erase it, then restore from that.
And hey, even if these don’t replicate the failure, they’re user scenarios that you should confirm work (-:
Who do you suppose should be clearing it?
As mentioned above, I wouldn’t expect a Quick Start transfer to clear UserDefaults
.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"