I have an application in VC sharing. After the user presses the button that causes sharing, he is transferred to the VC application, in which he confirms the permissions. The problem is that after confirming the user does not return to the application where the sharing was pressed. Instead, the user remains in the VC application and a post of posts is displayed in front of him.
I have added to info.plist
<key>LSApplicationQueriesSchemes</key> <array> <string>vkauthorize</string> </array> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>vk0000000</string> </array> <key>CFBundleURLName</key> <string>vk0000000</string> </dict> </array> in appDelegate
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { VKSdk.processOpenURL(url, fromApplication: sourceApplication) return true } in the controller from where the sharing is caused
override func viewDidLoad() { super.viewDidLoad() VKSdk.initializeWithDelegate(self, andAppId: "5087664") if VKSdk.wakeUpSession() { } } func vkSdkNeedCaptchaEnter(captchaError: VKError!) { } func vkSdkTokenHasExpired(expiredToken: VKAccessToken!) { } func vkSdkUserDeniedAccess(authorizationError: VKError!) { } func vkSdkShouldPresentViewController(controller: UIViewController!) { } func vkSdkReceivedNewToken(newToken: VKAccessToken!) { } @IBAction func shareToVK(sender: AnyObject) { var imgArray = [AnyObject]() let share = VKShareDialogController() share.text = "Клевое приложение про танки!" let img = VKUploadImage(image:imgToShare, andParams: nil) imgArray.append(img) let link = NSURL(string: "www.ya.ru") share.shareLink = VKShareLink(title: "Preved", link: link) share.uploadImages = imgArray share.completionHandler = { (result : VKShareDialogControllerResult) -> Void in self.dismissViewControllerAnimated(true, completion: nil) } self.presentViewController(share, animated: true, completion: nil) } What could be the problem ?