You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-32Lines changed: 32 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,8 @@ Inside your `AppDelegate.m`, setup the line sdk by passing the channel id obtain
61
61
1. Add `platform :ios, '10.0'` in `Podfile` line:1
62
62
2. Enable `use_frameworks!` in `Podfile` line:3
63
63
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)
|`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/). |
|`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/). |
133
134
134
135
### Return values
135
136
@@ -139,40 +140,34 @@ The following objects are returned on the methods described above:
139
140
140
141
```typescript
141
142
{
142
-
/// The user ID of the current authorized user.
143
+
/// The user ID of the current authorized user.
143
144
userID: String
144
145
145
146
/// The display name of the current authorized user.
146
-
displayName: String
147
+
displayName: string
147
148
148
149
/// The profile image URL of the current authorized user. `null` if the user has not set a profile
149
150
/// image.
150
-
pictureURL?:URL
151
-
152
-
/// The large profile image URL of the current authorized user. `null` if the user has not set a profile
153
-
/// image.
154
-
pictureURLLarge?:URL
155
-
156
-
/// The small profile image URL of the current authorized user. `null` if the user has not set a profile
157
-
/// image.
158
-
pictureURLSmall?:URL
151
+
pictureURL?:string
159
152
160
153
/// The status message of the current authorized user. `null` if the user has not set a status message.
161
-
statusMessage?:String
154
+
statusMessage?:string
162
155
}
163
156
```
164
157
165
158
2. AccessToken:
166
159
167
160
```typescript
168
161
{
169
-
/// The value of the access token.
162
+
/// The value of the access token.
170
163
access_token: String
171
-
172
164
/// The expiration time of the access token. It is calculated using `createdAt` and the validity period
173
165
/// of the access token. This value might not be the actual expiration time because this value depends
174
166
/// on the system time of the device when `createdAt` is determined.
175
167
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
176
171
}
177
172
```
178
173
@@ -195,7 +190,7 @@ The following objects are returned on the methods described above:
195
190
196
191
```typescript
197
192
{
198
-
/// The access token obtained by the login process.
193
+
/// The access token obtained by the login process.
199
194
accessToken: AccessToken
200
195
/// The permissions bound to the `accessToken` object by the authorization process. Scope has them separated by spaces
201
196
scope: String
@@ -207,15 +202,20 @@ The following objects are returned on the methods described above:
207
202
/// `LoginManagerOption` object when the user logs in. For more information, see Linking a bot with your LINE
208
203
/// Login channel at https://developers.line.me/en/docs/line-login/web/link-a-bot/.
209
204
friendshipStatusChanged?:boolean
210
-
/// The raw string value of the ID token bound to the access token. The value exists only if the access token
211
-
/// is obtained with the `.openID` permission.
212
-
lineIdToken?:String
213
205
/// The `nonce` value when requesting ID Token during login process. Use this value as a parameter when you
214
206
/// verify the ID Token against the LINE server. This value is `null` if `.openID` permission is not requested.
215
207
IDTokenNonce?:String
216
208
}
217
209
```
218
210
211
+
5. BotFriendshipStatus
212
+
213
+
```typescript
214
+
{
215
+
friendFlag: boolean
216
+
}
217
+
```
218
+
219
219
### Arguments
220
220
221
221
1. LoginArguments
@@ -232,21 +232,21 @@ The following objects are returned on the methods described above:
232
232
233
233
```typescript
234
234
{
235
-
email='email',
235
+
EMAIL='email',
236
236
/// The permission to get an ID token in the login response.
237
-
openID='openid',
237
+
OPEN_ID='openid',
238
238
239
239
/// The permission to get the user's profile including the user ID, display name, and the profile image
0 commit comments