I downloaded line-sdk-ios-swift-master from GitHUB . And then replace keys with my Line account key , replace project identifier to com.myproject.yeah , i can successfully login and retrieve AuthID.
But problem occur when i try to replicate the same thing on my project.
I copied the exactly same codes from line-sdk-ios-swift-master (Utils , LoginViewController , etc ) And setup the .plist .
I can pass the login , the sdk asked me for permission . (cancel allow) , it redirect me to "MYAPPNAME" and "openthisapp?" (cancel ok )
After i clicked (ok) and "open in "myapp""
It redirect me back to the App with , But the login is Failed with Error "User canceled or interrupted the login process"
You need to handle the app opening in your AppDelegate
:
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return LoginManager.shared.application(app, open: url, options: options)
}
If not, LINE SDK will think your user switched back to your app without any result and fail your login.
For more, you can check the documentation page here . It is described in step 3.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.