LINE SDK for iOS Swift
Developed in Swift, the LINE SDK for iOS Swift provides a modern way of implementing LINE APIs. The features included in this SDK will help you develop an iOS app with engaging and personalized user experience.
The LINE SDK for iOS Swift provides the following features.
This feature allows users to log in to your service with their LINE accounts. With the help of the LINE SDK for iOS Swift, it has never been easier to integrate LINE Login into your app. Your users will automatically log in to your app without entering their LINE credentials if they are already logged in to LINE on their iOS devices. This offers a great way for users to get started with your app without having to go through a registration process.
Utilizing user data with OpenID support
Once the user authorizes, you can get the user’s LINE profile. You can utilize the user's information registered in LINE without building your user system.
The LINE SDK supports the OpenID Connect 1.0 specification. You can get ID tokens that contain the user’s LINE profile when you retrieve the access token.
Using the SDK
- iOS 10.0 or later as the deployment target.
- Xcode 10 or later.
To use the LINE SDK with your iOS app, follow the steps below.
- Create a channel.
- Integrate LINE Login into your iOS app using the SDK.
- Make API calls from your app using the SDK or from server-side through the Social API.
Trying the starter app
To have a quick look at the features of the LINE SDK, try our starter app by following the steps below:
Clone the repository.
git clone https://github.com/line/line-sdk-ios-swift.git
LineSDK.xcworkspacefile in Xcode.
Build and run the
The starter app should launch.
If you believe you have discovered a vulnerability or have an issue related to security, please DO NOT open a public issue. Instead, send us a mail to firstname.lastname@example.org.
For contributing to this project, please see CONTRIBUTING.md.
You may find interesting
5.7.0 - 2020-09-16 07:47:23
- Xcode 12 support. The new Swift Package Manager support. Now the built-in UI of LINE SDK is also available when integrated with SPM. #161
5.6.2 - 2020-08-14 02:53:25
5.6.1 - 2020-08-05 05:46:41
- The completion handler for logging out was not called for HTTP status code 400. It now should be always called and not causing a hanging. #158
5.6.0 - 2020-06-11 05:24:35
- Open Chat support. You can create an Open Chat room with LINE SDK for Swift now. There are also some other public APIs to help checking room availability or user's memebership for a given Open Chat room. Check the official documentation and API Reference of
OpenChatCreatingControllerfor more information. #132
- Lots of improvement of reference and documentation comments.
5.5.2 - 2020-04-30 06:18:47
- Now explicitly log in with web view does not trigger the "LINE is not installed" warning on the login screen page.
5.5.1 - 2020-02-27 06:12:30
- Use standard parameter names from PKCE for OAuth 2.0 to replace the original One-Time-Password mechanism. #133
- An issue that some symbols cannot be found in XCFramework binary for Objective-C wrapper. #140
- Fix several dangling pointer warning for Xcode 11.4. #141
- Improve security for
noncegenerating to use a better random generator from Security.framework. #137
5.5.0 - 2019-12-17 05:09:22
- Add the
Userwhen getting friends list. Currently the
User.displayNameis a combination of
displayNameOriginal. It is a preferred version of user's name for displaying and searching. #125
- Support for
xcframework. Now you can download binary format of LINE SDK and LINE SDK Objective-C wrapper as
xcframework, as well as the related dSYMs and symbol map files from the release page. To implement this feature, we modified a bit for the exposed Objective-C wrapper module, to make sure the binary compatibility not broken in future releases. #126
- A missing localization for pt-BR when searching in sharing list panel. #127
5.4.0 - 2019-11-29 07:12:03
- Sharing UI support. Now you can request
.oneTimeSharepermission and present a
ShareViewControllerto let users select messages and share these messages to their friends or groups. LINE SDK provides a pre-defined UI for sharing messages. You can also build your own UI based on public methods in the SDK. #79
- Properties in
Groupto retrieve the "large" version and "small" version of a profile image. #30
- A new
relationsort option to get graph list sorted by relationship between current user and friends. #30
- Support for macCatalyst as a build target. #123
- Support for building against Swift Package Manager. Currently SPM does not support adding resource, so all UI related parts (such as
ShareViewController) are eliminated from SPM build. #70
LoginManager.Parametersfor flexible parameter configuration while login. #119
- Provide a way to set customized
noncevalue in ID Token. #119
- Now message payload setting provides more public setter. You can create a customized message payload much easier. #90
APIErrorDetailis now public, so you can get the detail error information when a
.invalidHTTPStatusAPIErrorerror happens. #115
- Dark mode is supported now for iOS 13 or later. Although all parts of LINE SDK is compatible with the dark mode, the login page and consent pages are not yet. They will be prepared eventually without a native SDK release. #105
resource_bundlesis used instead of
resourceswhen integrated by CocoaPods. #77
LoginManagerOptionsand the related login method is deprecated. Use
preferredWebPageLanguageis deprecated. Use the property with the same name in
- The general error type (
Error) version of error handling delegate method in
LoginButtonDelegateis deprecated. Use the specific
LineSDKErrorversion instead. #120
- All token related APIs in
APIare now deprecated. They are moved to
API.Authto distinguish from the normal public APIs. Not like
API, methods in
API.Authwill not try to automatically refresh your access token. #118
5.3.1 - 2019-10-25 07:38:50
- Web page preference language for Japanese now works properly with correct language code. #113
5.3.0 - 2019-09-17 06:34:35
LoginResult. This value can be used against the ID token verification API as a parameter.
- Some improvements in documentation spelling and grammar.
5.2.4 - 2019-08-23 08:11:55
- Source application validation is removed. Login with LINE app now works correctly on iOS 13. #97
5.2.3 - 2019-08-01 01:51:31
- An issue that the stored ID Token will be overwritten when a refreshed token is issued. #88
5.2.2 - 2019-07-29 06:54:22
- When verifying token, get the provider metadata
issuerfrom open ID discovery document, instead of a fixed value. #86
5.2.1 - 2019-07-19 06:16:10
- Align the behavior of
LineSDKLoginButton(wrapper class) to LoginButton, when user click login, will only return if login process is ongoing. #78
5.2.0 - 2019-06-12 02:02:36
- Support for customizing the language used when login through web page. Set
LoginManagerto apply the required language. The default behavior (using the system language on user's device) is not changed. #61
- Support for accessing AMR (Authentication Methods References) value in ID Token. #63
- Now you can use either Swift 4.2 or Swift 5.0 when integrating LINE SDK with CocoaPods. #60
AccessTokenis now marked as
private. We do not encourage you to use or store the refresh token yourself. Instead, always use the refresh token API from client when you want to get a new access token.
5.1.2 - 2019-04-15 04:41:45
- Logging out a user now revokes refresh token and its corresponding access tokens, instead of the current access token only. #45
5.1.1 - 2019-03-28 05:21:48
- Allow additional application bundle ID of LINE apps to grant authorization code.
5.1.0 - 2019-02-26 04:05:59
- Some model types also support
Encodablenow for easier serialization.
- Support JSON conversion for Objective-C model wrapper classes for future features.
- Now you can get the raw ID Token value for server verification purpose.
- Add compatibility for Swift 5.0 and Xcode 10.2.
5.0.3 - 2019-01-17 01:54:20
- Build LineSDKObjC with Carthage now works properly with all targets included. #13
5.0.2 - 2018-12-18 01:35:15
5.0.1 - 2018-11-29 06:34:51
5.0.0 - 2018-11-20 06:18:49
Initial release of LINE SDK Swift. Now the LINE SDK is an open source project.
LINE SDK version 5 is not compatible with version 4.x. To upgrade to version 5, check the Migration Guide.
- Support LINE Login v2.1, which provide a fine-tuned authorization permissions and more safety authorizing flow. See LINE Login v2.1 for more about it.
Warning: Tokens from LINE Login v2.0 will be invalidated and your users will be logged out once you upgrade your SDK integration from version 4.x or earlier.
- ID Token with ECDSA verification based on OpenID protocol. It provides a secure way to verify user information.
- You can use a predefined login button to let your users login now. The button follows LINE Login button design guideline. It provides a quick way to integrate LINE Login to your app. See
- A potential issue which causes authorizing from LINE app may fail on devices with iOS 12.
- The automatically token refreshing should now work properly when receives a token expiring error from LINE Login Server.