Skip to content

Commit 0b8903d

Browse files
committed
Merge branch 'main' into update-dependencies
2 parents 982434c + 46e5982 commit 0b8903d

File tree

1 file changed

+37
-7
lines changed

1 file changed

+37
-7
lines changed

README.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,35 @@ Line SDK wrapper for React Native 🚀
148148
</array>
149149
```
150150

151+
## Migration guides
152+
153+
### v3 → v4
154+
155+
1. A `setup` function has been added and needs to be called before using the library.
156+
```typescript
157+
Line.setup({ channelId: 'YOUR_CHANNEL_ID' })
158+
```
159+
160+
2. The `getBotFriendshipStatus` function is now called `getFriendshipStatus`.
161+
162+
3. The `refreshToken` function is now called `refreshAccessToken`.
163+
164+
### v4 → v5
165+
166+
1. The file name in the `AppDelegate` import has changed.
167+
```objectivec
168+
- #import "RNLine-Swift.h"
169+
170+
+ #import "react_native_line-Swift.h"
171+
```
172+
173+
2. The `login` function now expects an empty object as a default value.
174+
```typescript
175+
- Line.login()
176+
177+
+ Line.login({})
178+
```
179+
151180
## Usage
152181

153182
1. Import the `Line` module:
@@ -174,13 +203,14 @@ Line SDK wrapper for React Native 🚀
174203

175204
| Function | Description |
176205
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
177-
| `login(args?: LoginArguments): Promise<LoginResult>` | Starts the login flow of Line's SDK (Opens the apps if it's installed and defaults to the browser otherwise). It accepts the same argumements as the LineSDK, in an object `{ key: value }`, defaults the same way as LineSDK too. |
178-
| `getCurrentAccessToken(): Promise<AccessToken>` | Returns the current access token for the currently logged in user. |
179-
| `getProfile(): Promise<UserProfile>` | Returns the profile of the currently logged in user. |
180-
| `logout(): Promise<void>` | Logs out the currently logged in user. |
181-
| `refreshToken(): Promise<AccessToken>` | Refreshes the access token and returns it. |
182-
| `verifyAccessToken(): Promise<AccessTokenVerifyResult>` | Verifies the access token and returns it. |
183-
| `getBotFriendshipStatus(): Promise<BotFriendshipStatus>` | Gets bot friendship status if [configured](https://developers.line.biz/en/docs/ios-sdk/swift/link-a-bot/). |
206+
| `login(params: LoginParams): Promise<LoginResult>` | Starts the login flow of Line's SDK (Opens the apps if it's installed and defaults to the browser otherwise). It accepts the same argumements as the LineSDK, in an object `{ key: value }`, defaults the same way as LineSDK too. |
207+
| `getCurrentAccessToken(): Promise<AccessToken>` | Returns the access token of the current user. |
208+
| `getProfile(): Promise<UserProfile>` | Returns the current user profile information. |
209+
| `logout(): Promise<void>` | Revokes the access token of the current user. |
210+
| `refreshAccessToken(): Promise<AccessToken>` | Refreshes the access token of the current user. |
211+
| `setup(params: SetupParams): Promise<void>` | Initializes the Line SDK. |
212+
| `verifyAccessToken(): Promise<VerifyResult>` | Checks whether the access token of the current user is valid. |
213+
| `getFriendshipStatus(): Promise<FriendshipStatus>` | Gets the friendship status between the LINE Official Account (which is linked to the current channel) and the user if [configured](https://developers.line.biz/en/docs/line-login-sdks/ios-sdk/swift/link-a-bot/). |
184214
185215
## Example
186216

0 commit comments

Comments
 (0)