We try to follow UI Restoration Process as below to restore our app to last screen, but we have a lot of initialization processes in willFinishLaunchingWithOptions:
- Show a splash screen
- Check if access token is validation
- if invalid show a login screen and let user input ID/PW, Request to get access toke with ID/PW, save access token.
- Request user information with access token.
- Show home screen
All of above processes in async threads, so willFinishLaunchingWithOptions will return YES soon.
After iOS restore our app last screen, our initialization still in processing, at last, home screen is displayed, and we can't stop at screen by iOS restored.
We want to change async to sync for REST API request, is this possible? what can we do next to use Restore UI State?