I can not log in to VKontakte. There is no documentation on Swift in VKontakte, only on objective-c. I tried to do this:
Connected VKSdk.framework. In the AppDelegate registered openurl:
func application(application: UIApplication, openURL url: NSURL, sourceApplication: NSString?, annotation: AnyObject) -> Bool { var wasHandled:Bool = VKSdk.processOpenURL(url, fromApplication: sourceApplication) return wasHandled } In class:
import UIKit class ViewController: UIViewController { var viewController: UIViewController? let SCOPE = [ "friends" ]; override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. VKSdk.initializeWithDelegate(self, andAppId: "4727261") if (VKSdk.wakeUpSession()) { } else { VKSdk.authorize(SCOPE); } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } Swears at the line:
VKSdk.initializeWithDelegate(self, andAppId: "4727261") Who faced, tell me what to send.