Skip to content

Commit 51d68b1

Browse files
update docs for latest mobile release
1 parent 1861349 commit 51d68b1

11 files changed

Lines changed: 49 additions & 37 deletions

File tree

docs/sdk/pnp/android/android.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ generated in a non-custodial way on successful user authentication. This authent
1313
achieved by using any social login options that Web3Auth supports or custom authentication flow of
1414
your choice.
1515

16-
#### This Documentation is based on the `7.2.0` SDK Version.
16+
#### This Documentation is based on the `7.3.0` SDK Version.
1717

1818
## Requirements
1919

docs/sdk/pnp/android/install.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Installation from "@site/src/common/sdk/pnp/android/_installation.mdx";
1010
import AndroidPermissions from "@site/src/common/sdk/pnp/android/_android-permissions.mdx";
1111
import Whitelist from "@site/src/common/sdk/pnp/android/_android-whitelist.mdx";
1212
import Deeplinking from "@site/src/common/sdk/pnp/android/_android-deep-linking.mdx";
13+
import ManifestChanges from "@site/src/common/sdk/pnp/android/_android-manifest-changes.mdx";
1314

1415
## Add Web3Auth to Gradle
1516

@@ -29,6 +30,10 @@ Then, in your app-level `build.gradle` dependencies section, add the following:
2930

3031
<Whitelist />
3132

33+
### Configure AndroidManifest File
34+
35+
<ManifestChanges />
36+
3237
### Configure Deep Link
3338

3439
<Deeplinking />

docs/sdk/pnp/android/usage.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ that the request method currently supports only the signing methods.
623623

