You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/pages/sdk/unity/recovering-sessions.mdx
+64-1Lines changed: 64 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,69 @@ On Windows PCs, we leverage the [Crypto: Next Generation - Data Protection API (
29
29
30
30
On Web builds, we leverage [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) via [PlayerPrefs](https://docs.unity3d.com/ScriptReference/PlayerPrefs.html).
31
31
32
+
## Android
33
+
34
+
On Android builds, we leverage the [Android Keystore](https://developer.android.com/privacy-and-security/keystore).
35
+
36
+
Our Keystore plugin for Unity (included in the SDK) requires a Custom Main Gradle Template. Please navigate to your Project Settings, then under `Player > Publishing Settings` enable `Custom Main Gradle Template`. This will create a file `Assets/Plugins/Android/mainTemplate.gradle` (or similar, the editor will show you the path) if you don't have one already. Here is an example `mainTemplate.gradle` file; please copy/paste this (or incorporate into your existing file).
Our Keystore plugin also requires a Custom Gradle Properties Template. Again, navigate to your Project Settings, then under `Player > Publishing Settings` enable `Custom Gradle Properties Template`. This will create a file `Assets/Plugins/Android/gradleTemplate.properties` (or similar, the editor will show you the path) if you don't have one already. Here is an example `gradleTemplate.properties` file; please copy/paste this (or incorporate into your existing file).
83
+
84
+
```
85
+
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
86
+
org.gradle.parallel=true
87
+
android.enableJetifier=true
88
+
android.useAndroidX=true
89
+
unityStreamingAssets=**STREAMING_ASSETS**
90
+
**ADDITIONAL_PROPERTIES**
91
+
92
+
android.enableR8=**MINIFY_WITH_R_EIGHT**
93
+
```
94
+
32
95
## Editor
33
96
34
-
In the editor, we leverage the MacOS and PC secure storage solutions depending on which version of the editor you are using. 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.
97
+
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