Skip to content

Commit

Permalink
Merge pull request #945 from Web3Auth/mobile-update
Browse files Browse the repository at this point in the history
Improve Mobile Docs
  • Loading branch information
shahbaz17 authored Oct 15, 2024
2 parents 4278dc9 + f339a7d commit 902b7c6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/sdk/core-kit/sfa-ios/sfa-ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ screens.
### Requirements

- iOS 14+
- Xcode 12+
- Swift 5.x
- macOS 11+

:::note
Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/pnp/flutter/flutter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ custom authentication flow of your choice.
## Requirements

- **Android** API version 34 or newer.
- **iOS** 14+, Xcode 11.4+ / 12.x and Swift 4.x / 5.x
- **iOS** 14, Xcode 12+ and Swift 5.x

## Resources

Expand Down
6 changes: 3 additions & 3 deletions docs/sdk/pnp/ios/ios.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ authentication flow of your choice.

### Requirements

- iOS 14+
- Xcode 11.4+ / 12.x
- Swift 4.x / 5.x
- iOS 14
- Xcode 12+
- Swift 5.x

## Resources

Expand Down
2 changes: 1 addition & 1 deletion docs/sdk/pnp/ios/mfa.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ You can configure the order of MFA or enable/disable MFA type by passing the `mf
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth",
Expand Down
18 changes: 9 additions & 9 deletions docs/sdk/pnp/ios/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public enum Web3AuthProvider: String, Codable {
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand Down Expand Up @@ -127,7 +127,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .GOOGLE))
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand All @@ -144,7 +144,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .GOOGLE))
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand All @@ -161,7 +161,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .FACEBOOK))
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand All @@ -178,7 +178,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .DISCORD))
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand All @@ -195,7 +195,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .TWITCH))
```swift
import Web3Auth

let web3auth = Web3Auth(
let web3auth = try await Web3Auth(
W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network:.sapphire_mainnet,
Expand Down Expand Up @@ -224,7 +224,7 @@ let result = try await web3Auth.login(
```swift
import Web3Auth

let web3auth = Web3Auth(
let web3auth = try await Web3Auth(
W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
Expand All @@ -244,7 +244,7 @@ let result = try await web3Auth.login(W3ALoginParams(loginProvider: .FARCASTER))
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand Down Expand Up @@ -316,7 +316,7 @@ The `W3AInitParams` initialization accepts a `sessionTime` parameter.
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth",
Expand Down
8 changes: 7 additions & 1 deletion src/common/sdk/pnp/flutter/_initialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ Future<void> initWeb3Auth() async {
// focus-end
// Just after init method, invoke the initialize function
await Web3AuthFlutter.initialize();
// to use any active session. If no active session are
// present, the method will throw an error.
try {
await Web3AuthFlutter.initialize();
} catch (e) {
// Handle/Swallow Error
}
}
```
2 changes: 1 addition & 1 deletion src/common/sdk/pnp/ios/_initialize.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```swift
import Web3Auth

let web3auth = Web3Auth(W3AInitParams(
let web3auth = try await Web3Auth(W3AInitParams(
clientId: "YOUR_WEB3AUTH_CLIENT_ID",
network: .sapphire_mainnet,
redirectUrl: "bundleId://auth"
Expand Down

0 comments on commit 902b7c6

Please sign in to comment.