624624
| Arguments | Description |
625625
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
626-
| `loginParams` | Takes in `LoginParams` used for authenticating the user. If you are using a custom verifier, please make sure to pass the valid JWT token in `LoginParams`. |
626+
| `chainConifg` | Defines the chain to be used for signature request. |
627627
| `method` | JSON RPC method name in `String`. Currently, the request method only supports the singing methods. |
628628
| `requestParams` | Parameters for the corresponding method. The parameters should be in the list and correct sequence. Take a look at [RPC methods](<[https://docs.metamask.io/wallet/reference/json-rpc-api/](https://docs.metamask.io/wallet/reference/json-rpc-api/)>) to know more. |
629629

@@ -638,10 +638,15 @@ val params = JsonArray().apply {
638638
add(address)
639639
}
640640

641-
val loginParams = LoginParams(Provider.GOOGLE)
641+
val chainConfig = ChainConfig(
642+
chainId = "0x1",
643+
rpcTarget = "https://rpc.ankr.com/eth",
644+
ticker = "ETH",
645+
chainNamespace = ChainNamespace.EIP155
646+
)
642647

643648
val signMsgCompletableFuture = web3Auth.request(
644-
loginParams = loginParams,
649+
chainConfig = chainConfig,
645650
"personal_sign",
646651
requestParams = params
647652
)

docs/sdk/pnp/ios/ios.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ a private key generated in a non custodial way on successful authentication of t
1313
authentication can be achieved by using any of the social logins Web3Auth provides or using a custom
1414
authentication flow of your choice.
1515

16-
#### This Documentation is based on the `8.2.0` SDK Version.
16+
#### This Documentation is based on the `8.3.0` SDK Version.
1717

1818
### Requirements
1919

docs/sdk/pnp/ios/usage.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,15 +496,13 @@ that the request method currently supports only the signing methods.
496496

497497
| Arguments | Description |
498498
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
499-
| `loginParams` | Takes in `W3ALoginParams` used for authenticating the user. If you are using a custom verifier, please make sure to pass the valid JWT token in `W3ALoginParams`. |
499+
| `chainConfig` | Defines the chain to be used for signature. |
500500
| `method` | JSON RPC method name in `String`. Currently, the request method only supports the singing methods. |
501501
| `requestParams` | Parameters for the corresponding method. The parameters should be in the list and correct sequence. Take a look at [RPC methods](<[https://docs.metamask.io/wallet/reference/json-rpc-api/](https://docs.metamask.io/wallet/reference/json-rpc-api/)>) to know more. |
502502

503503
### Usage
504504

505505
```swift title="Usage"
506-
let loginParams = W3ALoginParams(loginProvider: .GOOGLE)
507-
508506
do {
509507
var params = [Any]()
510508
// Message to be signed

src/common/guides/_android-installlation.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Installation from "@site/src/common/sdk/pnp/android/_installation.mdx";
33
import AndroidPermissions from "@site/src/common/sdk/pnp/android/_android-permissions.mdx";
44
import Whitelist from "@site/src/common/sdk/pnp/android/_android-whitelist.mdx";
55
import Deeplinking from "@site/src/common/sdk/pnp/android/_android-deep-linking.mdx";
6+
import ManifestChanges from "@site/src/common/sdk/pnp/android/_android-manifest-changes.mdx";
67

78
To use the Web3Auth SDK, you'll need to add the dependency of the respective platform SDK of
89
Web3Auth to your project. To know more about the available SDKs, please have a look at
@@ -28,6 +29,10 @@ Then, in your app-level `build.gradle` dependencies section, add the following:
2829

2930
<Whitelist />
3031

32+
### Configure AndroidManifest File
33+
34+
<ManifestChanges />
35+
3136
#### Configure Deep Link
3237

3338
<Deeplinking />

src/common/sdk/pnp/android/_android-deep-linking.mdx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,3 @@ Main activity
1313
<!-- Accept URIs: w3a://com.example.w3aflutter -->
1414
</intent-filter>
1515
```
16-
17-
Make sure your Main activity launchMode is set to **singleTop** in your `AndroidManifest.xml`
18-
19-
```xml
20-
<activity
21-
// highlight-next-line
22-
android:launchMode="singleTop"
23-
android:name=".YourActivity">
24-
// ...
25-
</activity>
26-
```
27-
28-
From version **7.1.2**, please make sure to set `android:allowBackup` to `false`, and add
29-
`tools:replace="android:fullBackupContent"` in your `AndroidManifest.xml` file.
30-
31-
```xml
32-
<application
33-
// highlight-start
34-
android:allowBackup="false"
35-
tools:replace="android:fullBackupContent"
36-
// highlight-end
37-
android:dataExtractionRules="@xml/data_extraction_rules"
38-
android:fullBackupContent="@xml/backup_rules"
39-
android:icon="@mipmap/ic_launcher">
40-
</application>
41-
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Make sure your Main activity launchMode is set to **singleTop** in your `AndroidManifest.xml`
2+
3+
```xml
4+
<activity
5+
// highlight-next-line
6+
android:launchMode="singleTop"
7+
android:name=".YourActivity">
8+
// ...
9+
</activity>
10+
```
11+
12+
From version **7.1.2**, please make sure to set `android:allowBackup` to `false`, and add
13+
`tools:replace="android:fullBackupContent"` in your `AndroidManifest.xml` file.
14+
15+
```xml
16+
<application
17+
// highlight-start
18+
android:allowBackup="false"
19+
tools:replace="android:fullBackupContent"
20+
// highlight-end
21+
android:dataExtractionRules="@xml/data_extraction_rules"
22+
android:fullBackupContent="@xml/backup_rules"
23+
android:icon="@mipmap/ic_launcher">
24+
</application>
25+
```

src/common/sdk/pnp/android/_installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
dependencies {
33
// ...
44
// highlight-next-line
5-
implementation 'com.github.web3auth:web3auth-android-sdk:7.2.0'
5+
implementation 'com.github.web3auth:web3auth-android-sdk:7.3.0'
66
}
77
```
88

src/common/sdk/pnp/ios/_cocoapods.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ To install the Web3Auth SDK using Cocoapods, follow the below steps:
33
1. Open the Podfile, and add the Web3Auth pod:
44

55
```sh
6-
pod 'Web3Auth', '~> 8.2.0'
6+
pod 'Web3Auth', '~> 8.3.0'
77
```
88

99
2. Once added, use `pod install` command to download the Web3Auth dependency.

0 commit comments

Comments
 (0)