- iOS SDK
Try LINE Login on iOS with the starter application
Make sure you have:
- Created a Channel to use with your iOS starter application
- Have a Channel ID (can be found in the Channel Console)
- Xcode installed
- Cocoapods installed
- Clone the iOS SDK starter app repository
$ git clone https://github.com/line/line-sdk-starter-ios-v2.git
- To install the SDK, run the following command from either the LineSDKStarterObjC folder or LineSDKStarterSwift depending on whether you want to use the Objective-C or Swift sample app.
$ pod install
- Set the following values for your app in the Technical configuration page of the Channel Console
- iOS bundle ID: Bundle identifier of your app. Example: line-sdk-starter
- iOS scheme: “line3rdp.” + bundle ID. Example: line3rdp.line-sdk-starter
- In your Xcode project’s Info.plist file, set the ChannelID element in LineSDKConfig as your Channel ID.
Run the app using an iOS device or an emulator. When you first log in, you must agree to let the app access your profile information.
- Tap the “Log in with LINE” button to log in using app-to-app login. If the LINE app is installed on the device and you are logged in, you will be able to log in automatically without entering your login credentials.
- Tap the “Browser Login” button to log in using a Safari web view. The LINE Login screen opens in a web view where you can enter your LINE credentials (email and password) to log in.
Once you have logged in to the app, you can tap the buttons to try out the following features of the LINE SDK.
- Get user profile
- Refresh token
- Verify token
- Log out user
You have now seen how LINE Login works in a sample iOS app. To learn more about how to integrate LINE Login with your own iOS app, go to Integrating LINE Login with your iOS app.