Skip to content

Commit 91c18d0

Browse files
authored
added troubleshooting section for unity android (#102)
* added troubleshooting section for unity android * added warning for lowercase url schemes
1 parent 1523cfd commit 91c18d0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

sdk/unity/onboard/authentication/oidc.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ b) Note: Unity 2022 versions prior to `2022.3.7f1` and 2023 versions prior to `2
151151

152152
i.e. add `<meta-data android:name="unityplayer.UnityActivity" android:value="true" />` after your first `intent-filter`. Please see https://forum.unity.com/threads/deep-linking-in-unity-2022-the-app-is-restarted.1447300/ for more info.
153153

154+
<Warning>The URL Scheme in your AndroidManifest and SequenceConfig should be all lowercase.</Warning>
154155
<Tip>If you're working with Unity 6, you may need to replace `UnityPlayerActivity` in your AndroidManifest with `UnityPlayerGameActivity`! You may also need to replace your `android:theme`; we've found "@style/BaseUnityGameActivityTheme" works well in our testing.</Tip>
155156

156157
### Web

sdk/unity/onboard/recovering-sessions.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@ unityStreamingAssets=**STREAMING_ASSETS**
9292
android.enableR8=**MINIFY_WITH_R_EIGHT**
9393
```
9494

95+
### Troubleshooting
96+
97+
If you run into issues with secure storage or Google Sign-In on Android, go through the following troubleshooting steps.
98+
99+
- **Google Sign-In:** Ensure the `data android:scheme` value in your `AndroidManifest.xml` file matches the `Url Scheme` in your
100+
`SequenceConfig.asset` file. Make sure it's all lowercase.
101+
- **Secure Storage:** Ensure your `mainTemplate.gradle` correctly defines the `androidx.security:security-crypto` plugin such that it is not
102+
overwritten by any other plugin or the Android Plugin Resolver.
103+
- **Try our Demo:** [Install our demo build](https://drive.google.com/file/d/1rAvnPu56Hj3yDRL32_lr887xt-xMQoYK/view?usp=sharing)
104+
and ensure this build runs fine on your device.
105+
- Compare your Unity project settings (AndroidManifest, gradle files, Android player settings) with our [sdk project.](https://github.com/0xsequence/sequence-unity)
106+
- **Additional Ideas:** Uninstall your app before installing a new build, change your url scheme or bundle id.
107+
95108
## Editor
96109

97110
In the editor, we use PlayerPrefs for private key storage. You will also need to enable 'EditorStoreSessionPrivateKeyInSecureStorage' in SequenceConfig in order to use secure storage and recover sessions from within the editor. This separate flag makes it easier for you to test both flows without modifying the behaviour of your builds. Secure storage in the editor is for development purposes only and should not be considered secure for long-term storage.

0 commit comments

Comments
 (0)