N
N
neura2016-10-20 11:06:00
iOS
neura, 2016-10-20 11:06:00

Error when trying to login in OK [Swift 3]?


When I try to login in Odnoklassniki , I get two errors in sequence =okxxxxxxx//authorize&response_type=token&layout=a&" - error: "The operation couldn't be completed. (OSStatus error -10814.)"
2016-10-20 10:54:10.670109 discount[4733:1123985] Warning: Attempt to present on whose view is not in the window hierarchy!
I understand the error here
let settings = OKSDKInitSettings()
settings.appKey = "xxxxxxxxx"
settings.appId = "xxxxxxxxx"
settings.controllerHandler = {
return self.window?.rootViewController
}
Namely in rootViewController because my first controller GuideController hides after user login, but I don't know how to fix it. Please tell
me UPDATE: Apparently it's still in the URL (didn't notice the warning)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
dgreen, 2016-10-20
@neura

try the latest https://cocoapods.org/pods/ok-ios-sdk

V
Vjacheslav Kanivetc, 2016-10-20
@Vjaka

Well, the first is not an error, it is an attempt to access the installed OK application on the phone. It is obviously not set, then authorization should go to the webview

B
berz61, 2017-04-06
@berz61

The problem is solved like this:
let settings = OKSDKInitSettings()
settings.appKey = "xxxxxxxxx"
settings.appId = "xxxxxxxxx"
settings.controllerHandler = {
return self.window?.rootViewController.presentedViewController
}
You need to present the child controller, in other words

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question