Created
June 11, 2019 20:53
-
-
Save Pinwheeler/92a24ff1ae22ff5890b1c1dab79ce8f5 to your computer and use it in GitHub Desktop.
Startup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async start() { | |
this.AppState.addEventListener('change', this._genericStateChange.bind(this)) | |
Linking.addEventListener('url', this.handleOpenURL.bind(this)) | |
await this.updateApp() // async call out to CodePush that updates the app if necessary | |
const credentialsRepository = new CredentialsRepository() | |
let credentials = await credentialsRepository.initialize(Keychain) | |
if (!credentials) { | |
return Navigation.setRoot({root: this._loggedOutRoot()}) | |
} | |
let initialURL = await Linking.getInitialURL() | |
if (initialURL) { | |
this.handleOpenURL({url: initialURL}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment