Skip to content

Commit aed92d8

Browse files
bgravenorstyashovardhanalexandratran
authored
Edit the Embedded Wallet builder (iOS) (#2281)
* Added prerequisites. Signed-off-by: bgravenorst <[email protected]> * Fixed broken links. Signed-off-by: bgravenorst <[email protected]> * Fix link. Signed-off-by: bgravenorst <[email protected]> * Address reviewer feedback. Signed-off-by: bgravenorst <[email protected]> * Improve step description. Signed-off-by: bgravenorst <[email protected]> * Minor language edit. Signed-off-by: bgravenorst <[email protected]> * Update src/pages/quickstart/builder/embedded-wallets/ios/stepContent/whitelist.mdx Co-authored-by: Alexandra Carrillo <[email protected]> * Fix deeplink urls (#2293) * Edit the embedded wallets React builder component. (#2292) * Edit the React builder component. Signed-off-by: bgravenorst <[email protected]> * Typo. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]> * Address reviewer feedback. Signed-off-by: bgravenorst <[email protected]> * Remove text. Signed-off-by: bgravenorst <[email protected]> --------- Signed-off-by: bgravenorst <[email protected]> Co-authored-by: Yashovardhan Agrawal <[email protected]> Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 32d426a commit aed92d8

File tree

10 files changed

+46
-61
lines changed

10 files changed

+46
-61
lines changed

src/pages/quickstart/builder/embedded-wallets/android/stepContent/androidQuickStart.mdx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
This quickstart is designed to help you quickly integrate MetaMask Embedded Wallet SDKs in your
44
Android app.
55

6-
To view the quickstart for a different platform, select the dropdown in the menu bar and choose your target
7-
platform. For example, iOS/Swift, React, Flutter, Angular, and others.
8-
9-
If you need help, visit the [Web3Auth Community](https://web3auth.io/community/c/help-pnp/pnp-android/16).
6+
If you need help, visit the [Web3Auth community](https://web3auth.io/community/c/help-pnp/pnp-android/16).
107

118
:::tip build locally
129

src/pages/quickstart/builder/embedded-wallets/angular/stepContent/angularQuickStart.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
Add Web3 authentication to your Angular app with the MetaMask Embedded Wallets SDK.
44

5-
To view a quickstart for a different platform, select the dropdown in the menu bar and choose your
6-
target (for example, Android, React, Flutter, iOS, or others).
7-
85
Clone the Angular quickstart application:
96

107
```shell
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
### Making Blockchain Calls
1+
### Make blockchain calls
22

3-
While using the Web3Auth Swift/iOS SDK, you get the private key within the user scope. This means that you can use it with any blockchain with their corresponding library within the Swift/iOS environment.
3+
With the Web3Auth iOS/Swift SDK, you can derive the user's private key in memory for the current session.
4+
Use that key for any blockchain using their corresponding library in the Swift/iOS environment.
45

56
:::info Connect any Blockchain
67

7-
Refer to the [Blockchain Documentation](/connect-blockchain/) to know more about how to make calls on any blockchain.
8+
Refer to the [blockchain documentation](/embedded-wallets/connect-blockchain/) to learn more about making calls on
9+
any supported blockchain.
810

911
:::
Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
1-
### MetaMask Embedded Wallets Swift/iOS Quick Start
1+
### MetaMask Embedded Wallets iOS/Swift quickstart
22

3-
This guide is designed to help you quickly integrate a basic instance of MetaMask Embedded Wallet SDKs in your Swift/iOS app.
3+
This quickstart is designed to help you quickly integrate MetaMask Embedded Wallet SDKs in your
4+
iOS or Swift app.
45

5-
If you face any problem anytime, you can always find help in the [Web3Auth Community](https://web3auth.io/community/c/help-pnp/pnp-ios/17).
6+
If you need help, visit the [Web3Auth Community](https://web3auth.io/community/).
67

7-
:::tip building locally
8+
#### Prerequisites
89

9-
- Clone the MetaMask Embedded Wallets Swift/iOS Quick Start Application
10+
- iOS 14+
11+
- Xcode 12+
12+
- Swift 5.x
1013

11-
```shell npm2yarn
12-
npx degit Web3Auth/web3auth-ios-examples/ios-quick-start w3a-ios-quick-start
13-
```
14+
Build the project locally:
1415

15-
- Install & Run
16+
1. Clone the MetaMask Embedded Wallets Swift/iOS quickstart application:
1617

17-
```shell npm2yarn
18-
cd w3a-ios-quick-start
19-
### run project in Xcode
20-
```
18+
```shell npm2yarn
19+
npx degit Web3Auth/web3auth-ios-examples/ios-quick-start w3a-ios-quick-start
20+
```
2121

22-
:::
23-
24-
:::note Requirements
25-
26-
- iOS 14+, Xcode 11.4+ / 12.x & Swift 4.x / 5.x
27-
28-
:::
22+
1. Open the project in Xcode from the `w3a-ios-quick-start` directory and
23+
[build the app](https://developer.apple.com/documentation/xcode/building-and-running-an-app).

src/pages/quickstart/builder/embedded-wallets/ios/stepContent/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as initialization from './initialize.mdx'
77
import * as installation from './installation.mdx'
88
import * as login from './login.mdx'
99
import * as logout from './logout.mdx'
10+
1011
import * as iOSQuickStart from './iOSQuickStart.mdx'
1112

1213
const STEPS = toSteps({
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
### Create and initialize the Web3Auth instance
1+
### Create and initialize Web3Auth
22

3-
Let's now create an instance of the `Web3Auth`.
3+
Create an instance of `web3Auth` for your app.
44

5-
We need `clientId` and `network` to initialize the web3auth class. You can get your `clientId` from registering (above), whereas `network` signifies the type of network(`SAPPHIRE_MAINNET` or `SAPPHIRE_DEVNET` ) you want to initialize web3auth with.
5+
You'll need two values:
66

7-
Now, let's create an instance of the `Web3Auth` class. It can be initialized on-demand when the user interactions are input (like button click) or when the screen is initialized.
7+
- `clientId` - from the Web3Auth dashboard after registration.
8+
- `network` - choose `SAPPHIRE_MAINNET`or `SAPPHIRE_DEVNET` to initialize Web3Auth with.
89

9-
:::info sdk reference
10+
Initialize `web3Auth` on-demand (for example, on a button tap) or when the screen loads.
1011

11-
Read more about [iOS SDK](/embedded-wallets/sdk/ios).
12+
:::info SDK reference
13+
14+
Read more about the [iOS SDK](/embedded-wallets/sdk/ios).
1215

1316
:::

src/pages/quickstart/builder/embedded-wallets/ios/stepContent/installation.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
Add the MetaMask Web3Auth iOS SDK to your project
44

5-
1. In Xcode, with your app project open, navigate to **File > Add Packages**.
5+
1. In Xcode, open your project and select **File > Add Packages**.
66

77
1. When prompted, add the Web3Auth iOS SDK repository:
88

99
```bash
1010
https://github.com/Web3Auth/web3auth-swift-sdk
1111
```
1212

13-
From the `Dependency Rule` dropdown, select `Exact Version` and enter the [latest version](https://github.com/Web3Auth/web3auth-swift-sdk/releases).
13+
1. For **Dependency Rule**, select **Exact Version**, then enter the [latest version](https://github.com/Web3Auth/web3auth-swift-sdk/releases).
1414

15-
1. When finished, Xcode will automatically begin resolving and downloading your dependencies in the background.
15+
Xcode automatically resolves and downloads the dependencies in the background.
1616

1717
:::tip SDK Reference
1818

19-
- [Installing Web3Auth](/embedded-wallets/sdk/ios/install).
19+
See [installing Web3Auth](/embedded-wallets/sdk/ios#installation).
2020

2121
:::
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
### Logging in your User
1+
### Sign in the user
22

3-
Use the `login` function in the Web3Auth Instance to log in the user. Just create a button that triggers the `login` for the user of the login method of their choice.
3+
Use the [`login`](/embedded-wallets/sdk/ios/usage/login) function of the
4+
`web3Auth` instance to sign in the user. You can trigger it from a button or other user action.
45

5-
After a successful user login, Web3Auth will redirect back to your app, with a payload stored in the state of the Web3Auth Instance.
6-
7-
:::info SDK Reference
8-
9-
- [`login()` function](/embedded-wallets/sdk/react-native/usage#logging-in-a-user).
10-
11-
:::
6+
After a successful user sign-in, Web3Auth returns the user to your app, with a payload stored in the
7+
state of the `web3Auth` instance.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
### Log the user out
1+
### Sign out the user
22

3-
Use the `logout` function of the Web3Auth Instance to log the user out.
4-
5-
:::info SDK Reference
6-
7-
- [`logout()` function](/embedded-wallets/sdk/react-native/usage#logging-out-a-user).
8-
9-
:::
3+
Use the [`logout`](/embedded-wallets/sdk/ios/usage/logout) function to sign the user out.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
### Whitelist Bundle ID
1+
### Whitelist your bundle ID
22

3-
To whitelist, you'll need to
3+
To whitelist your app:
44

5-
- Select your Web3Auth project in the [Developer Dashboard](https://dashboard.web3auth.io).
5+
1. In the [Web3Auth dashboard](https://dashboard.web3auth.io), select your project.
66

7-
- Add `(bundleId)://auth` to **Whitelist URLs** section.
7+
1. Select the **Domains** tab. In **Whitelist URLs**, add `<bundleId>://auth`.

0 commit comments

Comments
 (0)