Skip to content

Commit e0043c9

Browse files
committed
update README
1 parent 84e6062 commit e0043c9

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

README.md

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtain
6161
1. Add `platform :ios, '10.0'` in `Podfile` line:1
6262
2. Enable `use_frameworks!` in `Podfile` line:3
6363
3. Comment the code related to flipper, flipper doesn't support `use_frameworks!` !
64-
4. Add this code to your `AppDelegate.m`
64+
4. Modify your info.plist like it says here [Configuring the Info.plist file](https://developers.line.biz/en/docs/ios-sdk/swift/setting-up-project/#configuring-the-info-plist-file)
65+
5. Add this code to your `AppDelegate.m`
6566

6667
```objc
6768
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
@@ -121,15 +122,15 @@ import LineLogin from '@xmartlabs/react-native-line'
121122

122123
Then, you can start using all the functions that are available:
123124

124-
| Function | Description |
125-
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126-
| `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. |
127-
| `getCurrentAccessToken(): Promise<AccessToken>` | Returns the current access token for the currently logged in user. |
128-
| `getProfile(): Promise<UserProfile>` | Returns the profile of the currently logged in user. |
129-
| `logout(): Promise<void>` | Logs out the currently logged in user. |
130-
| `refreshToken(): Promise<AccessToken>` | Refreshes the access token and returns it. |
131-
| `verifyAccessToken(): Promise<AccessTokenVerifyResult>` | Verifies the access token and returns it. |
132-
| `getBotFriendshipStatus(): Promise<any>` | Gets bot friendship status if [configured](https://developers.line.biz/en/docs/ios-sdk/swift/link-a-bot/). |
125+
| Function | Description |
126+
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
127+
| `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. |
128+
| `getCurrentAccessToken(): Promise<AccessToken>` | Returns the current access token for the currently logged in user. |
129+
| `getProfile(): Promise<UserProfile>` | Returns the profile of the currently logged in user. |
130+
| `logout(): Promise<void>` | Logs out the currently logged in user. |
131+
| `refreshToken(): Promise<AccessToken>` | Refreshes the access token and returns it. |
132+
| `verifyAccessToken(): Promise<AccessTokenVerifyResult>` | Verifies the access token and returns it. |
133+
| `getBotFriendshipStatus(): Promise<BotFriendshipStatus>` | Gets bot friendship status if [configured](https://developers.line.biz/en/docs/ios-sdk/swift/link-a-bot/). |
133134

134135
### Return values
135136

@@ -139,43 +140,34 @@ The following objects are returned on the methods described above:
139140

140141
```typescript
141142
{
142-
/// The user ID of the current authorized user.
143+
/// The user ID of the current authorized user.
143144
userID: String
144145

145-
/// The email of the current authorized user.
146-
email?: String
147-
148146
/// The display name of the current authorized user.
149-
displayName: String
147+
displayName: string
150148

151149
/// The profile image URL of the current authorized user. `null` if the user has not set a profile
152150
/// image.
153-
pictureURL?: URL
154-
155-
/// The large profile image URL of the current authorized user. `null` if the user has not set a profile
156-
/// image.
157-
pictureURLLarge?: URL
158-
159-
/// The small profile image URL of the current authorized user. `null` if the user has not set a profile
160-
/// image.
161-
pictureURLSmall?: URL
151+
pictureURL?: string
162152

163153
/// The status message of the current authorized user. `null` if the user has not set a status message.
164-
statusMessage?: String
154+
statusMessage?: string
165155
}
166156
```
167157

168158
2. AccessToken:
169159

170160
```typescript
171161
{
172-
/// The value of the access token.
162+
/// The value of the access token.
173163
access_token: String
174-
175164
/// The expiration time of the access token. It is calculated using `createdAt` and the validity period
176165
/// of the access token. This value might not be the actual expiration time because this value depends
177166
/// on the system time of the device when `createdAt` is determined.
178167
expires_in: String
168+
/// The raw string value of the ID token bound to the access token. The value exists only if the access token
169+
/// is obtained with the `.openID` permission.
170+
id_token?: String
179171
}
180172
```
181173

@@ -198,7 +190,7 @@ The following objects are returned on the methods described above:
198190

199191
```typescript
200192
{
201-
/// The access token obtained by the login process.
193+
/// The access token obtained by the login process.
202194
accessToken: AccessToken
203195
/// The permissions bound to the `accessToken` object by the authorization process. Scope has them separated by spaces
204196
scope: String
@@ -210,15 +202,20 @@ The following objects are returned on the methods described above:
210202
/// `LoginManagerOption` object when the user logs in. For more information, see Linking a bot with your LINE
211203
/// Login channel at https://developers.line.me/en/docs/line-login/web/link-a-bot/.
212204
friendshipStatusChanged?: boolean
213-
/// The raw string value of the ID token bound to the access token. The value exists only if the access token
214-
/// is obtained with the `.openID` permission.
215-
lineIdToken?: String
216205
/// The `nonce` value when requesting ID Token during login process. Use this value as a parameter when you
217206
/// verify the ID Token against the LINE server. This value is `null` if `.openID` permission is not requested.
218207
IDTokenNonce?: String
219208
}
220209
```
221210

211+
5. BotFriendshipStatus
212+
213+
```typescript
214+
{
215+
friendFlag: boolean
216+
}
217+
```
218+
222219
### Arguments
223220

224221
1. LoginArguments

0 commit comments

Comments
 (0)