-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
136f5cc
commit 76b1d20
Showing
7 changed files
with
71 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: PnP iOS SDK - v9 to v10 | ||
description: "PnP iOS SDK - v9 to v10 | Documentation - Web3Auth" | ||
sidebar_label: v9 to v10 | ||
--- | ||
|
||
This migration guide provides steps for upgrading from version v9 to v10 of the PnP iOS SDK. The | ||
guide outlines significant changes and enhancements, including the support of Web3Auth OpenLogin | ||
version v9, and Wallet Services v3. | ||
|
||
## Breaking Changes | ||
|
||
### `getSignResponse` is now removed. | ||
|
||
In v10, we try to improve the developer experience by removing the `getSignResponse` method and | ||
returning the result in the `request` method itself. | ||
|
||
Previously, after calling the `request` method, developers had to use the `getSignResponse` method | ||
to retrieve the `SignResponse`. In the latest version v10, the `request` method will return the | ||
`SignResponse` directly. | ||
|
||
```swift | ||
// remove-next-line | ||
try await self.web3Auth?.request( | ||
// add-next-line | ||
let response = try await self.web3Auth?.request( | ||
chainConfig: ChainConfig( | ||
chainId: "0x89", | ||
rpcTarget: "https://polygon.llamarpc.com" | ||
), | ||
method: "personal_sign", | ||
requestParams: params | ||
) | ||
|
||
|
||
// remove-next-line | ||
let response = try Web3Auth.getSignResponse() | ||
if response!.success { | ||
print(response!.result!) | ||
} else { | ||
print(response!.error!) | ||
} | ||
|
||
``` | ||
|
||
## Enhancements | ||
|
||
In the latest version v10, we have added support for the Web3Auth OpenLogin version v9, and Wallet | ||
Services v3. In Wallet Services v3, the prebuilt wallet UI now supports the swap functionality | ||
allowing users to swap to their favorite token from the app itself. |
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ authentication flow of your choice. | |
|
||
### Requirements | ||
|
||
- iOS 14 | ||
- iOS 14+ | ||
- Xcode 12+ | ||
- Swift 5.x | ||
|
||
|
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
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
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