-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update encrypt documentation with App metadata details
- Loading branch information
1 parent
30e51bd
commit 7fea56d
Showing
9 changed files
with
180 additions
and
64 deletions.
There are no files selected for viewing
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
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
4 changes: 3 additions & 1 deletion
4
source/examples/generated/kotlin/AppClientTest.snippet.configure-app-client.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
// Creates an App with custom configuration values | ||
AppConfiguration.Builder(YOUR_APP_ID) // Replace with your App ID | ||
// Specify your custom configuration values | ||
.appName("my-app-name") | ||
.encryptionKey(myEncryptionKey) | ||
.appVersion("1.0.0") | ||
.baseUrl("http://localhost:9090") | ||
.build() |
4 changes: 4 additions & 0 deletions
4
source/examples/generated/kotlin/AppClientTest.snippet.encrypted-app-client.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AppConfiguration.Builder(YOUR_APP_ID) // Replace with your App ID | ||
// Specify the encryption key | ||
.encryptionKey(myEncryptionKey) | ||
.build() |
4 changes: 1 addition & 3 deletions
4
source/examples/generated/kotlin/AppClientTest.snippet.set-custom-http-headers.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
AppConfiguration.Builder(YOUR_APP_ID) | ||
.authorizationHeaderName("MyApp-Authorization") | ||
.customRequestHeaders { | ||
put("X-MyApp-Version", "1.0.0") | ||
} | ||
.customRequestHeaders { put("X-MyApp-Version", "1.0.0") } | ||
.build() |
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
9 changes: 9 additions & 0 deletions
9
source/examples/generated/kotlin/EncryptARealmTest.snippet.encrypt-synced-realm.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
val config = SyncConfiguration.Builder(user, setOf(Frog::class)) | ||
.initialSubscriptions { realm -> | ||
add(realm.query<Frog>()) | ||
} | ||
// Specify the encryption key | ||
.encryptionKey(generatedKey) | ||
.build() | ||
val realm = Realm.open(config) | ||
Log.v("Successfully opened encrypted realm: ${realm.configuration}") |
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
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