Guest User

Untitled

a guest
Jul 20th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. pod "VK-ios-sdk"
  2.  
  3. use_frameworks!
  4.  
  5. import VK_ios_sdk
  6. import UIKit
  7.  
  8. class GameViewController: UIViewController, VKSdkDelegate, VKSdkUIDelegate {
  9. let VK_APP_ID = "0000000000000000" // Идентификатор Вашего VK-приложения
  10. override func viewDidLoad() {
  11. let sdkInstance = VKSdk.initializeWithAppId(self.VK_APP_ID)
  12. sdkInstance.registerDelegate(self)
  13. sdkInstance.uiDelegate = self
  14. }
  15. // Методы протоколов VK SDK
  16. fun vkSdkAccessAuthorizationFinishedWithResult(result:VKAuthorizationResult?) -> Void {
  17.  
  18. }
  19.  
  20. func vkSdkUserAuthorizationFailed() -> Void {
  21.  
  22. }
  23.  
  24. func vkSdkAccessTokenUpdated(newToken:VKAccessToken?, oldToken:VKAccessToken?) -> Void {
  25.  
  26. }
  27.  
  28. func vkSdkAuthorizationStateUpdatedWithResult(result:VKAuthorizationResult) -> Void {
  29.  
  30. }
  31.  
  32. func vkSdkShouldPresentViewController(controller:UIViewController?) -> Void {
  33.  
  34. }
  35.  
  36. func vkSdkNeedCaptchaEnter(captchaError:VKError?) -> Void {
  37.  
  38. }
  39. }
Add Comment
Please, Sign In to add comment