diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.podspec b/VK-ios-sdk.podspec old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcodeproj/project.pbxproj b/VK-ios-sdk.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/VK-ios-sdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcodeproj/project.xcworkspace/xcshareddata/VK-ios-sdk.xccheckout b/VK-ios-sdk.xcodeproj/project.xcworkspace/xcshareddata/VK-ios-sdk.xccheckout old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcodeproj/project.xcworkspace/xcshareddata/VKSdk.xccheckout b/VK-ios-sdk.xcodeproj/project.xcworkspace/xcshareddata/VKSdk.xccheckout old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme b/VK-ios-sdk.xcodeproj/xcshareddata/xcschemes/Framework.xcscheme old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcworkspace/contents.xcworkspacedata b/VK-ios-sdk.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/VK-ios-sdk.xcworkspace/xcshareddata/VK-ios-sdk.xccheckout b/VK-ios-sdk.xcworkspace/xcshareddata/VK-ios-sdk.xccheckout old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn.png b/VKSdkResources.bundle/BlueBtn.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn@2x.png b/VKSdkResources.bundle/BlueBtn@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn@3x.png b/VKSdkResources.bundle/BlueBtn@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn_pressed.png b/VKSdkResources.bundle/BlueBtn_pressed.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn_pressed@2x.png b/VKSdkResources.bundle/BlueBtn_pressed@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/BlueBtn_pressed@3x.png b/VKSdkResources.bundle/BlueBtn_pressed@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/Disclosure.png b/VKSdkResources.bundle/Disclosure.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/Disclosure@2x.png b/VKSdkResources.bundle/Disclosure@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/Disclosure@3x.png b/VKSdkResources.bundle/Disclosure@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/Info.plist b/VKSdkResources.bundle/Info.plist old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/en.lproj/InfoPlist.strings b/VKSdkResources.bundle/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/en.lproj/Localizable.strings b/VKSdkResources.bundle/en.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_deleteattach.png b/VKSdkResources.bundle/ic_deleteattach.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_deleteattach@2x.png b/VKSdkResources.bundle/ic_deleteattach@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_deletephoto.png b/VKSdkResources.bundle/ic_deletephoto.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_deletephoto@2x.png b/VKSdkResources.bundle/ic_deletephoto@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_activity_logo.png b/VKSdkResources.bundle/ic_vk_activity_logo.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_activity_logo@2x.png b/VKSdkResources.bundle/ic_vk_activity_logo@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_activity_logo@2x~ipad.png b/VKSdkResources.bundle/ic_vk_activity_logo@2x~ipad.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_activity_logo@3x.png b/VKSdkResources.bundle/ic_vk_activity_logo@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_activity_logo~ipad.png b/VKSdkResources.bundle/ic_vk_activity_logo~ipad.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_ios7_activity_logo.png b/VKSdkResources.bundle/ic_vk_ios7_activity_logo.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_ios7_activity_logo@2x.png b/VKSdkResources.bundle/ic_vk_ios7_activity_logo@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_ios7_activity_logo@2x~ipad.png b/VKSdkResources.bundle/ic_vk_ios7_activity_logo@2x~ipad.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_ios7_activity_logo@3x.png b/VKSdkResources.bundle/ic_vk_ios7_activity_logo@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_ios7_activity_logo~ipad.png b/VKSdkResources.bundle/ic_vk_ios7_activity_logo~ipad.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_logo_nb.png b/VKSdkResources.bundle/ic_vk_logo_nb.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_logo_nb@2x.png b/VKSdkResources.bundle/ic_vk_logo_nb@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ic_vk_logo_nb@3x.png b/VKSdkResources.bundle/ic_vk_logo_nb@3x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/img_newpostattachlink.png b/VKSdkResources.bundle/img_newpostattachlink.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/img_newpostattachlink@2x.png b/VKSdkResources.bundle/img_newpostattachlink@2x.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/ru.lproj/Localizable.strings b/VKSdkResources.bundle/ru.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/vk_settings.png b/VKSdkResources.bundle/vk_settings.png old mode 100644 new mode 100755 diff --git a/VKSdkResources.bundle/vk_settings@2x.png b/VKSdkResources.bundle/vk_settings@2x.png old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication.xcodeproj/project.pbxproj b/example/VKSDKTestApplication.xcodeproj/project.pbxproj old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/VKSDKTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication.xcodeproj/project.xcworkspace/xcshareddata/VKSDKTestApplication.xccheckout b/example/VKSDKTestApplication.xcodeproj/project.xcworkspace/xcshareddata/VKSDKTestApplication.xccheckout old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/ApiCallViewController.h b/example/VKSDKTestApplication/ApiCallViewController.h old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/ApiCallViewController.m b/example/VKSDKTestApplication/ApiCallViewController.m old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/Images.xcassets/AppIcon.appiconset/Contents.json b/example/VKSDKTestApplication/Images.xcassets/AppIcon.appiconset/Contents.json old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/Images.xcassets/LaunchImage.launchimage/Contents.json b/example/VKSDKTestApplication/Images.xcassets/LaunchImage.launchimage/Contents.json old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/Storyboard.storyboard b/example/VKSDKTestApplication/Storyboard.storyboard old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/TestViewController.h b/example/VKSDKTestApplication/TestViewController.h old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/TestViewController.m b/example/VKSDKTestApplication/TestViewController.m old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKAppDelegate.h b/example/VKSDKTestApplication/VKAppDelegate.h old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKAppDelegate.m b/example/VKSDKTestApplication/VKAppDelegate.m old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKSDKTestApplication-Info.plist b/example/VKSDKTestApplication/VKSDKTestApplication-Info.plist old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKSDKTestApplication-Prefix.pch b/example/VKSDKTestApplication/VKSDKTestApplication-Prefix.pch old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKStartScreen.h b/example/VKSDKTestApplication/VKStartScreen.h old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/VKStartScreen.m b/example/VKSDKTestApplication/VKStartScreen.m old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/apple.png b/example/VKSDKTestApplication/apple.png old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/en.lproj/InfoPlist.strings b/example/VKSDKTestApplication/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/main.m b/example/VKSDKTestApplication/main.m old mode 100644 new mode 100755 diff --git a/example/VKSDKTestApplication/ru.lproj/InfoPlist.strings b/example/VKSDKTestApplication/ru.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/library/DynamicFramework/Info.plist b/library/DynamicFramework/Info.plist old mode 100644 new mode 100755 diff --git a/library/DynamicFramework/VKSdkFramework.h b/library/DynamicFramework/VKSdkFramework.h old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn.png b/library/Resources/BlueBtn.png old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn@2x.png b/library/Resources/BlueBtn@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn@3x.png b/library/Resources/BlueBtn@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn_pressed.png b/library/Resources/BlueBtn_pressed.png old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn_pressed@2x.png b/library/Resources/BlueBtn_pressed@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/BlueBtn_pressed@3x.png b/library/Resources/BlueBtn_pressed@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/Disclosure.png b/library/Resources/Disclosure.png old mode 100644 new mode 100755 diff --git a/library/Resources/Disclosure@2x.png b/library/Resources/Disclosure@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/Disclosure@3x.png b/library/Resources/Disclosure@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/Resources-Info.plist b/library/Resources/Resources-Info.plist old mode 100644 new mode 100755 diff --git a/library/Resources/en.lproj/InfoPlist.strings b/library/Resources/en.lproj/InfoPlist.strings old mode 100644 new mode 100755 diff --git a/library/Resources/en.lproj/Localizable.strings b/library/Resources/en.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/library/Resources/ic_deleteattach.png b/library/Resources/ic_deleteattach.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_deleteattach@2x.png b/library/Resources/ic_deleteattach@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_deletephoto.png b/library/Resources/ic_deletephoto.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_deletephoto@2x.png b/library/Resources/ic_deletephoto@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_activity_logo.png b/library/Resources/ic_vk_activity_logo.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_activity_logo@2x.png b/library/Resources/ic_vk_activity_logo@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_activity_logo@2x~ipad.png b/library/Resources/ic_vk_activity_logo@2x~ipad.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_activity_logo@3x.png b/library/Resources/ic_vk_activity_logo@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_activity_logo~ipad.png b/library/Resources/ic_vk_activity_logo~ipad.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_ios7_activity_logo.png b/library/Resources/ic_vk_ios7_activity_logo.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_ios7_activity_logo@2x.png b/library/Resources/ic_vk_ios7_activity_logo@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_ios7_activity_logo@2x~ipad.png b/library/Resources/ic_vk_ios7_activity_logo@2x~ipad.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_ios7_activity_logo@3x.png b/library/Resources/ic_vk_ios7_activity_logo@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_ios7_activity_logo~ipad.png b/library/Resources/ic_vk_ios7_activity_logo~ipad.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_logo_nb.png b/library/Resources/ic_vk_logo_nb.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_logo_nb@2x.png b/library/Resources/ic_vk_logo_nb@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ic_vk_logo_nb@3x.png b/library/Resources/ic_vk_logo_nb@3x.png old mode 100644 new mode 100755 diff --git a/library/Resources/img_newpostattachlink.png b/library/Resources/img_newpostattachlink.png old mode 100644 new mode 100755 diff --git a/library/Resources/img_newpostattachlink@2x.png b/library/Resources/img_newpostattachlink@2x.png old mode 100644 new mode 100755 diff --git a/library/Resources/ru.lproj/Localizable.strings b/library/Resources/ru.lproj/Localizable.strings old mode 100644 new mode 100755 diff --git a/library/Resources/vk_settings.png b/library/Resources/vk_settings.png old mode 100644 new mode 100755 diff --git a/library/Resources/vk_settings@2x.png b/library/Resources/vk_settings@2x.png old mode 100644 new mode 100755 diff --git a/library/Source/API/VKApi.h b/library/Source/API/VKApi.h index 5c5dca0..85ea39f 100644 --- a/library/Source/API/VKApi.h +++ b/library/Source/API/VKApi.h @@ -29,9 +29,11 @@ #import "VKApiConst.h" #import "VKApiCaptcha.h" #import "VKApiGroups.h" +#import "VKApiDocs.h" #import "VKImageParameters.h" #import "VKApiModels.h" + /** Provides access for API parts. */ diff --git a/library/Source/API/VKApi.m b/library/Source/API/VKApi.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiBase.h b/library/Source/API/methods/VKApiBase.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiBase.m b/library/Source/API/methods/VKApiBase.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiCaptcha.h b/library/Source/API/methods/VKApiCaptcha.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiCaptcha.m b/library/Source/API/methods/VKApiCaptcha.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiConst.h b/library/Source/API/methods/VKApiConst.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiConst.m b/library/Source/API/methods/VKApiConst.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiDocs.h b/library/Source/API/methods/VKApiDocs.h new file mode 100644 index 0000000..962ed86 --- /dev/null +++ b/library/Source/API/methods/VKApiDocs.h @@ -0,0 +1,167 @@ +// +// VKApiUsers.h +// +// Copyright (c) 2014 VK.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import "VKApiBase.h" + +/** + Builds requests for API.docs part + */ +@interface VKApiDocs : VKApiBase + +/** + * Returns detailed information about user or community documents. + * https://vk.com/dev/docs.get + * + * @return Request to load + */ +- (VKRequest *)get; + +/** + * Returns detailed information about user or community documents. + * https://vk.com/dev/docs.get + * + * @param count Number of documents to return. + * + * @return Request to load + */ +- (VKRequest *)get:(NSInteger)count; + +/** + * Returns detailed information about user or community documents. + * https://vk.com/dev/docs.get + * + * @param count Number of documents to return. By default, all documents. + * @param offset Offset needed to return a specific subset of documents. + * + * @return Request to load + */ +- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset; + +/** + * Returns detailed information about user or community documents. + * https://vk.com/dev/docs.get + * + * @param count Number of documents to return. By default, all documents. + * @param offset Offset needed to return a specific subset of documents. + * @param ownerID ID of the user or community that owns the documents. Use a negative value to designate a community ID. + * + * @return Request to load + */ +- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset andOwnerID:(NSInteger)ownerID; + +/** + * Returns information about documents by their IDs. + * https://vk.com/dev/docs.getById + * @param IDs Document IDs. + * + * @return Request to load + */ +- (VKRequest *)getByID:(NSArray *)IDs; + +/** + * Returns the server address for document upload. + * https://vk.com/dev/docs.getUploadServer + * + * @param group_id Community ID (if the document will be uploaded to the community). + * + * @return Request to load + */ +- (VKRequest *)getUploadServer:(NSInteger)group_id; + +/** + * Returns the server address for document upload onto a user's or community's wall. + * https://vk.com/dev/docs.getWallUploadServer + * + * @param group_id Community ID (if the document will be uploaded to the community). + * + * @return Request to load + */ +- (VKRequest *)getWallUploadServer:(NSInteger)group_id; + +/** + * Saves a document after uploading it to a server. + * https://vk.com/dev/docs.save + * + * @param file This parameter is returned when the file is uploaded to the server. + * + * @return Request to load + */ +- (VKRequest *)save:(NSString *)file; + +/** + * Saves a document after uploading it to a server. + * https://vk.com/dev/docs.save + * + * @param file This parameter is returned when the file is uploaded to the server. + * @param title Document title. + * + * @return Request to load + */ +- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title; + +/** + * Saves a document after uploading it to a server. + * https://vk.com/dev/docs.save + * + * @param file This parameter is returned when the file is uploaded to the server. + * @param title Document title + * @param tags Document tags + * + * @return Request to load + */ +- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title andTags:(NSString *)tags; + +/** + * Deletes a user or community document. + * https://vk.com/dev/docs.delete + * + * @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. + * @param docID Document ID. + * + * @return Request to load + */ +- (VKRequest *)delete:(NSInteger)ownerID andDocID:(NSInteger)docID; + +/** + * Copies a document to a user's or community's document list. + * https://vk.com/dev/docs.add + * + * @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. + * @param docID Document ID. + * + * @return Request to load + */ +- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID; + +/** + * Copies a document to a user's or community's document list. + * https://vk.com/dev/docs.add + * + * @param ownerID ID of the user or community that owns the document. Use a negative value to designate a community ID. + * @param docID Document ID. + * @param accessKey Access key. This parameter is required if access_key was returned with the document's data. + * + * @return Request to load + */ +- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID andAccessKey:(NSString *)accessKey; + +@end diff --git a/library/Source/API/methods/VKApiDocs.m b/library/Source/API/methods/VKApiDocs.m new file mode 100644 index 0000000..0b7b2f3 --- /dev/null +++ b/library/Source/API/methods/VKApiDocs.m @@ -0,0 +1,113 @@ +// +// VKApiUsers.h +// +// Copyright (c) 2014 VK.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +#import "VKApiBase.h" +#import "VKApiDocs.h" +#import "VKDocs.h" + +/** + Builds requests for API.docs part + */ +@implementation VKApiDocs : VKApiBase + +- (VKRequest *)get { + return [self prepareRequestWithMethodName:@"get" andParameters:nil andHttpMethod:@"GET" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)get:(NSInteger)count { + return [self prepareRequestWithMethodName:@"get" andParameters: @{VK_API_COUNT : @(count)} andHttpMethod:@"GET" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset { + return [self prepareRequestWithMethodName:@"get" andParameters: + @{ + VK_API_COUNT : @(count), + VK_API_OFFSET : @(offset), + } + andHttpMethod:@"GET" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)get:(NSInteger)count andOffset:(NSInteger)offset andOwnerID:(NSInteger)ownerID { + return [self prepareRequestWithMethodName:@"get" andParameters: + @{ + VK_API_COUNT : @(count), + VK_API_OFFSET : @(offset), + VK_API_OWNER_ID : @(ownerID), + } + andHttpMethod:@"GET" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)getByID:(NSArray *)IDs { + return [self prepareRequestWithMethodName:@"getById" andParameters:@{@"docs" : IDs} andHttpMethod:@"GET" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)getUploadServer:(NSInteger)group_id { + return [self prepareRequestWithMethodName:@"getUploadServer" andParameters:@{VK_API_GROUP_ID : [@(group_id) stringValue]} andHttpMethod:@"GET"]; +} + +- (VKRequest *)getWallUploadServer:(NSInteger)group_id { + return [self prepareRequestWithMethodName:@"getWallUploadServer" andParameters:@{VK_API_GROUP_ID : [@(group_id) stringValue]} andHttpMethod:@"GET"]; +} + +- (VKRequest *)save:(NSString *)file { + return [self prepareRequestWithMethodName:@"delete" andParameters:@{VK_API_FILE : file} andHttpMethod:@"POST" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title { + return [self prepareRequestWithMethodName:@"delete" andParameters:@{ + VK_API_FILE : file, + VK_API_TITLE : title, + } andHttpMethod:@"POST" andClassOfModel:[VKDocsArray class]]; +} + + +- (VKRequest *)save:(NSString *)file andTitle:(NSString *)title andTags:(NSString *)tags { + return [self prepareRequestWithMethodName:@"delete" andParameters:@{ + VK_API_FILE : file, + VK_API_TITLE : title, + VK_API_TAGS : tags + } andHttpMethod:@"POST" andClassOfModel:[VKDocsArray class]]; +} + +- (VKRequest *)delete:(NSInteger)ownerID andDocID:(NSInteger)docID { + return [self prepareRequestWithMethodName:@"save" andParameters:@{ + VK_API_OWNER_ID : [@(ownerID) stringValue], + VK_API_DOC_ID : [@(docID) stringValue], + } andHttpMethod:@"POST"]; +} + +- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID { + return [self prepareRequestWithMethodName:@"add" andParameters:@{ + VK_API_OWNER_ID : [@(ownerID) stringValue], + VK_API_DOC_ID : [@(docID) stringValue] + } andHttpMethod:@"POST"]; +} + +- (VKRequest *)add:(NSInteger)ownerID andDocID:(NSInteger)docID andAccessKey:(NSString *)accessKey { + return [self prepareRequestWithMethodName:@"add" andParameters:@{ + VK_API_OWNER_ID : [@(ownerID) stringValue], + VK_API_DOC_ID : [@(docID) stringValue], + VK_API_ACCESS_KEY : accessKey + } andHttpMethod:@"POST"]; +} + +@end diff --git a/library/Source/API/methods/VKApiFriends.h b/library/Source/API/methods/VKApiFriends.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiFriends.m b/library/Source/API/methods/VKApiFriends.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiGroups.h b/library/Source/API/methods/VKApiGroups.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiGroups.m b/library/Source/API/methods/VKApiGroups.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiModels.h b/library/Source/API/methods/VKApiModels.h index 4118e53..2ab057d 100644 --- a/library/Source/API/methods/VKApiModels.h +++ b/library/Source/API/methods/VKApiModels.h @@ -30,4 +30,5 @@ #import "VKLikes.h" #import "VKSchool.h" #import "VKUniversity.h" -#import "VKGroup.h" \ No newline at end of file +#import "VKGroup.h" +#import "VKDocs.h" \ No newline at end of file diff --git a/library/Source/API/methods/VKApiPhotos.h b/library/Source/API/methods/VKApiPhotos.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiPhotos.m b/library/Source/API/methods/VKApiPhotos.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiUsers.h b/library/Source/API/methods/VKApiUsers.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiUsers.m b/library/Source/API/methods/VKApiUsers.m old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiWall.h b/library/Source/API/methods/VKApiWall.h old mode 100644 new mode 100755 diff --git a/library/Source/API/methods/VKApiWall.m b/library/Source/API/methods/VKApiWall.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKApiObject.h b/library/Source/API/models/VKApiObject.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKApiObject.m b/library/Source/API/models/VKApiObject.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKApiObjectArray.h b/library/Source/API/models/VKApiObjectArray.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKApiObjectArray.m b/library/Source/API/models/VKApiObjectArray.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKAudio.h b/library/Source/API/models/VKAudio.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKAudio.m b/library/Source/API/models/VKAudio.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKCounters.h b/library/Source/API/models/VKCounters.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKCounters.m b/library/Source/API/models/VKCounters.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKDocs.h b/library/Source/API/models/VKDocs.h new file mode 100644 index 0000000..d90d442 --- /dev/null +++ b/library/Source/API/models/VKDocs.h @@ -0,0 +1,34 @@ +// +// VKDocs.h +// Pods +// +// Created by Mike on 1/6/16. +// +// + +#import +#import "VKApiObject.h" +#import "VKApiObjectArray.h" + +@class VKDocs; + +/** + Docs type of VK API. See descriptions here https://vk.com/dev/doc + */ +@interface VKDocs : VKApiObject +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSNumber *owner_id; +@property(nonatomic, strong) NSString *title; +@property(nonatomic, strong) NSNumber *size; +@property(nonatomic, strong) NSString *ext; +@property(nonatomic, strong) NSString *url; +@property(nonatomic, strong) NSString *photo_100; +@property(nonatomic, strong) NSString *photo_130; +@property(nonatomic, strong) NSNumber *date; +@end + +/** + Array of API docs objects + */ +@interface VKDocsArray : VKApiObjectArray +@end \ No newline at end of file diff --git a/library/Source/API/models/VKDocs.m b/library/Source/API/models/VKDocs.m new file mode 100644 index 0000000..8a3fba8 --- /dev/null +++ b/library/Source/API/models/VKDocs.m @@ -0,0 +1,20 @@ +// +// VKDocs.m +// Pods +// +// Created by Mike on 1/6/16. +// +// + + +#import "VKDocs.h" + +@implementation VKDocs + +@end + +@implementation VKDocsArray +- (instancetype)initWithDictionary:(NSDictionary *)dict { + return [super initWithDictionary:dict objectClass:[VKDocs class]]; +} +@end \ No newline at end of file diff --git a/library/Source/API/models/VKGroup.h b/library/Source/API/models/VKGroup.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKGroup.m b/library/Source/API/models/VKGroup.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKLikes.h b/library/Source/API/models/VKLikes.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKLikes.m b/library/Source/API/models/VKLikes.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKPhoto.h b/library/Source/API/models/VKPhoto.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKPhoto.m b/library/Source/API/models/VKPhoto.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKPhotoSize.h b/library/Source/API/models/VKPhotoSize.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKPhotoSize.m b/library/Source/API/models/VKPhotoSize.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKRelative.h b/library/Source/API/models/VKRelative.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKRelative.m b/library/Source/API/models/VKRelative.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKSchool.h b/library/Source/API/models/VKSchool.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKSchool.m b/library/Source/API/models/VKSchool.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKUniversity.h b/library/Source/API/models/VKUniversity.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKUniversity.m b/library/Source/API/models/VKUniversity.m old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKUser.h b/library/Source/API/models/VKUser.h old mode 100644 new mode 100755 diff --git a/library/Source/API/models/VKUser.m b/library/Source/API/models/VKUser.m old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadMessagesPhotoRequest.h b/library/Source/API/upload/VKUploadMessagesPhotoRequest.h old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadMessagesPhotoRequest.m b/library/Source/API/upload/VKUploadMessagesPhotoRequest.m old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadPhotoBase.h b/library/Source/API/upload/VKUploadPhotoBase.h old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadPhotoBase.m b/library/Source/API/upload/VKUploadPhotoBase.m old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadPhotoRequest.h b/library/Source/API/upload/VKUploadPhotoRequest.h old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadPhotoRequest.m b/library/Source/API/upload/VKUploadPhotoRequest.m old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadWallPhotoRequest.h b/library/Source/API/upload/VKUploadWallPhotoRequest.h old mode 100644 new mode 100755 diff --git a/library/Source/API/upload/VKUploadWallPhotoRequest.m b/library/Source/API/upload/VKUploadWallPhotoRequest.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/NSError+VKError.h b/library/Source/Core/NSError+VKError.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/NSError+VKError.m b/library/Source/Core/NSError+VKError.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKError.h b/library/Source/Core/VKError.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKError.m b/library/Source/Core/VKError.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKHTTPClient.h b/library/Source/Core/VKHTTPClient.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKHTTPClient.m b/library/Source/Core/VKHTTPClient.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKHTTPOperation.h b/library/Source/Core/VKHTTPOperation.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKHTTPOperation.m b/library/Source/Core/VKHTTPOperation.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKJSONOperation.h b/library/Source/Core/VKJSONOperation.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKJSONOperation.m b/library/Source/Core/VKJSONOperation.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKObject.h b/library/Source/Core/VKObject.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKObject.m b/library/Source/Core/VKObject.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKOperation.h b/library/Source/Core/VKOperation.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKOperation.m b/library/Source/Core/VKOperation.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKRequest.h b/library/Source/Core/VKRequest.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKRequest.m b/library/Source/Core/VKRequest.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKRequestsScheduler.h b/library/Source/Core/VKRequestsScheduler.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKRequestsScheduler.m b/library/Source/Core/VKRequestsScheduler.m old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKResponse.h b/library/Source/Core/VKResponse.h old mode 100644 new mode 100755 diff --git a/library/Source/Core/VKResponse.m b/library/Source/Core/VKResponse.m old mode 100644 new mode 100755 diff --git a/library/Source/Image/VKImageParameters.h b/library/Source/Image/VKImageParameters.h old mode 100644 new mode 100755 diff --git a/library/Source/Image/VKImageParameters.m b/library/Source/Image/VKImageParameters.m old mode 100644 new mode 100755 diff --git a/library/Source/Image/VKUploadImage.h b/library/Source/Image/VKUploadImage.h old mode 100644 new mode 100755 diff --git a/library/Source/Image/VKUploadImage.m b/library/Source/Image/VKUploadImage.m old mode 100644 new mode 100755 diff --git a/library/Source/Utils/NSData+MD5.h b/library/Source/Utils/NSData+MD5.h old mode 100644 new mode 100755 diff --git a/library/Source/Utils/NSData+MD5.m b/library/Source/Utils/NSData+MD5.m old mode 100644 new mode 100755 diff --git a/library/Source/Utils/NSString+MD5.h b/library/Source/Utils/NSString+MD5.h old mode 100644 new mode 100755 diff --git a/library/Source/Utils/NSString+MD5.m b/library/Source/Utils/NSString+MD5.m old mode 100644 new mode 100755 diff --git a/library/Source/Utils/OrderedDictionary.h b/library/Source/Utils/OrderedDictionary.h old mode 100644 new mode 100755 diff --git a/library/Source/Utils/OrderedDictionary.m b/library/Source/Utils/OrderedDictionary.m old mode 100644 new mode 100755 diff --git a/library/Source/Utils/VKUtil.h b/library/Source/Utils/VKUtil.h old mode 100644 new mode 100755 diff --git a/library/Source/Utils/VKUtil.m b/library/Source/Utils/VKUtil.m old mode 100644 new mode 100755 diff --git a/library/Source/VKAccessToken.h b/library/Source/VKAccessToken.h old mode 100644 new mode 100755 diff --git a/library/Source/VKAccessToken.m b/library/Source/VKAccessToken.m old mode 100644 new mode 100755 diff --git a/library/Source/VKAuthorizationResult.h b/library/Source/VKAuthorizationResult.h old mode 100644 new mode 100755 diff --git a/library/Source/VKAuthorizationResult.m b/library/Source/VKAuthorizationResult.m old mode 100644 new mode 100755 diff --git a/library/Source/VKBatchRequest.h b/library/Source/VKBatchRequest.h old mode 100644 new mode 100755 diff --git a/library/Source/VKBatchRequest.m b/library/Source/VKBatchRequest.m old mode 100644 new mode 100755 diff --git a/library/Source/VKBundle.h b/library/Source/VKBundle.h old mode 100644 new mode 100755 diff --git a/library/Source/VKBundle.m b/library/Source/VKBundle.m old mode 100644 new mode 100755 diff --git a/library/Source/VKPermissions.h b/library/Source/VKPermissions.h old mode 100644 new mode 100755 diff --git a/library/Source/VKPermissions.m b/library/Source/VKPermissions.m old mode 100644 new mode 100755 diff --git a/library/Source/VKSdk.h b/library/Source/VKSdk.h old mode 100644 new mode 100755 index ef78bf0..520a7e9 --- a/library/Source/VKSdk.h +++ b/library/Source/VKSdk.h @@ -109,20 +109,16 @@ typedef NS_ENUM(NSUInteger, VKAuthorizationState) { @optional /** - * Called when a controller presented by SDK will be dismissed - * - * @param controller View Controller that will be dismissed - * @param hadBeenCancelled Bool value stating whether the authorization had been cancelled by the user + * Called when a controller presented by SDK will be dismissed */ -- (void)vkSdkWillDismissViewController:(UIViewController *)controller wasCancelled:(BOOL)wasCancelled; +- (void)vkSdkWillDismissViewController:(UIViewController *)controller; /** - * Called when a controller presented by SDK did dismiss - * - * @param controller View Controller that was dismissed - * @param hadBeenCancelled Bool value stating whether the authorization had been cancelled by the user + * Called when a controller presented by SDK did dismiss */ -- (void)vkSdkDidDismissViewController:(UIViewController *)controller hadBeenCancelled:(BOOL)hadBeenCancelled; +- (void)vkSdkDidDismissViewController:(UIViewController *)controller; + + @end @@ -197,9 +193,6 @@ Otherwise Mobile Safari will be opened for access request. /// @name Access token methods ///------------------------------- - -+ (void)setAccessToken:(VKAccessToken *)token; - /** Returns token for API requests @return Received access token or nil, if user not yet authorized @@ -276,8 +269,8 @@ Enables or disables scheduling for requests - (void)vks_presentViewControllerThroughDelegate; -- (void)vks_viewControllerWillDismissWithAuthorizationCancellationState: (BOOL)cancelled; +- (void)vks_viewControllerWillDismiss; -- (void)vks_viewControllerDidDismissWithAuthorizationCancellationState: (BOOL)cancelled; +- (void)vks_viewControllerDidDismiss; @end \ No newline at end of file diff --git a/library/Source/VKSdk.m b/library/Source/VKSdk.m old mode 100644 new mode 100755 index f934b06..a6dd610 --- a/library/Source/VKSdk.m +++ b/library/Source/VKSdk.m @@ -583,18 +583,16 @@ static NSString *VK_AUTHORIZE_URL_STRING = @"vkauthorize://authorize"; [[VKSdk instance].uiDelegate vkSdkShouldPresentViewController:self]; } -- (void)vks_viewControllerWillDismissWithAuthorizationCancellationState: (BOOL)cancelled { - if ([[VKSdk instance].uiDelegate respondsToSelector:@selector(vkSdkWillDismissViewController:wasCancelled:)]) { - [[VKSdk instance].uiDelegate vkSdkWillDismissViewController:self wasCancelled:cancelled]; +- (void)vks_viewControllerWillDismiss { + if ([[VKSdk instance].uiDelegate respondsToSelector:@selector(vkSdkWillDismissViewController:)]) { + [[VKSdk instance].uiDelegate vkSdkWillDismissViewController:self]; } } -- (void)vks_viewControllerDidDismissWithAuthorizationCancellationState: (BOOL)cancelled { - if ([[VKSdk instance].uiDelegate respondsToSelector:@selector(vkSdkDidDismissViewController:hadBeenCancelled:)]) { - [[VKSdk instance].uiDelegate vkSdkDidDismissViewController:self hadBeenCancelled:cancelled]; - +- (void)vks_viewControllerDidDismiss { + if ([[VKSdk instance].uiDelegate respondsToSelector:@selector(vkSdkDidDismissViewController:)]) { + [[VKSdk instance].uiDelegate vkSdkDidDismissViewController:self]; } - } @end diff --git a/library/Source/VKSdkVersion.h b/library/Source/VKSdkVersion.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKActivity.h b/library/Source/Views/VKActivity.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKActivity.m b/library/Source/Views/VKActivity.m old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKAuthorizeController.h b/library/Source/Views/VKAuthorizeController.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKAuthorizeController.m b/library/Source/Views/VKAuthorizeController.m old mode 100644 new mode 100755 index 200677b..6ea27e6 --- a/library/Source/Views/VKAuthorizeController.m +++ b/library/Source/Views/VKAuthorizeController.m @@ -192,7 +192,7 @@ [self setRightBarButtonActivity]; } if ([[[request URL] path] isEqual:@"/blank.html"]) { - [self dismissWithAuthorizationCancellationState: NO completion:^{ + [self dismissWithCompletion:^{ if ([VKSdk processOpenInternalURL:[request URL] validation:self.validationError != nil] && self.validationError) { [self.validationError.request repeat]; } else if (self.validationError) { @@ -241,7 +241,7 @@ #pragma mark Cancelation and dismiss - (void)cancelAuthorization:(id)sender { - [self dismissWithAuthorizationCancellationState: YES completion: ^{ + [self dismissWithCompletion:^{ if (!_validationError) { //Silent cancel [VKSdk processOpenInternalURL:[NSURL URLWithString:@"#"] validation:NO]; @@ -257,7 +257,7 @@ } } -- (void)dismissWithAuthorizationCancellationState:(BOOL)wasCancelled completion:(void (^)())completion { +- (void)dismissWithCompletion:(void (^)())completion { _finished = YES; if (_internalNavigationController.isBeingDismissed) { @@ -270,24 +270,24 @@ if (!_internalNavigationController) { if (self.navigationController) { - [self vks_viewControllerWillDismissWithAuthorizationCancellationState:wasCancelled]; + [self vks_viewControllerWillDismiss]; [self.navigationController popViewControllerAnimated:YES]; if (completion) { completion(); } } else if (self.presentingViewController) { - [self vks_viewControllerWillDismissWithAuthorizationCancellationState:wasCancelled]; + [self vks_viewControllerWillDismiss]; [self.presentingViewController dismissViewControllerAnimated:YES completion:^{ - [self vks_viewControllerDidDismissWithAuthorizationCancellationState:wasCancelled]; + [self vks_viewControllerDidDismiss]; if (completion) { completion(); } }]; } } else { - [self vks_viewControllerWillDismissWithAuthorizationCancellationState:wasCancelled]; + [self vks_viewControllerWillDismiss]; [_internalNavigationController.presentingViewController dismissViewControllerAnimated:YES completion:^{ - [self vks_viewControllerDidDismissWithAuthorizationCancellationState:wasCancelled]; + [self vks_viewControllerDidDismiss]; completion(); }]; } diff --git a/library/Source/Views/VKCaptchaView.h b/library/Source/Views/VKCaptchaView.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKCaptchaView.m b/library/Source/Views/VKCaptchaView.m old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKCaptchaViewController.h b/library/Source/Views/VKCaptchaViewController.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKCaptchaViewController.m b/library/Source/Views/VKCaptchaViewController.m old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKShareDialogController.h b/library/Source/Views/VKShareDialogController.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKShareDialogController.m b/library/Source/Views/VKShareDialogController.m old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKSharedTransitioningObject.h b/library/Source/Views/VKSharedTransitioningObject.h old mode 100644 new mode 100755 diff --git a/library/Source/Views/VKSharedTransitioningObject.m b/library/Source/Views/VKSharedTransitioningObject.m old mode 100644 new mode 100755