From 3eceb5a61e9bb1724159bbba0adef79be04bc1fb Mon Sep 17 00:00:00 2001 From: Wuyx <1139965056@qq.com> Date: Wed, 30 Nov 2016 16:14:45 +0800 Subject: [PATCH] WAVkImpl3.6.0 --- frameworks/WAVkImpl.framework/WAVkImpl | 0 frameworks/VKSdkFramework.framework/Info.plist | 0 frameworks/VKSdkFramework.framework/_CodeSignature/CodeSignature | 0 frameworks/VKSdkFramework.framework/Headers/VKGroup.h | 122 + frameworks/VKSdkFramework.framework/Headers/VKRequestsScheduler.h | 42 frameworks/VKSdkFramework.framework/Headers/VKApiCaptcha.h | 34 frameworks/WAVkImpl.framework/Headers/WAVkImpl.h | 19 frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoBase.h | 52 frameworks/VKSdkFramework.framework/Headers/VKPhotoSize.h | 20 frameworks/VKSdkFramework.framework/Headers/VKApiConst.h | 123 + frameworks/VKSdkFramework.framework/Headers/VKDocs.h | 49 frameworks/VKSdkFramework.framework/Headers/VKPhoto.h | 55 frameworks/VKSdkFramework.framework/_CodeSignature/CodeRequirements | 0 frameworks/VKSdkFramework.framework/Headers/VKAccessToken.h | 114 + frameworks/VKSdkFramework.framework/Headers/VKApiBase.h | 61 frameworks/VKSdkFramework.framework/Headers/VKCaptchaViewController.h | 45 frameworks/VKSdkFramework.framework/Headers/VKSdk.h | 348 ++++ frameworks/VKSdkFramework.framework/Headers/VKAudio.h | 46 WAVkImpl.podspec | 25 frameworks/VKSdkFramework.framework/Headers/VKBatchRequest.h | 66 frameworks/VKSdkFramework.framework/Headers/NSData+MD5.h | 29 frameworks/VKSdkFramework.framework/Headers/VKHTTPOperation.h | 172 ++ frameworks/VKSdkFramework.framework/Headers/VKUser.h | 170 ++ frameworks/VKSdkFramework.framework/Headers/VKObject.h | 28 frameworks/VKSdkFramework.framework/Headers/VKSdkVersion.h | 24 frameworks/VKSdkFramework.framework/Headers/VKRequest.h | 270 +++ frameworks/VKSdkFramework.framework/Headers/VKCaptchaView.h | 41 frameworks/VKSdkFramework.framework/Headers/NSError+VKError.h | 51 frameworks/WAVkImpl.framework/_CodeSignature/CodeDirectory | 0 frameworks/VKSdkFramework.framework/Headers/VKImageParameters.h | 71 frameworks/VKSdkFramework.framework/Headers/VKOperation.h | 46 frameworks/VKSdkFramework.framework/Headers/VKApiGroups.h | 18 frameworks/VKSdkFramework.framework/Headers/VKUniversity.h | 42 frameworks/VKSdkFramework.framework/Headers/VKApiDocs.h | 266 +++ frameworks/VKSdkFramework.framework/Headers/VKSchool.h | 43 frameworks/VKSdkFramework.framework/Headers/VKPermissions.h | 45 frameworks/VKSdkFramework.framework/VKSdkFramework | 0 frameworks/VKSdkFramework.framework/Headers/NSString+MD5.h | 29 frameworks/VKSdkFramework.framework/Headers/VKApiUsers.h | 87 + frameworks/VKSdkFramework.framework/Headers/VKApiPhotos.h | 72 frameworks/WAVkImpl.framework/Modules/module.modulemap | 6 frameworks/VKSdkFramework.framework/Modules/module.modulemap | 6 frameworks/VKSdkFramework.framework/Headers/VKApiModels.h | 34 frameworks/VKSdkFramework.framework/Headers/VKError.h | 88 + frameworks/VKSdkFramework.framework/Headers/VKJSONOperation.h | 16 frameworks/VKSdkFramework.framework/Headers/VKRelative.h | 34 frameworks/VKSdkFramework.framework/Headers/VKBundle.h | 49 frameworks/VKSdkFramework.framework/Headers/VKAuthorizationResult.h | 77 frameworks/VKSdkFramework.framework/Headers/VKApiFriends.h | 32 frameworks/VKSdkFramework.framework/Headers/VKCounters.h | 47 frameworks/VKSdkFramework.framework/Headers/VKSharedTransitioningObject.h | 11 frameworks/VKSdkFramework.framework/Headers/VKApiObject.h | 65 frameworks/VKSdkFramework.framework/Headers/VKUploadImage.h | 52 frameworks/VKSdkFramework.framework/Headers/VKApiObjectArray.h | 80 config/wa_sdk_impl_config_vk.xml | 14 frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoRequest.h | 39 frameworks/VKSdkFramework.framework/Headers/VKUploadMessagesPhotoRequest.h | 28 frameworks/VKSdkFramework.framework/Headers/VKApi.h | 129 + frameworks/VKSdkFramework.framework/Headers/VKShareDialogController.h | 74 frameworks/VKSdkFramework.framework/Headers/VKUtil.h | 82 + frameworks/VKSdkFramework.framework/Headers/VKUploadWallPhotoRequest.h | 38 frameworks/VKSdkFramework.framework/Headers/VKAuthorizeController.h | 81 + frameworks/VKSdkFramework.framework/Headers/OrderedDictionary.h | 37 frameworks/VKSdkFramework.framework/Headers/VKHTTPClient.h | 132 + frameworks/VKSdkFramework.framework/Headers/VKResponse.h | 41 frameworks/WAVkImpl.framework/_CodeSignature/CodeRequirements | 0 frameworks/VKSdkFramework.framework/Headers/VKLikes.h | 36 frameworks/VKSdkFramework.framework/_CodeSignature/CodeDirectory | 0 frameworks/WAVkImpl.framework/_CodeSignature/CodeResources | 127 + frameworks/VKSdkFramework.framework/Headers/VKActivity.h | 39 frameworks/WAVkImpl.framework/Info.plist | 0 frameworks/VKSdkFramework.framework/Headers/VKApiWall.h | 35 frameworks/VKSdkFramework.framework/_CodeSignature/CodeResources | 575 +++++++ frameworks/WAVkImpl.framework/_CodeSignature/CodeSignature | 0 74 files changed, 4,829 insertions(+), 0 deletions(-) diff --git a/WAVkImpl.podspec b/WAVkImpl.podspec new file mode 100644 index 0000000..cf53c5e --- /dev/null +++ b/WAVkImpl.podspec @@ -0,0 +1,25 @@ +# +# Be sure to run `pod spec lint WAVkImpl.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + +s.name = 'WAVkImpl' +s.version = '3.6.0' +s.summary = 'WAVkImpl framework is production environment.' +s.license = 'MIT' +s.author = { "Wuyx" => "wuyixin_gh@gamehollywood.com" } +s.homepage = 'http://git.gamehollywood.com:8082/summary/WAVkImpl.git' +s.source = { :git => "http://admin@git.gamehollywood.com:8082/r/WAVkImpl.git" , :tag => s.version} +s.platform = :ios +s.ios.deployment_target = "7.0" +s.vendored_frameworks = 'frameworks/*.framework' +s.resources = ['config/*.xml'] +s.requires_arc = true +s.dependency 'WASdkIntf', '~> 3.6.0' #此处添加私有库依赖 +s.dependency 'WASdkImpl', '~> 3.6.0' +end diff --git a/config/wa_sdk_impl_config_vk.xml b/config/wa_sdk_impl_config_vk.xml new file mode 100644 index 0000000..5f320c7 --- /dev/null +++ b/config/wa_sdk_impl_config_vk.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<config> + <version val="VK3.6.0"/> + <comps> + <!-- 用户模块 --> + <comp module="USR" plaf="VK" mandatory="YES" value="WAVKUser" desc="VK用户账户"/> + + <!-- 社交模块 --> + <comp module="SOC" plaf="VK" mandatory="YES" value="WAVKSocial" desc="VK社交"/> + + <!-- 公共模块 --> + <comp module="CORE" plaf="VK" mandatory="YES" value="WAVKCore" desc="公共模块"/> + </comps> +</config> diff --git a/frameworks/VKSdkFramework.framework/Headers/NSData+MD5.h b/frameworks/VKSdkFramework.framework/Headers/NSData+MD5.h new file mode 100755 index 0000000..177ac28 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/NSData+MD5.h @@ -0,0 +1,29 @@ +// +// NSData+MD5.h +// +// Copyright (c) 2014 +// +// 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 "NSData+MD5.h" + +@interface NSData (MD5) + +- (NSString *)MD5; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/NSError+VKError.h b/frameworks/VKSdkFramework.framework/Headers/NSError+VKError.h new file mode 100755 index 0000000..b2b2c34 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/NSError+VKError.h @@ -0,0 +1,51 @@ +// +// NSError+VKError.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 <Foundation/Foundation.h> +#import "VKError.h" + +extern NSString *const VKSdkErrorDomain; +extern NSString *const VkErrorDescriptionKey; + +/** +* Category with implementation of VK error +*/ +@interface NSError (VKError) + +/// Returns vk error associated with that NSError +@property(nonatomic, readonly) VKError *vkError; + +/** +Create new NSError with VKError +@param vkError Source error +@return New error with VKSdkErrorDomain domain +*/ ++ (NSError *)errorWithVkError:(VKError *)vkError; + +/** +Copies user info from this NSError into new error, with adding VKError +@param vkError Source error +@return New error with this error domain, code and user info +*/ +- (NSError *)copyWithVkError:(VKError *)vkError; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/NSString+MD5.h b/frameworks/VKSdkFramework.framework/Headers/NSString+MD5.h new file mode 100755 index 0000000..3acca51 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/NSString+MD5.h @@ -0,0 +1,29 @@ +// +// NSString+MD5.m +// +// Copyright (c) 2014 +// +// 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 <Foundation/Foundation.h> + +@interface NSString (MD5) + +- (NSString *)MD5; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/OrderedDictionary.h b/frameworks/VKSdkFramework.framework/Headers/OrderedDictionary.h new file mode 100755 index 0000000..d3ff7a0 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/OrderedDictionary.h @@ -0,0 +1,37 @@ +// +// OrderedDictionary.h +// OrderedDictionary +// +// Created by Matt Gallagher on 19/12/08. +// Copyright 2008 Matt Gallagher. All rights reserved. +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. Permission is granted to anyone to +// use this software for any purpose, including commercial applications, and to +// alter it and redistribute it freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source +// distribution. +// + +#import <Foundation/Foundation.h> + +@interface OrderedDictionary : NSMutableDictionary { + NSMutableDictionary *dictionary; + NSMutableArray *array; +} + +- (void)insertObject:(id)anObject forKey:(id)aKey atIndex:(NSUInteger)anIndex; + +- (id)keyAtIndex:(NSUInteger)anIndex; + +- (NSEnumerator *)reverseKeyEnumerator; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKAccessToken.h b/frameworks/VKSdkFramework.framework/Headers/VKAccessToken.h new file mode 100755 index 0000000..d239a09 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKAccessToken.h @@ -0,0 +1,114 @@ +// +// VKAccessToken.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 <Foundation/Foundation.h> +#import "VKObject.h" +#import "VKUser.h" + +/** + * Represents VK API access token that used for loading API methods and other stuff. + */ +@interface VKAccessToken : VKObject <NSCoding> + +/// String token for use in request parameters +@property(nonatomic, readonly, copy) NSString *accessToken; + +/// Current user id for this token +@property(nonatomic, readonly, copy) NSString *userId; + +/// User secret to sign requests (if nohttps used) +@property(nonatomic, readonly, copy) NSString *secret; + +// Permisiions assosiated with token +@property(nonatomic, readonly, copy) NSArray *permissions; + +// User email (if passed) +@property(nonatomic, readonly, copy) NSString *email; + +/// Time when token expires +@property(nonatomic, readonly, assign) NSInteger expiresIn; + +/// If user sets "Always use HTTPS" setting in his profile, it will be true +@property(nonatomic, readonly, assign) BOOL httpsRequired; + +/// Indicates time of token creation +@property(nonatomic, readonly, assign) NSTimeInterval created; + +/// Contains basic current user information. Available after delegate method -[VKSdkDelegate vkSdkAuthorizationStateUpdatedWithResult:] called +@property(nonatomic, readonly, strong) VKUser *localUser; + +/** +Retrieve token from key-value query string +@param urlString string that contains URL-query part with token. E.g. access_token=ffffff&expires_in=0... +@return parsed token +*/ ++ (instancetype)tokenFromUrlString:(NSString *)urlString; + +/** +Create token with existing properties +@param accessToken token string +@param secret secret +@param userId user id +@return new token +*/ ++ (instancetype)tokenWithToken:(NSString *)accessToken secret:(NSString *)secret userId:(NSString *)userId; + +/** +Retrieve token from user defaults. Token must be saved to defaults with saveTokenToDefaults method +@param defaultsKey path to file with saved token +@return parsed token +*/ ++ (instancetype)savedToken:(NSString *)defaultsKey; + +/** +Save token into user defaults by specified key +@param defaultsKey key for defaults +*/ +- (void)saveTokenToDefaults:(NSString *)defaultsKey; + +/// Return YES if token has expired +- (BOOL)isExpired; + +/** + Remove token from storage + + @param service Access token storage key name + */ ++ (void)delete:(NSString *)service; + +@end + +/** + * This is mutable version of VKAccessToken. You should never use this class directly + */ +@interface VKAccessTokenMutable : VKAccessToken +@property(nonatomic, readwrite, copy) NSString *accessToken; +@property(nonatomic, readwrite, copy) NSString *userId; +@property(nonatomic, readwrite, copy) NSString *secret; +@property(nonatomic, readwrite, copy) NSArray *permissions; +@property(nonatomic, readwrite, assign) BOOL httpsRequired; +@property(nonatomic, readwrite, assign) NSInteger expiresIn; +@property(nonatomic, readwrite, strong) VKUser *localUser; +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKActivity.h b/frameworks/VKSdkFramework.framework/Headers/VKActivity.h new file mode 100755 index 0000000..d8fa60e --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKActivity.h @@ -0,0 +1,39 @@ +// +// VKActivity.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 <UIKit/UIKit.h> + +extern NSString *const VKActivityTypePost; + +/** +* Class for sharing in VK throught UIActivityController +*/ +@interface VKActivity : UIActivity + +/** + * You should call this method to checks if VK app can show share extension (available from version 2.4, but flag supported in 2.5). + * + * @return YES, if VK Share extension available, and you don't have use VKActivity class + */ ++ (BOOL)vkShareExtensionEnabled; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApi.h b/frameworks/VKSdkFramework.framework/Headers/VKApi.h new file mode 100755 index 0000000..5634d8f --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApi.h @@ -0,0 +1,129 @@ +// +// VKApi.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 <Foundation/Foundation.h> +#import "VKRequest.h" +#import "VKApiUsers.h" +#import "VKApiFriends.h" +#import "VKApiPhotos.h" +#import "VKApiWall.h" +#import "VKApiConst.h" +#import "VKApiCaptcha.h" +#import "VKApiGroups.h" +#import "VKApiDocs.h" +#import "VKImageParameters.h" +#import "VKApiModels.h" + + +/** +Provides access for API parts. +*/ +@interface VKApi : NSObject +/** +https://vk.com/dev/users +Returns object for preparing requests to users part of API +*/ ++ (VKApiUsers *)users; + +/** +https://vk.com/dev/wall +Returns object for preparing requests to wall part of API +*/ ++ (VKApiWall *)wall; + +/** +https://vk.com/dev/photos +Returns object for preparing requests to photos part of API +*/ ++ (VKApiPhotos *)photos; + +/** +https://vk.com/dev/friends +Returns object for preparing requests to friends part of API +*/ ++ (VKApiFriends *)friends; + +/** +https://vk.com/dev/friends +Returns object for preparing requests to groups part of API +*/ ++ (VKApiGroups *)groups; + +/** + Create new request with parameters. See documentation for methods here https://vk.com/dev/methods + + @param method API-method name, e.g. audio.get + @param parameters method parameters + @param httpMethod HTTP method for execution, e.g. GET, POST + @return Complete request class for execute or configure method +*/ ++ (VKRequest *)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters + andHttpMethod:(NSString *)httpMethod __deprecated; + +/** + Create new request with parameters. See documentation for methods here https://vk.com/dev/methods + + @param method API-method name, e.g. audio.get + @param parameters method parameters + @return Complete request class for execute or configure method + */ ++ (VKRequest *)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters; + +/** + Uploads photo for wall post + + @param image image used for saving to post + @param parameters parameters for image to be uploaded + @param userId ID of user on which wall image should be posted (or 0) + @param groupId ID of group (without minus sign) on which wall image should be posted (or 0) +*/ ++ (VKRequest *)uploadWallPhotoRequest:(UIImage *)image + parameters:(VKImageParameters *)parameters + userId:(NSInteger)userId + groupId:(NSInteger)groupId; + +/** + Uploads photo in user or group album + + @param image image used for saving to post + @param parameters parameters for image to be uploaded + @param albumId target album ID. Required + @param groupId target group ID (positive). May be 0 +*/ ++ (VKRequest *)uploadAlbumPhotoRequest:(UIImage *)image + parameters:(VKImageParameters *)parameters + albumId:(NSInteger)albumId + groupId:(NSInteger)groupId; + +/** + Uploads photo for messaging + + @param image image used for saving to post + @param parameters parameters for image to be uploaded +*/ ++ (VKRequest *)uploadMessagePhotoRequest:(UIImage *)image + parameters:(VKImageParameters *)parameters; + + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiBase.h b/frameworks/VKSdkFramework.framework/Headers/VKApiBase.h new file mode 100755 index 0000000..fe61af9 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiBase.h @@ -0,0 +1,61 @@ +// +// VKApiBase.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 <Foundation/Foundation.h> +#import "VKRequest.h" +#import "VKApiConst.h" +#import "VKObject.h" + +/** +* Basic class for all API-requests builders (parts) +*/ +@interface VKApiBase : VKObject { +@private + NSString *_methodGroup; ///< Selected methods group +} +/** +Return group name for current methods builder +@return name of methods group, e.g. users, wall, etc. +*/ +- (NSString *)getMethodGroup; + +/** + Builds request and return it for configure and loading + @param methodName Selected method name + @param methodParameters Selected method parameters + @return request to configure and load + */ +- (VKRequest *)prepareRequestWithMethodName:(NSString *)methodName + parameters:(NSDictionary *)methodParameters; + +/** + Builds request and return it for configure and loading + @param methodName Selected method name + @param methodParameters Selected method parameters + @param modelClass Class of model, based on VKApiObject, for model parsing + @return request to configure and load + */ +- (VKRequest *)prepareRequestWithMethodName:(NSString *)methodName + parameters:(NSDictionary *)methodParameters + modelClass:(Class)modelClass; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiCaptcha.h b/frameworks/VKSdkFramework.framework/Headers/VKApiCaptcha.h new file mode 100755 index 0000000..1a1b241 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiCaptcha.h @@ -0,0 +1,34 @@ +// +// VKApiCaptcha.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" + +/** +Methods for captcha work. Currently, it is 1 method for forcing captcha response +*/ +@interface VKApiCaptcha : VKApiBase +/** +Returns error for captcha debugging +@return Request to load +*/ +- (VKRequest *)force; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiConst.h b/frameworks/VKSdkFramework.framework/Headers/VKApiConst.h new file mode 100755 index 0000000..0daeb8e --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiConst.h @@ -0,0 +1,123 @@ +// +// VKApiConst.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. + +typedef NSString *VKDisplayType; +extern VKDisplayType const VK_DISPLAY_IOS; +extern VKDisplayType const VK_DISPLAY_MOBILE; +//Commons +extern NSString *const VK_ORIGINAL_CLIENT_BUNDLE; +extern NSString *const VK_ORIGINAL_HD_CLIENT_BUNDLE; +extern NSString *const VK_DEBUG_CLIENT_BUNDLE; +extern NSString *const VK_API_USER_ID; +extern NSString *const VK_API_USER_IDS; +extern NSString *const VK_API_FIELDS; +extern NSString *const VK_API_SORT; +extern NSString *const VK_API_OFFSET; +extern NSString *const VK_API_COUNT; +extern NSString *const VK_API_OWNER_ID; + +//auth +extern NSString *const VK_API_LANG; +extern NSString *const VK_API_ACCESS_TOKEN; +extern NSString *const VK_API_SIG; + +//get users +extern NSString *const VK_API_NAME_CASE; +extern NSString *const VK_API_ORDER; + +//Get subscriptions +extern NSString *const VK_API_EXTENDED; + +//Search +extern NSString *const VK_API_Q; +extern NSString *const VK_API_CITY; +extern NSString *const VK_API_COUNTRY; +extern NSString *const VK_API_HOMETOWN; +extern NSString *const VK_API_UNIVERSITY_COUNTRY; +extern NSString *const VK_API_UNIVERSITY; +extern NSString *const VK_API_UNIVERSITY_YEAR; +extern NSString *const VK_API_SEX; +extern NSString *const VK_API_STATUS; +extern NSString *const VK_API_AGE_FROM; +extern NSString *const VK_API_AGE_TO; +extern NSString *const VK_API_BIRTH_DAY; +extern NSString *const VK_API_BIRTH_MONTH; +extern NSString *const VK_API_BIRTH_YEAR; +extern NSString *const VK_API_ONLINE; +extern NSString *const VK_API_HAS_PHOTO; +extern NSString *const VK_API_SCHOOL_COUNTRY; +extern NSString *const VK_API_SCHOOL_CITY; +extern NSString *const VK_API_SCHOOL; +extern NSString *const VK_API_SCHOOL_YEAR; +extern NSString *const VK_API_RELIGION; +extern NSString *const VK_API_INTERESTS; +extern NSString *const VK_API_COMPANY; +extern NSString *const VK_API_POSITION; +extern NSString *const VK_API_GROUP_ID; +extern NSString *const VK_API_GROUP_IDS; + +extern NSString *const VK_API_FRIENDS_ONLY; +extern NSString *const VK_API_FROM_GROUP; +extern NSString *const VK_API_MESSAGE; +extern NSString *const VK_API_ATTACHMENT; +extern NSString *const VK_API_ATTACHMENTS; +extern NSString *const VK_API_SERVICES; +extern NSString *const VK_API_SIGNED; +extern NSString *const VK_API_PUBLISH_DATE; +extern NSString *const VK_API_LAT; +extern NSString *const VK_API_LONG; +extern NSString *const VK_API_PLACE_ID; +extern NSString *const VK_API_POST_ID; + +//Errors +extern NSString *const VK_API_ERROR_CODE; +extern NSString *const VK_API_ERROR_MSG; +extern NSString *const VK_API_ERROR_TEXT; +extern NSString *const VK_API_REQUEST_PARAMS; + +//Captcha +extern NSString *const VK_API_CAPTCHA_IMG; +extern NSString *const VK_API_CAPTCHA_SID; +extern NSString *const VK_API_CAPTCHA_KEY; +extern NSString *const VK_API_REDIRECT_URI; + +// Documents +extern NSString *const VK_API_DOC_ID; +extern NSString *const VK_API_ACCESS_KEY; +extern NSString *const VK_API_FILE; +extern NSString *const VK_API_TITLE; +extern NSString *const VK_API_TAGS; + + +//Photos +extern NSString *const VK_API_PHOTO; +extern NSString *const VK_API_ALBUM_ID; + +//Events +extern NSString *const VKCaptchaAnsweredEvent; + +//Enums +typedef NS_ENUM(NSInteger, VKProgressType) { + VKProgressTypeUpload, + VKProgressTypeDownload +}; + diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiDocs.h b/frameworks/VKSdkFramework.framework/Headers/VKApiDocs.h new file mode 100755 index 0000000..3b0afa7 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiDocs.h @@ -0,0 +1,266 @@ +// +// VKApiDocs.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 + * + * @return Request to load + */ +- (VKRequest *)getUploadServer; + +/** + * Returns the server address for document upload. + * https://vk.com/dev/docs.getUploadServer + * + * @param group_id ID of the community the document will be uploaded to. + * + * @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 + * + * @return Request to load + */ +- (VKRequest *)getWallUploadServer; + +/** + * Returns the server address for document upload onto a user's or community's wall. + * https://vk.com/dev/docs.getWallUploadServer + * + * @param group_id ID of the community the document will be uploaded to. + * + * @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; + +/** + * Returns results of search + * https://vk.com/dev/docs.search + * + * @param query Search query + * + * @return Request to load + */ +- (VKRequest *)search:(NSString *)query; + +/** + * Returns results of search + * https://vk.com/dev/docs.search + * + * @param query Search query + * @param count Number of documents to return. + * + * @return Request to load + */ +- (VKRequest *)search:(NSString *)query count:(NSInteger)count; + +/** + * Returns results of search + * https://vk.com/dev/docs.search + * + * @param query Search query + * @param count Number of documents to return. + * @param offset Offset needed to return a specific subset of documents. + * + * @return Request to load + */ +- (VKRequest *)search:(NSString *)query count:(NSInteger)count andOffset:(NSInteger)offset; + +/** + * Edits a current user's document. + * https://vk.com/dev/docs.edit + * + * @param docID Document ID. + * @param title New document title + * + * @return Request to load + */ +- (VKRequest *)edit:(NSInteger)docID title:(NSString *)title; + +/** + * Edits a current user's document. + * https://vk.com/dev/docs.edit + * + * @param docID Document ID. + * @param title New document title + * @param tags New document tags + * + * @return Request to load + */ +- (VKRequest *)edit:(NSInteger)docID title:(NSString *)title tags:(NSString *)tags; + +/** + * Edits a user's or community's document. + * https://vk.com/dev/docs.edit + * + * @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 title New document title + * + * @return Request to load + */ +- (VKRequest *)edit:(NSInteger)ownerID docID:(NSInteger)docID title:(NSString *)title; + +/** + * Edits a user's or community's document. + * https://vk.com/dev/docs.edit + * + * @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 title New document title + * @param tags New document tags + * + * @return Request to load + */ +- (VKRequest *)edit:(NSInteger)ownerID docID:(NSInteger)docID title:(NSString *)title tags:(NSString *)tags; + + + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiFriends.h b/frameworks/VKSdkFramework.framework/Headers/VKApiFriends.h new file mode 100755 index 0000000..ff74dcf --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiFriends.h @@ -0,0 +1,32 @@ +// +// VKApiFriends.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.users part +*/ +@interface VKApiFriends : VKApiBase +- (VKRequest *)get; + +- (VKRequest *)get:(NSDictionary *)params; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiGroups.h b/frameworks/VKSdkFramework.framework/Headers/VKApiGroups.h new file mode 100755 index 0000000..76dca97 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiGroups.h @@ -0,0 +1,18 @@ +// +// VKApiGroups.h +// sdk +// +// Created by Roman Truba on 16.07.14. +// Copyright (c) 2014 VK. All rights reserved. +// + +#import "VKApiBase.h" + +@interface VKApiGroups : VKApiBase +/** +https://vk.com/dev/groups.get +@param params use parameters from description with VK_API prefix, e.g. VK_API_GROUP_ID, VK_API_FIELDS +@return Request for load +*/ +- (VKRequest *)getById:(NSDictionary *)params; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiModels.h b/frameworks/VKSdkFramework.framework/Headers/VKApiModels.h new file mode 100755 index 0000000..2ab057d --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiModels.h @@ -0,0 +1,34 @@ +// +// VKApiModels.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 suabstantial 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 "VKApiObjectArray.h" +#import "VKAudio.h" +#import "VKPhoto.h" +#import "VKLikes.h" +#import "VKUser.h" +#import "VKRelative.h" +#import "VKCounters.h" +#import "VKLikes.h" +#import "VKSchool.h" +#import "VKUniversity.h" +#import "VKGroup.h" +#import "VKDocs.h" \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiObject.h b/frameworks/VKSdkFramework.framework/Headers/VKApiObject.h new file mode 100755 index 0000000..02aa4de --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiObject.h @@ -0,0 +1,65 @@ +// +// VKApiObject.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 <objc/runtime.h> +#import "VKObject.h" + +/** +Helps in objects parsing +*/ +@interface VKPropertyHelper : VKObject +@property(nonatomic, readonly) NSString *propertyName; +@property(nonatomic, readonly) NSString *propertyClassName; +@property(nonatomic, readonly) Class propertyClass; +@property(nonatomic, readonly) BOOL isPrimitive; +@property(nonatomic, readonly) BOOL isModelsArray; +@property(nonatomic, readonly) BOOL isModel; + +- (instancetype)initWith:(objc_property_t)prop; +@end + +@protocol VKApiObject <NSObject> ++ (instancetype)createWithDictionary:(NSDictionary *)dict; + ++ (instancetype)createWithArray:(NSArray *)array; +@end + +/** +Basic class for API objects +*/ +@interface VKApiObject : VKObject <VKApiObject> +/// If it possible, contains object fields from JSON as it is +@property(nonatomic, strong) NSDictionary *fields; + +/** +Initialize object with API json dictionary. This method tries to set all known properties of current class from dictionare +@param dict API json dictionary +@return Initialized object +*/ +- (instancetype)initWithDictionary:(NSDictionary *)dict; + +/** +Serialize current object into dictionary +@return Key-value dictionary, contains current object +*/ +- (NSDictionary *)serialize; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiObjectArray.h b/frameworks/VKSdkFramework.framework/Headers/VKApiObjectArray.h new file mode 100755 index 0000000..34b1228 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiObjectArray.h @@ -0,0 +1,80 @@ +// +// VKApiObjectArray.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 suabstantial 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 "VKApiObject.h" + +/** +Base class for VK API arrays +*/ +@interface VKApiObjectArray<__covariant ApiObjectType : VKApiObject*> : VKApiObject <NSFastEnumeration> +/// Count of items in array +@property(nonatomic, readonly) NSUInteger count; +/// Parsed array items +@property(nonatomic, strong) NSMutableArray<ApiObjectType> *items; + +/** + Initialize object with API json dictionary. This method tries to set all known properties of current class from dictionary + @param dict API json dictionary + @param objectClass class of items inside of array + @return Initialized object + */ +- (instancetype)initWithDictionary:(NSDictionary *)dict objectClass:(Class)objectClass; + +/** + Initialize object with API json array. This method tries to set all known properties of current class from array + @param array API json array + @param objectClass class of items inside of array + @return Initialized object + */ +- (instancetype)initWithArray:(NSArray *)array objectClass:(Class)objectClass; + +/** + Initialize object with any array. items property is sets as passed array, count is a count of items in passed array + @param array API json array + @return Initialized object + */ +- (instancetype)initWithArray:(NSArray *)array; + +/// Array funtions + +- (ApiObjectType)objectAtIndex:(NSInteger)idx; + +- (ApiObjectType)objectAtIndexedSubscript:(NSUInteger)idx NS_AVAILABLE(10_8, 6_0); + +- (NSEnumerator *)objectEnumerator; + +- (NSEnumerator *)reverseObjectEnumerator; + +- (void)addObject:(ApiObjectType)object; + +- (void)removeObject:(ApiObjectType)object; + +- (void)insertObject:(ApiObjectType)object atIndex:(NSUInteger)index; + +- (ApiObjectType)firstObject; + +- (ApiObjectType)lastObject; + +- (void)serializeTo:(NSMutableDictionary *)dict withName:(NSString *)name; + +- (Class)objectClass; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiPhotos.h b/frameworks/VKSdkFramework.framework/Headers/VKApiPhotos.h new file mode 100755 index 0000000..bb1af13 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiPhotos.h @@ -0,0 +1,72 @@ +// +// VKApiPhotos.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.photos part +*/ +@interface VKApiPhotos : VKApiBase +/** +https://vk.com/dev/photos.getUploadServer +@param albumId album identifier (positive integer) +@return Request for load +*/ +- (VKRequest *)getUploadServer:(NSInteger)albumId; + +/** +https://vk.com/dev/photos.getUploadServer +@param albumId album identifier (positive integer) +@param groupId group identifier (positive integer) +@return Request for load +*/ +- (VKRequest *)getUploadServer:(NSInteger)albumId andGroupId:(NSInteger)groupId; + +/** +https://vk.com/dev/photos.getWallUploadServer +@return Request for load +*/ +- (VKRequest *)getWallUploadServer; + +/** +https://vk.com/dev/photos.getWallUploadServer +@param groupId group identifier (positive integer) +@return Request for load +*/ +- (VKRequest *)getWallUploadServer:(NSInteger)groupId; + + +/** +https://vk.com/dev/photos.save +@param params params received after photo upload, with user id or group id +@return Request for load +*/ +- (VKRequest *)save:(NSDictionary *)params; + +/** +https://vk.com/dev/photos.saveWallPhoto +@param params params received after photo upload, with user id or group id +@return Request for load +*/ +- (VKRequest *)saveWallPhoto:(NSDictionary *)params; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiUsers.h b/frameworks/VKSdkFramework.framework/Headers/VKApiUsers.h new file mode 100755 index 0000000..2b4fa60 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiUsers.h @@ -0,0 +1,87 @@ +// +// 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.users part +*/ +@interface VKApiUsers : VKApiBase +/** +Returns basic information about current user +@return Request for load +*/ +- (VKRequest *)get; + +/** +https://vk.com/dev/users.get +@param params use parameters from description with VK_API prefix, e.g. VK_API_USER_IDS, VK_API_FIELDS, VK_API_NAME_CASE +@return Request for load +*/ +- (VKRequest *)get:(NSDictionary *)params; + +/** +https://vk.com/dev/users.search +@param params use parameters from description with VK_API prefix, e.g. VK_API_Q, VK_API_CITY, VK_API_COUNTRY, etc. +@return Request for load +*/ +- (VKRequest *)search:(NSDictionary *)params; + +/** +https://vk.com/dev/users.isAppUser +@return Request for load +*/ +- (VKRequest *)isAppUser; + +/** +https://vk.com/dev/users.isAppUser +@param userID ID of user to check +@return Request for load +*/ +- (VKRequest *)isAppUser:(NSInteger)userID; + +/** +https://vk.com/dev/users.getSubscriptions +@return Request for load +*/ +- (VKRequest *)getSubscriptions; + +/** +https://vk.com/dev/users.getSubscriptions +@param params use parameters from description with VK_API prefix, e.g. VK_API_USER_ID, VK_API_EXTENDED, etc. +@return Request for load +*/ +- (VKRequest *)getSubscriptions:(NSDictionary *)params; + +/** +https://vk.com/dev/users.getFollowers +@return Request for load +*/ +- (VKRequest *)getFollowers; + +/** +https://vk.com/dev/users.getFollowers +@param params use parameters from description with VK_API prefix, e.g. VK_API_USER_ID, VK_API_OFFSET, etc. +@return Request for load +*/ +- (VKRequest *)getFollowers:(NSDictionary *)params; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKApiWall.h b/frameworks/VKSdkFramework.framework/Headers/VKApiWall.h new file mode 100755 index 0000000..621a815 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKApiWall.h @@ -0,0 +1,35 @@ +// +// VKApiWall.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.wall part +*/ +@interface VKApiWall : VKApiBase +/** +https://vk.com/dev/wall.post +@param params Use parameters from description with VK_API prefix +@return Request for execution +*/ +- (VKRequest *)post:(NSDictionary *)params; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKAudio.h b/frameworks/VKSdkFramework.framework/Headers/VKAudio.h new file mode 100755 index 0000000..0360f6b --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKAudio.h @@ -0,0 +1,46 @@ +// +// VKAudio.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 suabstantial 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 "VKApiObjectArray.h" + +@class VKUser; + +@interface VKAudio : VKApiObject + +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSNumber *owner_id; +@property(nonatomic, strong) NSString *artist; +@property(nonatomic, strong) NSString *title; +@property(nonatomic, strong) NSNumber *duration; +@property(nonatomic, strong) NSString *url; +@property(nonatomic, strong) NSNumber *lyrics_id; +@property(nonatomic, strong) NSNumber *album_id; +@property(nonatomic, strong) NSNumber *genre_id; + +@property(nonatomic, assign) BOOL fromCache; +@property(nonatomic, assign) BOOL ignoreCache; + +@end + +@interface VKAudios : VKApiObjectArray<VKAudio*> +@property(nonatomic, strong) VKUser *user; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKAuthorizationResult.h b/frameworks/VKSdkFramework.framework/Headers/VKAuthorizationResult.h new file mode 100755 index 0000000..dcfb657 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKAuthorizationResult.h @@ -0,0 +1,77 @@ +// +// VKAuthorizationResult.h +// +// Copyright (c) 2015 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 "VKAccessToken.h" +#import "VKError.h" + +typedef NS_ENUM(NSUInteger, VKAuthorizationState) { + /// Authorization state unknown, probably ready to work or something went wrong + VKAuthorizationUnknown, + /// SDK initialized and ready to authorize + VKAuthorizationInitialized, + /// Authorization state pending, probably we're trying to load auth information + VKAuthorizationPending, + /// Started external authorization process + VKAuthorizationExternal, + /// Started in app authorization process, using SafariViewController + VKAuthorizationSafariInApp, + /// Started in app authorization process, using webview + VKAuthorizationWebview, + /// User authorized + VKAuthorizationAuthorized, + /// An error occured, try to wake up session later + VKAuthorizationError, +}; + +/** + When authorization is completed or failed with error, object of this class will be send in vkSdkAccessAuthorizationFinishedWithResult: method. + */ +@interface VKAuthorizationResult : VKObject + +/// Access token recieved after successfull authorization +@property(nonatomic, readonly, strong) VKAccessToken *token; + +/// Available information about current user of SDK. Notice that info is available in SDK-delegate vkSdkAuthorizationStateUpdatedWithResult: method. +@property(nonatomic, readonly, strong) VKUser *user; + +/// If some error or authorization cancelation happened, this field contains basic error information +@property(nonatomic, readonly, strong) NSError *error; + +/// Current state of authorization +@property(nonatomic, readonly, assign) VKAuthorizationState state; + +@end + +/** + * This is mutable version of VKAuthorizationResult class + */ +@interface VKMutableAuthorizationResult : VKAuthorizationResult + +@property(nonatomic, readwrite, strong) VKAccessToken *token; + +@property(nonatomic, readwrite, strong) VKUser *user; + +@property(nonatomic, readwrite, strong) NSError *error; + +@property(nonatomic, readwrite, assign) VKAuthorizationState state; + +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKAuthorizeController.h b/frameworks/VKSdkFramework.framework/Headers/VKAuthorizeController.h new file mode 100755 index 0000000..2c48a37 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKAuthorizeController.h @@ -0,0 +1,81 @@ +// +// VKAuthorizeController.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 <UIKit/UIKit.h> +#import "VKSdk.h" +extern NSString *VK_AUTHORIZE_URL_STRING; + +typedef NS_ENUM(NSInteger, VKAuthorizationType) { + VKAuthorizationTypeWebView, + VKAuthorizationTypeSafari, + VKAuthorizationTypeApp +}; + +@interface VKAuthorizationContext : VKObject +@property (nonatomic, readonly, strong) NSString *clientId; +@property (nonatomic, readonly, strong) NSString *displayType; +@property (nonatomic, readonly, strong) NSArray<NSString*> *scope; +@property (nonatomic, readonly) BOOL revoke; + +/** + Prepare context for building oauth url + @param authType type of authorization will be used + @param clientId id of the application + @param displayType selected display type + @param scope requested scope for application + @param revoke If YES, user will see permissions list and allow to logout (if logged in already) + @return Prepared context, which must be passed into buildAuthorizationURLWithContext: method + */ ++(instancetype) contextWithAuthType:(VKAuthorizationType) authType + clientId:(NSString*)clientId + displayType:(NSString*)displayType + scope:(NSArray<NSString*>*)scope + revoke:(BOOL) revoke; + +@end + +/** +Controller for authorization through webview (if VK app not available) +*/ +@interface VKAuthorizeController : UIViewController <UIWebViewDelegate> + +/** +Causes UIWebView in standard UINavigationController be presented in SDK delegate +@param appId Identifier of VK application +@param permissions Permissions that user specified for application +@param revoke If YES, user will see permissions list and allow to logout (if logged in already) +@param displayType Defines view of authorization screen +*/ ++ (void)presentForAuthorizeWithAppId:(NSString *)appId + andPermissions:(NSArray *)permissions + revokeAccess:(BOOL)revoke + displayType:(VKDisplayType)displayType; + +/** +Causes UIWebView in standard UINavigationController be presented for user validation +@param validationError validation error returned by API +*/ ++ (void)presentForValidation:(VKError *)validationError; + ++ (NSURL *)buildAuthorizationURLWithContext:(VKAuthorizationContext*) ctx; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKBatchRequest.h b/frameworks/VKSdkFramework.framework/Headers/VKBatchRequest.h new file mode 100755 index 0000000..73bf919 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKBatchRequest.h @@ -0,0 +1,66 @@ +// +// VKBatchRequest.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 "VKObject.h" +#import "VKRequest.h" + +/** +Used for execution bunch of methods at time, and receive results of that methods in array +*/ +@interface VKBatchRequest : VKObject { +@private + + NSMutableArray *_requests; + NSMutableArray *_responses; + BOOL _canceled; +} +/// Specify completion block for request +@property(nonatomic, copy) void (^completeBlock)(NSArray *responses); +/// Specity error (HTTP or API) block for request. +@property(nonatomic, copy) void (^errorBlock)(NSError *error); + +/** +Initializes batch processing with requests +@param firstRequest ,... A comma-separated list of requests should be loaded, ending with nil. +@return Prepared request +*/ +- (instancetype)initWithRequests:(VKRequest *)firstRequest, ...NS_REQUIRES_NIL_TERMINATION; + +/** +Initializes batch processing with requests array +@param requests Array of requests should be loaded. +@return Prepared request +*/ +- (instancetype)initWithRequestsArray:(NSArray *)requests; + +/** +Executes batch request +@param completeBlock will receive result of passed requests +@param errorBlock called if any request did fail +*/ +- (void)executeWithResultBlock:(void (^)(NSArray *responses))completeBlock errorBlock:(void (^)(NSError *error))errorBlock; + +/** +Cancel current batch operation +*/ +- (void)cancel; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKBundle.h b/frameworks/VKSdkFramework.framework/Headers/VKBundle.h new file mode 100755 index 0000000..5de3bb6 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKBundle.h @@ -0,0 +1,49 @@ +// +// VKBundle.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 "VKObject.h" + +#define VKLocalizedString(s) [VKBundle localizedString:s] +#define VKImageNamed(s) [VKBundle vkLibraryImageNamed:s] + +/** +Class for providing resources from VK SDK Bundle +*/ +@interface VKBundle : VKObject +/** +Returns bundle for VK SDK (by default VKSdkResources) +@return Bundle object or nil +*/ ++ (NSBundle *)vkLibraryResourcesBundle; + +/** +Searches for image in main application bundle, then VK SDK bundle +@param name Name for image to find +@return Founded image object or nil, if file not found +*/ ++ (UIImage *)vkLibraryImageNamed:(NSString *)name; + +/** +* Returns localized string from VK bundle +*/ ++ (NSString *)localizedString:(NSString *)string; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKCaptchaView.h b/frameworks/VKSdkFramework.framework/Headers/VKCaptchaView.h new file mode 100755 index 0000000..bf32325 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKCaptchaView.h @@ -0,0 +1,41 @@ +// +// VKCaptchaView.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 <UIKit/UIKit.h> +#import "VKError.h" + +extern CGFloat kCaptchaImageWidth; +extern CGFloat kCaptchaImageHeight; +extern CGFloat kCaptchaViewHeight; + +/** +View for displaying captcha. Don't use it dirrectly. Use VKCaptchaViewController +*/ +@interface VKCaptchaView : UIView +/** +Initializes view with captcha error +@param frame bounds of window where view will be displayed +@param captchaError error for request that causes captcha-check +*/ +- (id)initWithFrame:(CGRect)frame andError:(VKError *)captchaError; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKCaptchaViewController.h b/frameworks/VKSdkFramework.framework/Headers/VKCaptchaViewController.h new file mode 100755 index 0000000..ec9d0f0 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKCaptchaViewController.h @@ -0,0 +1,45 @@ +// +// VKCaptchaViewController.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 <UIKit/UIKit.h> +#import "VKError.h" + +/** +Controller fo displaying captcha. +*/ +@interface VKCaptchaViewController : UIViewController { +@private + VKError *_captchaError; +} +/** +Initializes controller with captcha url +@param error error for request that causes captcha-check +@returns Prepared controller. Best way to use it - use presentIn: method +*/ ++ (instancetype)captchaControllerWithError:(VKError *)error; + +/** +Presents current view controller in another. Automatically hides when captcha was answered properly +@param viewController Parent view controller +*/ +- (void)presentIn:(UIViewController *)viewController; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKCounters.h b/frameworks/VKSdkFramework.framework/Headers/VKCounters.h new file mode 100755 index 0000000..591cfaa --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKCounters.h @@ -0,0 +1,47 @@ +// +// VKCounters.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 suabstantial 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 "VKApiObject.h" + +@interface VKCounters : VKApiObject +@property(nonatomic, strong) NSNumber *friends; +@property(nonatomic, strong) NSNumber *messages; +@property(nonatomic, strong) NSNumber *photos; +@property(nonatomic, strong) NSNumber *videos; +@property(nonatomic, strong) NSNumber *notifications; +@property(nonatomic, strong) NSNumber *groups; +@property(nonatomic, strong) NSNumber *gifts; +@property(nonatomic, strong) NSNumber *events; + +@property(nonatomic, strong) NSNumber *albums; +@property(nonatomic, strong) NSNumber *audios; +@property(nonatomic, strong) NSNumber *online_friends; +@property(nonatomic, strong) NSNumber *mutual_friends; +@property(nonatomic, strong) NSNumber *user_videos; +@property(nonatomic, strong) NSNumber *followers; +@property(nonatomic, strong) NSNumber *user_photos; +@property(nonatomic, strong) NSNumber *subscriptions; +@property(nonatomic, strong) NSNumber *documents; +@property(nonatomic, strong) NSNumber *topics; +@property(nonatomic, strong) NSNumber *pages; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKDocs.h b/frameworks/VKSdkFramework.framework/Headers/VKDocs.h new file mode 100755 index 0000000..1985e15 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKDocs.h @@ -0,0 +1,49 @@ +// +// VKDocs.h +// +// Copyright (c) 2016 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 <Foundation/Foundation.h> +#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, copy) NSString *title; +@property(nonatomic, strong) NSNumber *size; +@property(nonatomic, copy) NSString *ext; +@property(nonatomic, copy) NSString *url; +@property(nonatomic, copy) NSString *photo_100; +@property(nonatomic, copy) NSString *photo_130; +@property(nonatomic, strong) NSNumber *date; +@property(nonatomic, strong) NSNumber *type; +@end + +/** + Array of API docs objects + */ +@interface VKDocsArray : VKApiObjectArray<VKDocs*> +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKError.h b/frameworks/VKSdkFramework.framework/Headers/VKError.h new file mode 100755 index 0000000..ac7ce92 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKError.h @@ -0,0 +1,88 @@ +// +// VKError.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 <Foundation/Foundation.h> +#import "VKObject.h" +#import "VKApiConst.h" + +static int const VK_API_ERROR = -101; +static int const VK_API_CANCELED = -102; +static int const VK_API_REQUEST_NOT_PREPARED = -103; +static int const VK_RESPONSE_STRING_PARSING_ERROR = -104; +static int const VK_AUTHORIZE_CONTROLLER_CANCEL = -105; + +@class VKRequest; + +/** +Class for presenting VK SDK and VK API errors +*/ +@interface VKError : VKObject +/// Contains system HTTP error +@property(nonatomic, strong) NSError *httpError; +/// Describes API error +@property(nonatomic, strong) VKError *apiError; +/// Request which caused error +@property(nonatomic, strong) VKRequest *request; + +/// May contains such errors:\n <b>HTTP status code</b> if HTTP error occured;\n <b>VK_API_ERROR</b> if API error occured;\n <b>VK_API_CANCELED</b> if request was canceled;\n <b>VK_API_REQUEST_NOT_PREPARED</b> if error occured while preparing request; +@property(nonatomic, assign) NSInteger errorCode; +/// API error message +@property(nonatomic, strong) NSString *errorMessage; +/// Reason for authorization fail +@property(nonatomic, strong) NSString *errorReason; +// Localized error text from server if there is one +@property(nonatomic, strong) NSString *errorText; +/// API parameters passed to request +@property(nonatomic, strong) NSDictionary *requestParams; +/// Captcha identifier for captcha-check +@property(nonatomic, strong) NSString *captchaSid; +/// Image for captcha-check +@property(nonatomic, strong) NSString *captchaImg; +/// Redirection address if validation check required +@property(nonatomic, strong) NSString *redirectUri; + +@property(nonatomic, strong) id json; + +/** +Generate new error with code +@param errorCode positive if it's an HTTP error. Negative if it's API or SDK error +*/ ++ (instancetype)errorWithCode:(NSInteger)errorCode; + +/** +Generate API error from JSON +@param JSON Json description of VK API error +*/ ++ (instancetype)errorWithJson:(id)JSON; + +/** +Generate API error from HTTP-query +@param queryParams key-value parameters +*/ ++ (instancetype)errorWithQuery:(NSDictionary *)queryParams; + +/** +Repeats failed captcha request with user entered answer to captcha +@param userEnteredCode answer for captcha +*/ +- (void)answerCaptcha:(NSString *)userEnteredCode; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKGroup.h b/frameworks/VKSdkFramework.framework/Headers/VKGroup.h new file mode 100755 index 0000000..2e3ba15 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKGroup.h @@ -0,0 +1,122 @@ +// +// VKGroup.h +// sdk +// +// Created by Roman Truba on 16.07.14. +// Copyright (c) 2014 VK. All rights reserved. +// + +#import "VKApiObjectArray.h" +#import "VKUser.h" + +/** + Geo-object type + */ +@interface VKGeoPlace : VKApiObject + +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSString *title; +@property(nonatomic, strong) NSNumber *latitude; +@property(nonatomic, strong) NSNumber *longitude; +@property(nonatomic, strong) NSNumber *created; +@property(nonatomic, strong) NSString *icon; +@property(nonatomic, strong) NSNumber *group_id; +@property(nonatomic, strong) NSNumber *group_photo; +@property(nonatomic, strong) NSNumber *checkins; +@property(nonatomic, strong) NSNumber *updated; +@property(nonatomic, strong) NSNumber *type; +@property(nonatomic, strong) NSNumber *country; +@property(nonatomic, strong) NSString *city; +@property(nonatomic, strong) NSString *address; +@property(nonatomic, strong) NSNumber *showmap; +@end + +/** + Object representing contact in group + */ +@interface VKGroupContact : VKApiObject + +@property(nonatomic, strong) NSNumber *user_id; +@property(nonatomic, strong) NSString *desc; +@property(nonatomic, strong) NSString *email; + +@end + +/** + Array of VKGroupContact objects + */ +@interface VKGroupContacts : VKApiObjectArray<VKGroupContact*> + +@end + +/** + Object representing link in group + */ +@interface VKGroupLink : VKApiObject + +@property(nonatomic, strong) NSString *url; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSString *desc; +@property(nonatomic, strong) NSString *photo_50; +@property(nonatomic, strong) NSString *photo_100; + +@end + +/** + Array of VKGroupLink objects + */ +@interface VKGroupLinks : VKApiObjectArray<VKGroupLink*> +@end + +/** + Group type of VK API. See descriptions here https://vk.com/dev/fields_groups + */ +@interface VKGroup : VKApiObject +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSString *screen_name; +@property(nonatomic, strong) NSNumber *is_closed; +@property(nonatomic, strong) NSString *type; +@property(nonatomic, strong) NSNumber *is_admin; +@property(nonatomic, strong) NSNumber *admin_level; +@property(nonatomic, strong) NSNumber *is_member; +@property(nonatomic, strong) VKCity *city; +@property(nonatomic, strong) VKCountry *country; +@property(nonatomic, strong) VKGeoPlace *place; +@property(nonatomic, strong) NSString *description; +@property(nonatomic, strong) NSString *wiki_page; +@property(nonatomic, strong) NSNumber *members_count; +@property(nonatomic, strong) VKCounters *counters; +@property(nonatomic, strong) NSNumber *start_date; +@property(nonatomic, strong) NSNumber *end_date; +@property(nonatomic, strong) NSNumber *finish_date; +@property(nonatomic, strong) NSNumber *can_post; +@property(nonatomic, strong) NSNumber *can_see_all_posts; +@property(nonatomic, strong) NSNumber *can_create_topic; +@property(nonatomic, strong) NSNumber *can_upload_doc; +@property(nonatomic, strong) NSString *activity; +@property(nonatomic, strong) NSString *status; +@property(nonatomic, strong) VKAudio *status_audio; +@property(nonatomic, strong) VKGroupContacts *contacts; +@property(nonatomic, strong) VKGroupLinks *links; +@property(nonatomic, strong) NSNumber *fixed_post; +@property(nonatomic, strong) NSNumber *verified; +@property(nonatomic, strong) NSString *site; +@property(nonatomic, strong) NSString *photo_50; +@property(nonatomic, strong) NSString *photo_100; +@property(nonatomic, strong) NSString *photo_200; +@property(nonatomic, strong) NSString *photo_max_orig; +@property(nonatomic, strong) NSNumber *is_request; +@property(nonatomic, strong) NSNumber *is_invite; +@property(nonatomic, strong) VKPhotoArray *photos; +@property(nonatomic, strong) NSNumber *photos_count; +@property(nonatomic, strong) NSNumber *invited_by; +@property(nonatomic, assign) NSInteger invite_state; +@property(nonatomic, strong) NSString *deactivated; +@property(nonatomic, strong) NSNumber *blacklisted; + +@end + +@interface VKGroups : VKApiObjectArray<VKGroup*> + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKHTTPClient.h b/frameworks/VKSdkFramework.framework/Headers/VKHTTPClient.h new file mode 100755 index 0000000..c9b59a5 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKHTTPClient.h @@ -0,0 +1,132 @@ +// +// VKHttpClient.h +// +// Based on AFNetworking library. +// https://github.com/AFNetworking/AFNetworking +// +// 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 "VKObject.h" + +@class VKHTTPOperation; + +/** +Class for NSURLRequests generation, made for VK API. +Based on AFNetworking library ( https://github.com/AFNetworking/AFNetworking ) +*/ +@interface VKHTTPClient : VKObject <NSCoding> + +///------------------------------- +/// @name Initialization +///------------------------------- + +/** +Creates and initializes an `VKHTTPClient` object with the specified base URL. + +@return The newly-initialized HTTP client +*/ ++ (instancetype)getClient; + +/** +The operation queue which manages operations enqueued by the HTTP client. +*/ +@property(readonly, nonatomic, strong) NSOperationQueue *operationQueue; + +///------------------------------- +/// @name Operations with default headers +///------------------------------- + +/** +Returns the value for the HTTP headers set in request objects created by the HTTP client. + +@param header The HTTP header to return the default value for + +@return The default value for the HTTP header, or `nil` if unspecified +*/ +- (NSString *)defaultValueForHeader:(NSString *)header; + +/** +Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header. + +@param header The HTTP header to set a default value for +@param value The value set as default for the specified header, or `nil +*/ +- (void)setDefaultHeader:(NSString *)header + value:(NSString *)value; + +///------------------------------- +/// @name Preparing requests +///------------------------------- + +/** +Creates an `NSMutableURLRequest` object with the specified HTTP method and path. + +If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. + +@param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. +@param path The path to be appended to the HTTP client's base URL and used as the request URL. If `nil`, no path will be appended to the base URL. +@param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. +@param secure Use HTTPS or not + +@return An `NSMutableURLRequest` object +*/ +- (NSMutableURLRequest *)requestWithMethod:(NSString *)method + path:(NSString *)path + parameters:(NSDictionary *)parameters + secure:(BOOL)secure; + +/** +Creates an `NSMutableURLRequest` object with the specified HTTP method and path, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 + +Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. + +@param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. +@param path The path to be appended to the HTTP client's base URL and used as the request URL. +@param images Upload images objects to append + +@return An `NSMutableURLRequest` object +*/ +- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method + path:(NSString *)path + images:(NSArray *)images; + +///------------------------------- +/// @name Enqueuing operations +///------------------------------- + +/** +Enqueues an `AFHTTPRequestOperation` to the HTTP client's operation queue. + +@param operation The HTTP request operation to be enqueued. +*/ +- (void)enqueueOperation:(NSOperation *)operation; + +/** +Enqueues the specified request operations into a batch. When each request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. + +@param operations The request operations used to be batched and enqueued. +@param progressBlock A block object to be executed upon the completion of each request operation in the batch. This block has no return value and takes two arguments: the number of operations that have already finished execution, and the total number of operations. +@param completionBlock A block object to be executed upon the completion of all of the request operations in the batch. This block has no return value and takes a single argument: the batched request operations. +*/ +- (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations + progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock + completionBlock:(void (^)(NSArray *operations))completionBlock; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKHTTPOperation.h b/frameworks/VKSdkFramework.framework/Headers/VKHTTPOperation.h new file mode 100755 index 0000000..bf20fbf --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKHTTPOperation.h @@ -0,0 +1,172 @@ +// +// VKHTTPOperation.h +// +// Based on AFNetworking library. +// https://github.com/AFNetworking/AFNetworking +// +// 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 <Foundation/Foundation.h> +#import "VKOperation.h" + +extern NSString *const VKNetworkingOperationDidStart; + +@class VKRequest; + +/** +VK URL operation subclassing NSOperation. +Based on AFNetworking library ( https://github.com/AFNetworking/AFNetworking ) +*/ +@interface VKHTTPOperation : VKOperation <NSURLConnectionDataDelegate, NSURLConnectionDelegate, NSCoding, NSCopying> +@property(nonatomic, strong) VKRequest *loadingRequest; + +/** +Creates new operation with prepared request. +@param request Prepared VK request to API +@return Initialized operation +*/ ++ (instancetype)operationWithRequest:(VKRequest *)request; + +///------------------------------- +/// @name Accessing Run Loop Modes +///------------------------------- + +/** +The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`. +*/ +@property(nonatomic, strong) NSSet *runLoopModes; + +///----------------------------------------- +/// @name Getting URL Connection Information +///----------------------------------------- + +/** +The vk request initialized that operation +*/ +@property(readonly, nonatomic, weak) VKRequest *vkRequest; +/** +The request used by the operation's connection. +*/ +@property(readonly, nonatomic, strong) NSURLRequest *request; + +/** +The error, if any, that occurred in the lifecycle of the request. +*/ +@property(readonly, nonatomic, strong) NSError *error; + +///---------------------------- +/// @name Getting Response Data +///---------------------------- + +/** +The data received during the request. +*/ +@property(readonly, nonatomic, strong) NSData *responseData; + +/** +The string representation of the response data. +*/ +@property(readonly, nonatomic, copy) NSString *responseString; + +/** +The json representation of the response data. +*/ +@property(readonly, nonatomic, copy) id responseJson; + +/** +The last HTTP response received by the operation's connection. +*/ +@property(readonly, nonatomic, strong) NSHTTPURLResponse *response; + +/** +The callback dispatch queue on success. If `NULL` (default), the main queue is used. +*/ +@property(nonatomic, assign) dispatch_queue_t successCallbackQueue; + +/** +The callback dispatch queue on failure. If `NULL` (default), the main queue is used. +*/ +@property(nonatomic, assign) dispatch_queue_t failureCallbackQueue; + +/** +Init this operation with URL request +@param urlRequest request to load +@return initialized operation +*/ +- (instancetype)initWithURLRequest:(NSURLRequest *)urlRequest; + +/** +Pauses the execution of the request operation. + +A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect. +*/ +- (void)pause; + +/** +Whether the request operation is currently paused. + +@return `YES` if the operation is currently paused, otherwise `NO`. +*/ +- (BOOL)isPaused; + +/** +Resumes the execution of the paused request operation. + +Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request. +*/ +- (void)resume; + +///---------------------------------------------- +/// @name Configuring Backgrounding Task Behavior +///---------------------------------------------- + +/** +Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task. + +@param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified. +*/ +- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; + +/** +Sets a callback to be called when an undetermined number of bytes have been uploaded to the server. + +@param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. +*/ +- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block; + +/** +Sets a callback to be called when an undetermined number of bytes have been downloaded from the server. + +@param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. +*/ +- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block; + +/** +Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. + +This method should be overridden in subclasses in order to specify the response object passed into the success block. + +@param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. +@param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. +*/ +- (void)setCompletionBlockWithSuccess:(void (^)(VKHTTPOperation *operation, id responseObject))success + failure:(void (^)(VKHTTPOperation *operation, NSError *error))failure; +@end + diff --git a/frameworks/VKSdkFramework.framework/Headers/VKImageParameters.h b/frameworks/VKSdkFramework.framework/Headers/VKImageParameters.h new file mode 100755 index 0000000..a37f8dc --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKImageParameters.h @@ -0,0 +1,71 @@ +// +// VKImageParameters.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 "VKObject.h" + +/** +Describes image representation type +*/ +typedef enum VKImageType { + /// Sets jpeg representation of image + VKImageTypeJpg, + /// Sets png representation of image + VKImageTypePng +} VKImageType; + +/** +Parameters used for uploading image into VK servers +*/ +@interface VKImageParameters : VKObject + +/// Type of image compression. Can be <b>VKImageTypeJpg</b> or <b>VKImageTypePng</b>. +@property(nonatomic, assign) VKImageType imageType; +/// Quality used for jpg compression. From 0.0 to 1.0 +@property(nonatomic, assign) CGFloat jpegQuality; + +/** +Creates new parameters instance for png image. +@return New instance of parameters +*/ ++ (instancetype)pngImage; + +/** +Creates new parameters instance for jpeg image. +@param quality Used only for <b>VKImageTypeJpg</b> representation. From 0.0 to 1.0 +@return New instance with passed parameters +*/ ++ (instancetype)jpegImageWithQuality:(float)quality; + +/** +Return file extension for selected type +@return png for VKImageTypePng image type, jpg for VKImageTypeJpg image type +*/ +- (NSString *)fileExtension; + +/** +Return mime type +@return parameters mime type +*/ +- (NSString *)mimeType; +@end + + diff --git a/frameworks/VKSdkFramework.framework/Headers/VKJSONOperation.h b/frameworks/VKSdkFramework.framework/Headers/VKJSONOperation.h new file mode 100755 index 0000000..f0f2182 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKJSONOperation.h @@ -0,0 +1,16 @@ +// +// VKJSONOperation.h +// VKSdk +// +// Created by Roman Truba on 26.06.15. +// Copyright (c) 2015 VK. All rights reserved. +// + +#import "VKHTTPOperation.h" + +/** + Operation for parsing response string to JSON object, and returning JSON result + */ +@interface VKJSONOperation : VKHTTPOperation + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKLikes.h b/frameworks/VKSdkFramework.framework/Headers/VKLikes.h new file mode 100755 index 0000000..704fc80 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKLikes.h @@ -0,0 +1,36 @@ +// +// VKLikes.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 <Foundation/Foundation.h> +#import "VKApiObject.h" + +/** +Likes type of VK API +*/ +@interface VKLikes : VKApiObject +#ifndef DOXYGEN_SHOULD_SKIP_THIS +@property(nonatomic, strong) NSNumber *count; +@property(nonatomic, strong) NSNumber *user_likes; +@property(nonatomic, strong) NSNumber *can_like; +@property(nonatomic, strong) NSNumber *can_publish; +#endif +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKObject.h b/frameworks/VKSdkFramework.framework/Headers/VKObject.h new file mode 100755 index 0000000..ec2fe82 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKObject.h @@ -0,0 +1,28 @@ +// +// VKObject.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 <Foundation/Foundation.h> +#import <UIKit/UIKit.h> + +@interface VKObject : NSObject + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKOperation.h b/frameworks/VKSdkFramework.framework/Headers/VKOperation.h new file mode 100755 index 0000000..7e3cc32 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKOperation.h @@ -0,0 +1,46 @@ +// +// VKOperation.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 <Foundation/Foundation.h> + +typedef NS_ENUM(NSInteger, VKOperationState) { + /// Operation paused + VKOperationPausedState = -1, + /// Operation ready, and will be executed + VKOperationReadyState = 1, + /// Operation executing just in time + VKOperationExecutingState = 2, + /// Operation finished or canceled + VKOperationFinishedState = 3, +}; + +/** +Basic class for operations +*/ +@interface VKOperation : NSOperation +/// This operation state. Value from VKOperationState enum +@property(readwrite, nonatomic, assign) VKOperationState state; +/// Operation working lock +@property(readwrite, nonatomic, strong) NSRecursiveLock *lock; +/// Sets dispatch queue for returning result +@property(nonatomic, assign) dispatch_queue_t responseQueue; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKPermissions.h b/frameworks/VKSdkFramework.framework/Headers/VKPermissions.h new file mode 100755 index 0000000..576f350 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKPermissions.h @@ -0,0 +1,45 @@ +// +// VKPermissions.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 <Foundation/Foundation.h> + +extern NSString *const VK_PER_NOTIFY; +extern NSString *const VK_PER_FRIENDS; +extern NSString *const VK_PER_PHOTOS; +extern NSString *const VK_PER_AUDIO; +extern NSString *const VK_PER_VIDEO; +extern NSString *const VK_PER_DOCS; +extern NSString *const VK_PER_NOTES; +extern NSString *const VK_PER_PAGES; +extern NSString *const VK_PER_STATUS; +extern NSString *const VK_PER_WALL; +extern NSString *const VK_PER_GROUPS; +extern NSString *const VK_PER_MESSAGES; +extern NSString *const VK_PER_NOTIFICATIONS; +extern NSString *const VK_PER_STATS; +extern NSString *const VK_PER_ADS; +extern NSString *const VK_PER_OFFLINE; +extern NSString *const VK_PER_NOHTTPS; +extern NSString *const VK_PER_EMAIL; +extern NSString *const VK_PER_MARKET; + +extern NSArray *VKParseVkPermissionsFromInteger(NSInteger permissionsValue); diff --git a/frameworks/VKSdkFramework.framework/Headers/VKPhoto.h b/frameworks/VKSdkFramework.framework/Headers/VKPhoto.h new file mode 100755 index 0000000..f5acb7e --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKPhoto.h @@ -0,0 +1,55 @@ +// +// VKPhoto.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 "VKApiObject.h" +#import "VKApiObjectArray.h" +#import "VKPhotoSize.h" + +@class VKLikes; + +/** +Photo type of VK API. See descriptions here https://vk.com/dev/photo +*/ +@interface VKPhoto : VKApiObject +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSNumber *album_id; +@property(nonatomic, strong) NSNumber *owner_id; +@property(nonatomic, strong) NSString *photo_75; +@property(nonatomic, strong) NSString *photo_130; +@property(nonatomic, strong) NSString *photo_604; +@property(nonatomic, strong) NSString *photo_807; +@property(nonatomic, strong) NSString *photo_1280; +@property(nonatomic, strong) NSString *photo_2560; +@property(nonatomic, strong) NSNumber *width; +@property(nonatomic, strong) NSNumber *height; +@property(nonatomic, strong) NSString *text; +@property(nonatomic, strong) NSNumber *date; +@property(nonatomic, strong) VKPhotoSizes *sizes; +@property(nonatomic, readonly) NSString *attachmentString; +@end + + +/** +Array of API photos objects +*/ +@interface VKPhotoArray : VKApiObjectArray<VKPhoto*> +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKPhotoSize.h b/frameworks/VKSdkFramework.framework/Headers/VKPhotoSize.h new file mode 100755 index 0000000..0c09b08 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKPhotoSize.h @@ -0,0 +1,20 @@ +// +// VKPhotoSize.h +// sdk +// +// Created by Roman Truba on 11.08.14. +// Copyright (c) 2014 VK. All rights reserved. +// + +#import "VKApiObjectArray.h" + +@interface VKPhotoSize : VKApiObject +@property(nonatomic, readwrite, copy) NSString *src; +@property(nonatomic, readwrite, copy) NSNumber *width; +@property(nonatomic, readwrite, copy) NSNumber *height; +@property(nonatomic, readwrite, copy) NSString *type; +@end + +@interface VKPhotoSizes : VKApiObjectArray<VKPhotoSize*> +- (VKPhotoSize *)photoSizeWithType:(NSString *)type; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKRelative.h b/frameworks/VKSdkFramework.framework/Headers/VKRelative.h new file mode 100755 index 0000000..0a50323 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKRelative.h @@ -0,0 +1,34 @@ +// +// VKRelative.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 suabstantial 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 "VKApiObjectArray.h" + +@interface VKRelative : VKApiObject + +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSString *type; + +@end + +@interface VKRelativities : VKApiObjectArray<VKRelative*> + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKRequest.h b/frameworks/VKSdkFramework.framework/Headers/VKRequest.h new file mode 100755 index 0000000..1cb5b25 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKRequest.h @@ -0,0 +1,270 @@ +// +// VKRequest.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 <Foundation/Foundation.h> +#import "VKResponse.h" +#import "VKApiConst.h" +#import "VKObject.h" + + +/** +Creates and debug timings for VKRequest +*/ +@interface VKRequestTiming : VKObject +/// Date of request start +@property(nonatomic, strong) NSDate *startTime; +/// Date of request finished (after all operations) +@property(nonatomic, strong) NSDate *finishTime; +/// Interval of networking load time +@property(nonatomic, assign) NSTimeInterval loadTime; +/// Interval of model parsing time +@property(nonatomic, assign) NSTimeInterval parseTime; +/// Total time, as difference (finishTime - startTime) +@property(nonatomic, readonly) NSTimeInterval totalTime; +@end + +/** + Class for execution API-requests. + + See example requests below: + + 1) A plain request + + VKRequest *usersReq = [[VKApi users] get]; + + 2) A request with parameters + + VKRequest *usersReq = [[VKApi users] get:@{VK_API_FIELDS : @"photo_100"}]; + + 3) A request with predetermined maximum number of attempts. For example, take 10 attempts until succeed or an API error occurs: + + VKRequest *postReq = [[VKApi wall] post:@{VK_API_MESSAGE : @"Test"}]; + postReq.attempts = 10; + //or infinite + //postReq.attempts = 0; + + 4) You can build a request for any public method of VK API + + VKRequest *getWall = [VKRequest requestWithMethod:@"wall.get" andParameters:@{VK_API_OWNER_ID : @"-1"}]; + + 5) Also there are some special requests for uploading a photos to a user's wall, user albums and other + + VKRequest *request = [VKApi uploadWallPhotoRequest:[UIImage imageNamed:@"my_photo"] parameters:[VKImageParameters pngImage] userId:0 groupId:0 ]; + + + After you have prepared a request, you execute it and you may receive some data or error + + [usersReq executeWithResultBlock:^(VKResponse *response) { + NSLog(@"Json result: %@", response.json); + } errorBlock:^(NSError * error) { + if (error.code != VK_API_ERROR) { + [error.vkError.request repeat]; + } else { + NSLog(@"VK error: %@", error); + } + }]; + +*/ +@interface VKRequest : VKObject +/// Specify progress for uploading or downloading. Useless for text requests (because gzip encoding bytesTotal will always return -1) + +@property(nonatomic, copy) void (^progressBlock)(VKProgressType progressType, long long bytesLoaded, long long bytesTotal); +/// Specify completion block for request +@property(nonatomic, copy) void (^completeBlock)(VKResponse *response); +/// Specity error (HTTP or API) block for request. +@property(nonatomic, copy) void (^errorBlock)(NSError *error); +/// Specify attempts for request loading if caused HTTP-error. 0 for infinite +@property(nonatomic, assign) int attempts; +/// Use HTTPS requests (by default is YES). If http-request is impossible (user denied no https access), SDK will load https version +@property(nonatomic, assign) BOOL secure; +/// Sets current system language as default for API data +@property(nonatomic, assign) BOOL useSystemLanguage; +/// Set to NO if you don't need automatic model parsing +@property(nonatomic, assign) BOOL parseModel; +/// Set to YES if you need info about request timing +@property(nonatomic, assign) BOOL debugTiming; +/// Timeout for this request +@property(nonatomic, assign) NSInteger requestTimeout; +/// Sets dispatch queue for returning result +@property(nonatomic, assign) dispatch_queue_t responseQueue; +/// Set to YES if you need to freeze current thread for response +@property(nonatomic, assign) BOOL waitUntilDone; +/// Returns method for current request, e.g. users.get +@property(nonatomic, readonly) NSString *methodName; +/// Returns HTTP-method for current request +@property(nonatomic, readonly) NSString *httpMethod; +/// Returns list of method parameters (without common parameters) +@property(nonatomic, readonly) NSDictionary *methodParameters; +/// Returns http operation that can be enqueued +@property(nonatomic, readonly) NSOperation *executionOperation; +/// Returns info about request timings +@property(nonatomic, readonly) VKRequestTiming *requestTiming; +/// Return YES if current request was started +@property(nonatomic, readonly) BOOL isExecuting; +/// Return YES if current request was started +@property(nonatomic, copy) NSArray *preventThisErrorsHandling; + +///------------------------------- +/// @name Preparing requests +///------------------------------- + + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @param httpMethod HTTP method for execution, e.g. GET, POST + @return Complete request object for execute or configure method + @deprecated Use requestWithMethod:parameters: instead +*/ ++ (instancetype)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters + andHttpMethod:(NSString *)httpMethod __deprecated; + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @return Complete request object for execute or configure method + @deprecated Use requestWithMethod:parameters: instead +*/ ++ (instancetype)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters __deprecated; + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @param modelClass class for automatic parse + @return Complete request object for execute or configure method + */ ++ (instancetype)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters + modelClass:(Class)modelClass __deprecated; + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @param httpMethod HTTP method for execution, e.g. GET, POST + @param modelClass class for automatic parse + @return Complete request object for execute or configure method + @deprecated Use requestWithMethod:andParameters:modelClass: instead + */ ++ (instancetype)requestWithMethod:(NSString *)method + andParameters:(NSDictionary *)parameters + andHttpMethod:(NSString *)httpMethod + classOfModel:(Class)modelClass __deprecated; + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @return Complete request object for execute or configure method + */ ++ (instancetype)requestWithMethod:(NSString *)method + parameters:(NSDictionary *)parameters; + +/** + Creates new request with parameters. See documentation for methods here https://vk.com/dev/methods + @param method API-method name, e.g. audio.get + @param parameters method parameters + @param modelClass class for automatic parse + @return Complete request object for execute or configure method + */ ++ (instancetype)requestWithMethod:(NSString *)method + parameters:(NSDictionary *)parameters + modelClass:(Class)modelClass; + +/** +Creates new request for upload image to url +@param url url for upload, which was received from special methods +@param photoObjects VKPhoto object describes photos +@return Complete request object for execute +*/ ++ (instancetype)photoRequestWithPostUrl:(NSString *)url + withPhotos:(NSArray *)photoObjects; + +/** +Prepares NSURLRequest and returns prepared url request for current vkrequest +@return Prepared request used for loading +*/ +- (NSURLRequest *)getPreparedRequest; + +///------------------------------- +/// @name Execution +///------------------------------- +/** +Executes that request, and returns result to blocks +@param completeBlock called if there were no HTTP or API errors, returns execution result. +@param errorBlock called immediately if there was API error, or after <b>attempts</b> tries if there was an HTTP error +*/ +- (void)executeWithResultBlock:(void (^)(VKResponse *response))completeBlock + errorBlock:(void (^)(NSError *error))errorBlock; + +/** +Register current request for execute after passed request, if passed request is successful. If it's not, errorBlock will be called. +@param request after which request must be called that request +@param completeBlock called if there were no HTTP or API errors, returns execution result. +@param errorBlock called immediately if there was API error, or after <b>attempts</b> tries if there was an HTTP error +*/ +- (void)executeAfter:(VKRequest *)request + withResultBlock:(void (^)(VKResponse *response))completeBlock + errorBlock:(void (^)(NSError *error))errorBlock; + +/** +Starts loading of prepared request. You can use it instead of executeWithResultBlock +*/ +- (void)start; + +/** + Creates loading operation for this request + */ +- (NSOperation *)createExecutionOperation; + +/** +Repeats this request with initial parameters and blocks. +Used attempts will be set to 0. +*/ +- (void)repeat; + +/** +Cancel current request. Result will be not passed. errorBlock will be called with error code +*/ +- (void)cancel; + +///------------------------------- +/// @name Operating with parameters +///------------------------------- +/** + Adds additional parameters to that request + + @param extraParameters parameters supposed to be added +*/ +- (void)addExtraParameters:(NSDictionary *)extraParameters; + +/** + Specify language for API request + */ +- (void)setPreferredLang:(NSString *)lang; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKRequestsScheduler.h b/frameworks/VKSdkFramework.framework/Headers/VKRequestsScheduler.h new file mode 100755 index 0000000..f8816ca --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKRequestsScheduler.h @@ -0,0 +1,42 @@ +// +// VKRequestsScheduler.h +// +// Copyright (c) 2015 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 <Foundation/Foundation.h> +#import "VKObject.h" + +@class VKRequest; + +/** +* A singletone class for simple schedule requests. It used for preventing "Too many requests per second" error. +*/ +@interface VKRequestsScheduler : VKObject +/// Returns an instance of scheduler ++ (instancetype)instance; + +/// Used for enabling or disabling scheduler. If scheduler disabled, all next added requests will be sent immediately +- (void)setEnabled:(BOOL)enabled; + +/// Adds requests to queue. If scheduler disabled, request starts immediately +- (void)scheduleRequest:(VKRequest *)req; + +- (NSTimeInterval)currentAvailableInterval; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKResponse.h b/frameworks/VKSdkFramework.framework/Headers/VKResponse.h new file mode 100755 index 0000000..7517ecd --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKResponse.h @@ -0,0 +1,41 @@ +// +// VKResponse.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 "VKObject.h" +#import "VKApiObject.h" +@class VKRequest; + +/** +Class presenting answer from API +*/ +@interface VKResponse <__covariant ModelClass:VKApiObject*> : VKObject + +/// Request which caused response +@property(nonatomic, weak) VKRequest *request; +/// Json content of response. Can be array or object. +@property(nonatomic, strong) id json; +/// Model parsed from response +@property(nonatomic, strong) ModelClass parsedModel; +/// Original response string from server +@property(nonatomic, copy) NSString *responseString; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKSchool.h b/frameworks/VKSdkFramework.framework/Headers/VKSchool.h new file mode 100755 index 0000000..40a4f62 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKSchool.h @@ -0,0 +1,43 @@ +// +// VKSchool.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 suabstantial 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 "VKApiObjectArray.h" + +@interface VKSchool : VKApiObject + +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSNumber *country; +@property(nonatomic, strong) NSNumber *city; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSNumber *year_from; +@property(nonatomic, strong) NSNumber *year_to; +@property(nonatomic, strong) NSNumber *year_graduated; +@property(nonatomic, strong) NSString *Mclass; +@property(nonatomic, strong) NSString *speciality; +@property(nonatomic, strong) NSNumber *type; +@property(nonatomic, strong) NSString *type_str; + +@end + +@interface VKSchools : VKApiObjectArray<VKSchool*> + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKSdk.h b/frameworks/VKSdkFramework.framework/Headers/VKSdk.h new file mode 100755 index 0000000..c3d2f7c --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKSdk.h @@ -0,0 +1,348 @@ +// +// VKSdk.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 <Foundation/Foundation.h> +#import "VKAccessToken.h" +#import "VKPermissions.h" +#import "VKUtil.h" +#import "VKApi.h" +#import "VKApiConst.h" +#import "VKSdkVersion.h" +#import "VKCaptchaViewController.h" +#import "VKRequest.h" +#import "VKBatchRequest.h" +#import "NSError+VKError.h" +#import "VKApiModels.h" +#import "VKUploadImage.h" +#import "VKShareDialogController.h" +#import "VKActivity.h" +#import "VKAuthorizationResult.h" + +/** + Options used for authorization. + */ +typedef NS_OPTIONS(NSUInteger, VKAuthorizationOptions) { + ///This option is passed by default. You will have unlimited in time access to user data + VKAuthorizationOptionsUnlimitedToken = 1 << 0, + ///Pass this option to disable usage of SFSafariViewController + VKAuthorizationOptionsDisableSafariController = 1 << 1, +}; + +/** + SDK events delegate protocol. + + This protocol may be implemented by any count of objects, but don't forget unregistering deallocated delegates. + */ +@protocol VKSdkDelegate <NSObject> +@required + +/** + Notifies about authorization was completed, and returns authorization result with new token or error. + + @param result contains new token or error, retrieved after VK authorization. + */ +- (void)vkSdkAccessAuthorizationFinishedWithResult:(VKAuthorizationResult *)result; + +/** + Notifies about access error. For example, this may occurs when user rejected app permissions through VK.com + */ +- (void)vkSdkUserAuthorizationFailed; + +@optional + +/** + Notifies about authorization state was changed, and returns authorization result with new token or error. + + If authorization was successfull, also contains user info. + + @param result contains new token or error, retrieved after VK authorization + */ +- (void)vkSdkAuthorizationStateUpdatedWithResult:(VKAuthorizationResult *)result; + +/** + Notifies about access token has been changed + + @param newToken new token for API requests + @param oldToken previous used token + */ +- (void)vkSdkAccessTokenUpdated:(VKAccessToken *)newToken oldToken:(VKAccessToken *)oldToken; + +/** + Notifies about existing token has expired (by timeout). This may occurs if you requested token without no_https scope. + + @param expiredToken old token that has expired. + */ +- (void)vkSdkTokenHasExpired:(VKAccessToken *)expiredToken; + +@end + +/** + SDK UI delegate protocol. + + This delegate used for managing UI events, when SDK required user action. + */ +@protocol VKSdkUIDelegate <NSObject> +/** + Pass view controller that should be presented to user. Usually, it's an authorization window. + + @param controller view controller that must be shown to user + */ +- (void)vkSdkShouldPresentViewController:(UIViewController *)controller; + +/** + Calls when user must perform captcha-check. + If you implementing this method by yourself, call -[VKError answerCaptcha:] method for captchaError with user entered answer. + + @param captchaError error returned from API. You can load captcha image from <b>captchaImg</b> property. + */ +- (void)vkSdkNeedCaptchaEnter:(VKError *)captchaError; + +@optional +/** + * Called when a controller presented by SDK will be dismissed. + */ +- (void)vkSdkWillDismissViewController:(UIViewController *)controller; + +/** + * Called when a controller presented by SDK did dismiss. + */ +- (void)vkSdkDidDismissViewController:(UIViewController *)controller; + +@end + + +/** + Entry point for using VK sdk. Should be initialized at application start. + + Typical scenario of using SDK is next: + + 1) Register new standalone application on https://vk.com/editapp?act=create + + 2) Setup your application delegate and Info.plist as described on project page: https://github.com/VKCOM/vk-ios-sdk#how-to-set-up-vk-ios-sdk + + 3) Initialize SDK with your VK application ID. + + VKSdk *sdkInstance = [VKSdk initializeWithAppId:VK_APP_ID]; + + 4) Register required SDK-delegates (VKSdkDelegate) and single UI-delegate (VKSdkUIDelegate). + + [sdkInstance registerDelegate:self]; + [sdkInstance setUiDelegate:self]; + + 5) Check if user already authorized. + + [VKSdk wakeUpSession:SCOPE completeBlock:^(VKAuthorizationState state, NSError *error) { + switch (state) { + case VKAuthorizationAuthorized: + // User already autorized, and session is correct + break; + + case VKAuthorizationInitialized: + // User not yet authorized, proceed to next step + break; + + default: + // Probably, network error occured, try call +[VKSdk wakeUpSession:completeBlock:] later + break; + } + }]; + + 6) If user is not authorized, call +[VKSdk authorize:] method with required scope (permission for token you required). + + [VKSdk authorize:@[VK_PER_FRIENDS, VK_PER_WALL]]; + + 7) You wait for -[VKSdkDelegate vkSdkAccessAuthorizationFinishedWithResult:] method called. + + - (void)vkSdkAccessAuthorizationFinishedWithResult:(VKAuthorizationResult *)result { + if (result.token) { + // User successfully authorized, you may start working with VK API + } else if (result.error) { + // User canceled authorization, or occured unresolving networking error. Reset your UI to initial state and try authorize user later + } + } + +*/ +@interface VKSdk : NSObject + +///------------------------------- +/// @name Delegate +///------------------------------- + +/// Delegate for managing user interaction, when SDK required +@property(nonatomic, readwrite, weak) id <VKSdkUIDelegate> uiDelegate; + +/// Returns a last app_id used for initializing the SDK +@property(nonatomic, readonly, copy) NSString *currentAppId; + +/// API version for making requests +@property(nonatomic, readonly, copy) NSString *apiVersion; + +///------------------------------- +/// @name Initialization +///------------------------------- + +/** + Returns instance of VK sdk. You should never use that directly + */ ++ (instancetype)instance; + +/** + Returns YES if SDK was previously initialized with initializeWithAppId: method + */ ++ (BOOL)initialized; + +/** + Initialize SDK with responder for global SDK events with default api version from VK_SDK_API_VERSION + + @param appId your application id (if you haven't, you can create standalone application here https://vk.com/editapp?act=create ) +*/ ++ (instancetype)initializeWithAppId:(NSString *)appId; + +/** +Initialize SDK with responder for global SDK events. + +@param appId your application id (if you haven't, you can create standalone application here https://vk.com/editapp?act=create ) +@param version if you want to use latest API version, pass required version here +*/ ++ (instancetype)initializeWithAppId:(NSString *)appId + apiVersion:(NSString *)version; + +/** + Adds a weak object reference to an object implementing the VKSdkDelegate protocol. + + @param delegate your object implementing delegate protocol + */ +- (void)registerDelegate:(id <VKSdkDelegate>)delegate; + +/** + Removes an object reference SDK delegate. + + @param delegate your object implementing delegate protocol + */ +- (void)unregisterDelegate:(id <VKSdkDelegate>)delegate; + +///------------------------------- +/// @name Authentication in VK +///------------------------------- + +/** + Starts authorization process to retrieve unlimited token. If VKapp is available in system, it will opens and requests access from user. + Otherwise SFSafariViewController or webview will be opened for access request. + + @param permissions array of permissions for your applications. All permissions you can +*/ ++ (void)authorize:(NSArray *)permissions; + +/** + Starts authorization process. If VKapp is available in system, it will opens and requests access from user. + Otherwise SFSafariViewController or webview will be opened for access request. + + @param permissions array of permissions for your applications. All permissions you can + @param options special options + */ ++ (void)authorize:(NSArray *)permissions withOptions:(VKAuthorizationOptions)options; + +///------------------------------- +/// @name Access token methods +///------------------------------- + +/** + Returns token for API requests. + + @return Received access token or nil, if user not yet authorized +*/ ++ (VKAccessToken *)accessToken; + +///------------------------------- +/// @name Other methods +///------------------------------- + +/** + Checks passed URL for access token. + + @param passedUrl url from external application + @param sourceApplication source application + @return YES if parsed successfully +*/ ++ (BOOL)processOpenURL:(NSURL *)passedUrl fromApplication:(NSString *)sourceApplication; + + +/** + Checks if somebody logged in with SDK (call after wakeUpSession) + */ ++ (BOOL)isLoggedIn; + +/** + This method is trying to retrieve token from storage, and check application still permitted to use user access token + */ ++ (void)wakeUpSession:(NSArray *)permissions completeBlock:(void (^)(VKAuthorizationState state, NSError *error))wakeUpBlock; + +/** +Forces logout using OAuth (with VKAuthorizeController). Removes all cookies for *.vk.com. +Has no effect for logout in VK app +*/ ++ (void)forceLogout; + +/** +* Checks if there is some application, which may process authorize url +*/ ++ (BOOL)vkAppMayExists; + +/** +Check existing permissions +@param permissions array of permissions you want to check +*/ +- (BOOL)hasPermissions:(NSArray *)permissions; + +/** +Enables or disables scheduling for requests +*/ ++ (void)setSchedulerEnabled:(BOOL)enabled; + +// Deny allocating more SDK ++ (instancetype)alloc NS_UNAVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; + ++ (instancetype)new NS_UNAVAILABLE; + +@end + + +@interface UIViewController (VKController) + +- (void)vks_presentViewControllerThroughDelegate; + +- (void)vks_viewControllerWillDismiss; + +- (void)vks_viewControllerDidDismiss; + +@end + +@interface VKAccessToken (Private) + +- (void)notifyTokenExpired; + +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKSdkVersion.h b/frameworks/VKSdkFramework.framework/Headers/VKSdkVersion.h new file mode 100755 index 0000000..ae0d40f --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKSdkVersion.h @@ -0,0 +1,24 @@ +// +// VKSdkVersion.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. + +#define VK_SDK_VERSION @"1.4.2" +#define VK_SDK_API_VERSION @"5.52" diff --git a/frameworks/VKSdkFramework.framework/Headers/VKShareDialogController.h b/frameworks/VKSdkFramework.framework/Headers/VKShareDialogController.h new file mode 100755 index 0000000..e0d6c75 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKShareDialogController.h @@ -0,0 +1,74 @@ +// +// VKShareDialogController.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 <UIKit/UIKit.h> +#import "VKObject.h" +#import "VKUploadImage.h" + + +typedef NS_ENUM(NSInteger, VKShareDialogControllerResult) { + VKShareDialogControllerResultCancelled, + VKShareDialogControllerResultDone +}; + +/* + * Link representation for share dialog + */ +@interface VKShareLink : VKObject +/// Use that field for present link description in share dialog interface +@property(nonatomic, copy) NSString *title; +/// Use that field for pass real link to VK. Host of the link will be displayed in share dialog +@property(nonatomic, copy) NSURL *link; + +- (instancetype)initWithTitle:(NSString *)title link:(NSURL *)link; +@end + + +/** +* Creates dialog for sharing some information from your app to user wall in VK +*/ +@interface VKShareDialogController : UIViewController +/// Array of prepared VKUploadImage objects for upload and share. User can remove any attachment +@property(nonatomic, strong) NSArray *uploadImages; + +/// Photos already uploaded to VK. That is array of photos ids: @["ownerid_photoid", ...]; +@property(nonatomic, strong) NSArray *vkImages; + +/// Links attachment for new post +@property(nonatomic, strong) VKShareLink *shareLink; + +/// Text to share. User can change it +@property(nonatomic, copy) NSString *text; + +/// Put only needed scopes into that array. By default equals @[VK_PER_WALL,VK_PER_PHOTOS] +@property(nonatomic, strong) NSArray *requestedScope; + +/// You can receive information about sharing state +@property(nonatomic, copy) void (^completionHandler)(VKShareDialogController *dialog, VKShareDialogControllerResult result); + +/// Flag meaning the share viewcontroller manage it's presentation state by itself +@property(nonatomic, assign) BOOL dismissAutomatically; + +/// Contains post id created via share dialog. Example string: 123_4567890 +@property(nonatomic, readonly, copy) NSString *postId; + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKSharedTransitioningObject.h b/frameworks/VKSdkFramework.framework/Headers/VKSharedTransitioningObject.h new file mode 100755 index 0000000..5584ef0 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKSharedTransitioningObject.h @@ -0,0 +1,11 @@ +// +// Created by Roman Truba on 24.02.15. +// Copyright (c) 2015 VK. All rights reserved. +// + +#import <Foundation/Foundation.h> +#import <UIKit/UIKit.h> + + +@interface VKSharedTransitioningObject : NSObject <UIViewControllerTransitioningDelegate> +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUniversity.h b/frameworks/VKSdkFramework.framework/Headers/VKUniversity.h new file mode 100755 index 0000000..41de616 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUniversity.h @@ -0,0 +1,42 @@ +// +// VKUniversity.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 suabstantial 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 "VKApiObjectArray.h" + +@interface VKUniversity : VKApiObject + +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSNumber *country; +@property(nonatomic, strong) NSNumber *city; +@property(nonatomic, strong) NSString *name; +@property(nonatomic, strong) NSNumber *faculty; +@property(nonatomic, strong) NSString *faculty_name; +@property(nonatomic, strong) NSNumber *chair; +@property(nonatomic, strong) NSString *chair_name; +@property(nonatomic, strong) NSNumber *graduation; +@property(nonatomic, strong) NSString *education_form; +@property(nonatomic, strong) NSString *education_status; + +@end + +@interface VKUniversities : VKApiObjectArray<VKUniversity*> +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUploadImage.h b/frameworks/VKSdkFramework.framework/Headers/VKUploadImage.h new file mode 100755 index 0000000..7c16557 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUploadImage.h @@ -0,0 +1,52 @@ +// +// VKUploadImage.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 "VKImageParameters.h" + +/** +Contains image data with image description +*/ +@interface VKUploadImage : VKObject + +/// Bytes of image +@property(nonatomic, strong) NSData *imageData; +/// Source image +@property(nonatomic, strong) UIImage *sourceImage; +/// Image basic info +@property(nonatomic, strong) VKImageParameters *parameters; + +/** +Create new image data representation used for upload +@param data Bytes of image +@param params Image basic info +@return Prepared object for using in upload +*/ ++ (instancetype)uploadImageWithData:(NSData *)data andParams:(VKImageParameters *)params; + +/** +Create new image representation used for upload +@param image Source image +@param params Image basic info +@return Prepared object for using in upload +*/ ++ (instancetype)uploadImageWithImage:(UIImage *)image andParams:(VKImageParameters *)params; +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUploadMessagesPhotoRequest.h b/frameworks/VKSdkFramework.framework/Headers/VKUploadMessagesPhotoRequest.h new file mode 100755 index 0000000..c547564 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUploadMessagesPhotoRequest.h @@ -0,0 +1,28 @@ +// +// VKUploadMessagesPhotoRequest.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 "VKUploadPhotoBase.h" + +@interface VKUploadMessagesPhotoRequest : VKUploadPhotoBase + +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoBase.h b/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoBase.h new file mode 100755 index 0000000..c0c6d67 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoBase.h @@ -0,0 +1,52 @@ +// +// VKPhotoUploadBase.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 "VKRequest.h" +#import "VKImageParameters.h" +#import "VKOperation.h" + +/** +Provides common part of photo upload process +*/ +@interface VKUploadPhotoBase : VKRequest +/// ID of album to upload +@property(nonatomic, assign) NSInteger albumId; +/// ID of group to upload +@property(nonatomic, assign) NSInteger groupId; +/// ID of user wall to upload +@property(nonatomic, assign) NSInteger userId; + +/// Passed image parameters +@property(nonatomic, strong) VKImageParameters *imageParameters; +/// Image to upload +@property(nonatomic, strong) UIImage *image; + +- (instancetype)initWithImage:(UIImage *)image parameters:(VKImageParameters *)parameters; +@end + +/** +Special operation for execute upload +*/ +@interface VKUploadImageOperation : VKOperation + ++ (instancetype)operationWithUploadRequest:(VKUploadPhotoBase *)request; +@end \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoRequest.h b/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoRequest.h new file mode 100755 index 0000000..669dce2 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUploadPhotoRequest.h @@ -0,0 +1,39 @@ +// +// VKUploadPhotoRequest.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 "VKUploadPhotoBase.h" + +/** +Special request for upload photos to specified album +*/ +@interface VKUploadPhotoRequest : VKUploadPhotoBase + +/** +Initializes photo upload request with parameters +@param image Image to upload +@param parameters image parameters for upload +@param albumId ID of album for photo +@param groupId ID of group (without minus sign) on which wall image should be posted (or nil) +@return Completed request for executing +*/ +- (instancetype)initWithImage:(UIImage *)image parameters:(VKImageParameters *)parameters albumId:(NSInteger)albumId groupId:(NSInteger)groupId; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUploadWallPhotoRequest.h b/frameworks/VKSdkFramework.framework/Headers/VKUploadWallPhotoRequest.h new file mode 100755 index 0000000..9f3670c --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUploadWallPhotoRequest.h @@ -0,0 +1,38 @@ +// +// VKUploadWallPhotoRequest.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 "VKUploadPhotoBase.h" + +/** +Special request for upload single photo to user wall +*/ +@interface VKUploadWallPhotoRequest : VKUploadPhotoBase +/** +Initializes photo upload request with parameters +@param image Image to upload +@param parameters image parameters for upload +@param userId ID of user on which wall image should be posted (or nil) +@param groupId ID of group (without minus sign) on which wall image should be posted (or nil) +@return Completed request for executing +*/ +- (instancetype)initWithImage:(UIImage *)image parameters:(VKImageParameters *)parameters userId:(NSInteger)userId groupId:(NSInteger)groupId; +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUser.h b/frameworks/VKSdkFramework.framework/Headers/VKUser.h new file mode 100755 index 0000000..2c2ab99 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUser.h @@ -0,0 +1,170 @@ +// +// VKUser.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 <Foundation/Foundation.h> +#import "VKApiObject.h" +#import "VKApiObjectArray.h" +#import "VKAudio.h" +#import "VKCounters.h" +#import "VKPhoto.h" +#import "VKSchool.h" +#import "VKUniversity.h" +#import "VKRelative.h" + +@interface VKGeoObject : VKApiObject +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSString *title; +@end + +@interface VKCity : VKGeoObject +@end + +@interface VKCountry : VKGeoObject +@end + +/** + * User personal information (field 'personal') + */ +@interface VKPersonal : VKObject +@property(nonatomic, strong) NSArray *langs; +@property(nonatomic, strong) NSNumber *political; +@property(nonatomic, strong) NSString *religion; +@property(nonatomic, strong) NSNumber *life_main; +@property(nonatomic, strong) NSNumber *people_main; +@property(nonatomic, strong) NSString *inspired_by; +@property(nonatomic, strong) NSNumber *smoking; +@property(nonatomic, strong) NSNumber *alcohol; +@end + +/** + * User last seen information (field 'last_seen') + */ +@interface VKLastSeen : VKApiObject +@property(nonatomic, strong) NSNumber *time; +@property(nonatomic, strong) NSNumber *platform; +@end + +/** + * Information about connected services by user (field 'exports') + */ +@interface VKExports : VKApiObject +@property(nonatomic, strong) NSNumber *twitter; +@property(nonatomic, strong) NSNumber *facebook; +@property(nonatomic, strong) NSNumber *livejournal; +@property(nonatomic, strong) NSNumber *instagram; +@end + +/** + User type of VK API. See descriptions here https://vk.com/dev/fields + */ +@interface VKUser : VKApiObject +@property(nonatomic, strong) NSNumber *id; +@property(nonatomic, strong) NSString *first_name; +@property(nonatomic, strong) NSString *last_name; +@property(nonatomic, strong) NSString *first_name_acc; +@property(nonatomic, strong) NSString *last_name_acc; +@property(nonatomic, strong) NSString *first_name_gen; +@property(nonatomic, strong) NSString *last_name_gen; +@property(nonatomic, strong) NSString *first_name_dat; +@property(nonatomic, strong) NSString *last_name_dat; +@property(nonatomic, strong) NSString *first_name_ins; +@property(nonatomic, strong) NSString *last_name_ins; +@property(nonatomic, strong) NSString *domain; +@property(nonatomic, strong) VKPersonal *personal; +@property(nonatomic, strong) NSNumber *sex; +@property(nonatomic, strong) NSNumber *invited_by; +@property(nonatomic, strong) NSNumber *online; +@property(nonatomic, strong) NSString *bdate; +@property(nonatomic, strong) VKCity *city; +@property(nonatomic, strong) VKCountry *country; +@property(nonatomic, strong) NSMutableArray *lists; +@property(nonatomic, strong) NSString *screen_name; +@property(nonatomic, strong) NSNumber *has_mobile; +@property(nonatomic, strong) NSNumber *rate; +@property(nonatomic, strong) NSString *mobile_phone; +@property(nonatomic, strong) NSString *home_phone; +@property(nonatomic, assign) BOOL can_post; +@property(nonatomic, assign) BOOL can_see_all_posts; +@property(nonatomic, strong) NSString *status; +@property(nonatomic, strong) VKAudio *status_audio; +@property(nonatomic, assign) bool status_loaded; +@property(nonatomic, strong) VKLastSeen *last_seen; +@property(nonatomic, strong) NSNumber *relation; +@property(nonatomic, strong) VKUser *relation_partner; +@property(nonatomic, strong) VKCounters *counters; +@property(nonatomic, strong) NSString *nickname; +@property(nonatomic, strong) VKExports *exports; +@property(nonatomic, strong) NSNumber *wall_comments; +@property(nonatomic, assign) BOOL can_write_private_message; +@property(nonatomic, assign) BOOL can_see_audio; +@property(nonatomic, strong) NSString *phone; +@property(nonatomic, strong) NSNumber *online_mobile; +@property(nonatomic, strong) NSNumber *faculty; +@property(nonatomic, strong) NSNumber *university; +@property(nonatomic, strong) VKUniversities *universities; +@property(nonatomic, strong) VKSchools *schools; +@property(nonatomic, strong) NSNumber *graduation; +@property(nonatomic, strong) NSNumber *friendState; +@property(nonatomic, strong) NSNumber *common_count; +@property(nonatomic, strong) NSString *faculty_name; +@property(nonatomic, strong) NSString *university_name; +@property(nonatomic, strong) NSString *books; +@property(nonatomic, strong) NSString *games; +@property(nonatomic, strong) NSString *interests; +@property(nonatomic, strong) NSString *movies; +@property(nonatomic, strong) NSString *tv; +@property(nonatomic, strong) NSString *about; +@property(nonatomic, strong) NSString *music; +@property(nonatomic, strong) NSString *quoutes; +@property(nonatomic, strong) NSString *activities; +@property(nonatomic, strong) NSString *photo_max; +@property(nonatomic, strong) NSString *photo_50; +@property(nonatomic, strong) NSString *photo_100; +@property(nonatomic, strong) NSString *photo_200; +@property(nonatomic, strong) NSString *photo_200_orig; +@property(nonatomic, strong) NSString *photo_400_orig; +@property(nonatomic, strong) NSString *photo_max_orig; +@property(nonatomic, strong) VKPhotoArray *photos; +@property(nonatomic, strong) NSNumber *photos_count; +@property(nonatomic, strong) VKRelativities *relatives; +@property(nonatomic, assign) NSTimeInterval bdateIntervalSort; +@property(nonatomic, strong) NSNumber *verified; +@property(nonatomic, strong) NSString *deactivated; +@property(nonatomic, strong) NSString *site; +@property(nonatomic, strong) NSString *home_town; +@property(nonatomic, strong) NSNumber *blacklisted; +@property(nonatomic, strong) NSNumber *blacklisted_by_me; +@property(nonatomic, strong) NSString *twitter; +@property(nonatomic, strong) NSString *skype; +@property(nonatomic, strong) NSString *facebook; +@property(nonatomic, strong) NSString *instagram; +@property(nonatomic, strong) NSString *livejournal; +@property(nonatomic, strong) NSString *wall_default; + +@property(nonatomic, strong) NSNumber *followers_count; +@end + +/** +Array of API users +*/ +@interface VKUsersArray : VKApiObjectArray<VKUser*> +@end diff --git a/frameworks/VKSdkFramework.framework/Headers/VKUtil.h b/frameworks/VKSdkFramework.framework/Headers/VKUtil.h new file mode 100755 index 0000000..aa4ecd0 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Headers/VKUtil.h @@ -0,0 +1,82 @@ +// +// VKUtil.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. + +#define VK_COLOR [UIColor colorWithRed:85.0f / 255 green:133.0f / 255 blue:188.0f / 255 alpha:1.0f] +#define VK_IS_DEVICE_IPAD (UIUserInterfaceIdiomPad == [[UIDevice currentDevice] userInterfaceIdiom]) + +#import <UIKit/UIKit.h> + +/** +Various functions +*/ +@interface VKUtil : NSObject +/** +Breaks key=value string to dictionary +@param queryString string with key=value pairs joined by & symbol +@return Dictionary of parameters +*/ ++ (NSDictionary *)explodeQueryString:(NSString *)queryString; + ++ (NSString *)generateGUID; + ++ (NSNumber *)parseNumberString:(id)number; + ++ (UIColor *)colorWithRGB:(NSInteger)rgb; + ++ (NSString *)queryStringFromParams:(NSDictionary *)params; + +/** + * Indicates that the current device system version at least conforms the argument version + */ ++ (BOOL) isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion) version; + +/** + * Returns true if the current device uses iOS 7 or greater + */ ++ (BOOL) isOperatingSystemAtLeastIOS7; + +/** + * Returns true if the current device uses iOS 8 or greater + */ ++ (BOOL) isOperatingSystemAtLeastIOS8; +@end + + +@interface UIImage (RoundedImage) +- (UIImage *)vks_roundCornersImage:(CGFloat)cornerRadius resultSize:(CGSize)imageSize; +@end + +static inline NSNumber *VK_ENSURE_NUM(id obj) { + return [obj isKindOfClass:[NSNumber class]] ? obj : nil; +} + +static inline NSDictionary *VK_ENSURE_DICT(id data) { + return [data isKindOfClass:NSDictionary.class] ? data : nil; +} + +static inline NSArray *VK_ENSURE_ARRAY(id data) { + return [data isKindOfClass:NSArray.class] ? data : nil; +} + +static inline id VK_ENSURE(id data, Class class) { + return [data isKindOfClass:class] ? data : nil; +} \ No newline at end of file diff --git a/frameworks/VKSdkFramework.framework/Info.plist b/frameworks/VKSdkFramework.framework/Info.plist new file mode 100644 index 0000000..b3ae130 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Info.plist Binary files differ diff --git a/frameworks/VKSdkFramework.framework/Modules/module.modulemap b/frameworks/VKSdkFramework.framework/Modules/module.modulemap new file mode 100644 index 0000000..0e55f77 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module VKSdkFramework { + umbrella header "VKSdkFramework.h" + + export * + module * { export * } +} diff --git a/frameworks/VKSdkFramework.framework/VKSdkFramework b/frameworks/VKSdkFramework.framework/VKSdkFramework new file mode 100644 index 0000000..63b892f --- /dev/null +++ b/frameworks/VKSdkFramework.framework/VKSdkFramework Binary files differ diff --git a/frameworks/VKSdkFramework.framework/_CodeSignature/CodeDirectory b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..191fcc0 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeDirectory Binary files differ diff --git a/frameworks/VKSdkFramework.framework/_CodeSignature/CodeRequirements b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..aa84bb8 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeRequirements Binary files differ diff --git a/frameworks/VKSdkFramework.framework/_CodeSignature/CodeResources b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6f545f2 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeResources @@ -0,0 +1,575 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Headers/NSData+MD5.h</key> + <data> + W1DilsTKd4k2FzKXKXtwGs1AgPM= + </data> + <key>Headers/NSError+VKError.h</key> + <data> + MJ22+xIuLa7kbKNczNMR3lrsbsU= + </data> + <key>Headers/NSString+MD5.h</key> + <data> + QorWKcgrSuqvOjtTdQ5/G2wfvXE= + </data> + <key>Headers/OrderedDictionary.h</key> + <data> + jh+xYKCVSlQFR0afovM5uqNJrNE= + </data> + <key>Headers/VKAccessToken.h</key> + <data> + iFtSBFrcVnnTzHkJq+uqYcIkbbQ= + </data> + <key>Headers/VKActivity.h</key> + <data> + e5XcLz1rzbYWVzZBBvebgZUZqkg= + </data> + <key>Headers/VKApi.h</key> + <data> + 5B/0FaX3AqXZl7NwT5mt6NO4QVU= + </data> + <key>Headers/VKApiBase.h</key> + <data> + FxbjQbvbmJ1IE9yl7U+Ap+vPOCw= + </data> + <key>Headers/VKApiCaptcha.h</key> + <data> + 3hLG9po9J20utOdNeH1G96Nff6s= + </data> + <key>Headers/VKApiConst.h</key> + <data> + jG6MT5QBJFP7HOt+KPvlk9Dp8ug= + </data> + <key>Headers/VKApiDocs.h</key> + <data> + 4gvNgYXe7vgN6o/BFvJB8wOvlDg= + </data> + <key>Headers/VKApiFriends.h</key> + <data> + uLn3T32rbzuo4BTYFU/tkCJRAZk= + </data> + <key>Headers/VKApiGroups.h</key> + <data> + cnkkZXzoq2VxQNCpT8NbWF6z6N8= + </data> + <key>Headers/VKApiModels.h</key> + <data> + iTImeI/g4iQI2pqHCY1uBt7coYQ= + </data> + <key>Headers/VKApiObject.h</key> + <data> + A6HpWrinzULKbmbKCfhWoy0vdGo= + </data> + <key>Headers/VKApiObjectArray.h</key> + <data> + qG2eTx+J3k0UiaB+AEGP9ckzils= + </data> + <key>Headers/VKApiPhotos.h</key> + <data> + 8I+qil2bHRVRl6tWYomhHP7lr/I= + </data> + <key>Headers/VKApiUsers.h</key> + <data> + boWMg9o7WMQCug5dUFSENgrb4QU= + </data> + <key>Headers/VKApiWall.h</key> + <data> + hL73sMwFLvOlO4WgZktRzxPfO/I= + </data> + <key>Headers/VKAudio.h</key> + <data> + IyCpytA1EjZjYxakoVsJj9SkxDo= + </data> + <key>Headers/VKAuthorizationResult.h</key> + <data> + ZLfX6zFOyv7ctbjph8XJi0G+wvo= + </data> + <key>Headers/VKAuthorizeController.h</key> + <data> + 2yLVLNojJLZ6sZaY2S50VbtnPA8= + </data> + <key>Headers/VKBatchRequest.h</key> + <data> + RIfQ7o07lpMIjSaCENJmrsyOHNM= + </data> + <key>Headers/VKBundle.h</key> + <data> + 8YmPZjRqpQSnVsv+/HHvess9g1M= + </data> + <key>Headers/VKCaptchaView.h</key> + <data> + HUbDnyNrAyKYGYDFXtH0YJQd9Ys= + </data> + <key>Headers/VKCaptchaViewController.h</key> + <data> + 0Z689zPWZ3WU0A/ziV2D3d8tAUQ= + </data> + <key>Headers/VKCounters.h</key> + <data> + APegMoxHOKkbocRI+WQ214ENUUw= + </data> + <key>Headers/VKDocs.h</key> + <data> + ltiYDQjEWC8lP5I31ZgmXiJ75q8= + </data> + <key>Headers/VKError.h</key> + <data> + fv5qoaSGcF1btXQXb/fxJyT0w+8= + </data> + <key>Headers/VKGroup.h</key> + <data> + T/PkHDZ41vPcFkI8T3fEkvECgQM= + </data> + <key>Headers/VKHTTPClient.h</key> + <data> + egPrHuv8ucP0br1W140GAF1hO0c= + </data> + <key>Headers/VKHTTPOperation.h</key> + <data> + k2XEnjEWk+e88woXRKWXn4SmuYY= + </data> + <key>Headers/VKImageParameters.h</key> + <data> + t8LnuGljOhLY8yWherQjU+bWvd0= + </data> + <key>Headers/VKJSONOperation.h</key> + <data> + MdgKmdtebVhfP20auOcakSGGcZE= + </data> + <key>Headers/VKLikes.h</key> + <data> + BNoF+dDUc+Y7Z0MAYflD0yZXJw4= + </data> + <key>Headers/VKObject.h</key> + <data> + xVmmio+KW9MEqfMcIAuruO6Tr1U= + </data> + <key>Headers/VKOperation.h</key> + <data> + SqYcHTpG6HHBLgJ+ggFZeHKIXW4= + </data> + <key>Headers/VKPermissions.h</key> + <data> + 1khKsg4kndZKbG5E3uBu8GhpxvM= + </data> + <key>Headers/VKPhoto.h</key> + <data> + 037vcx4x6dMjKw79kAo0GUZamGE= + </data> + <key>Headers/VKPhotoSize.h</key> + <data> + pAI92rhitAM15nc3+uBziW87wAU= + </data> + <key>Headers/VKRelative.h</key> + <data> + CIIbXD0jr9aEMxeHcXETjELDrq0= + </data> + <key>Headers/VKRequest.h</key> + <data> + OTOLx4JPewLo3q3vKBt/NWsz8ik= + </data> + <key>Headers/VKRequestsScheduler.h</key> + <data> + AfTJzHAePp4M0YYlStPf0XvuywE= + </data> + <key>Headers/VKResponse.h</key> + <data> + NJ6sQPpOmutTof1iuE4gNQy/6As= + </data> + <key>Headers/VKSchool.h</key> + <data> + v+Z2zfiKHVROdCmwLUMr0QSOhJg= + </data> + <key>Headers/VKSdk.h</key> + <data> + aG7rCTXNT9QL8YIt/HNVkY4RWws= + </data> + <key>Headers/VKSdkVersion.h</key> + <data> + xVqUMQzVE5u4iZ3KLM4tsz8ig2M= + </data> + <key>Headers/VKShareDialogController.h</key> + <data> + WOjA8KhD+rwcBSseIzkvbCnp0qw= + </data> + <key>Headers/VKSharedTransitioningObject.h</key> + <data> + sNO1MuQYStWswp3RDAvJir+psBk= + </data> + <key>Headers/VKUniversity.h</key> + <data> + QzH69eL63Jm46e1KTMD/e0fZum8= + </data> + <key>Headers/VKUploadImage.h</key> + <data> + FrJbkL4sHKS/V/Dl5oWICJQ43RQ= + </data> + <key>Headers/VKUploadMessagesPhotoRequest.h</key> + <data> + y8bWqURogIAxPHEuq/QlPjlF7xA= + </data> + <key>Headers/VKUploadPhotoBase.h</key> + <data> + EyFfFFPFRNa/ez16x9r19m4J1MM= + </data> + <key>Headers/VKUploadPhotoRequest.h</key> + <data> + HIiBCmYo41htXIL0T3evsN+T6OQ= + </data> + <key>Headers/VKUploadWallPhotoRequest.h</key> + <data> + CpTPVpz4eRQquubC+O7ZDjDMGFs= + </data> + <key>Headers/VKUser.h</key> + <data> + uXj3KzUP1G9NddUpDaWllL1OjHk= + </data> + <key>Headers/VKUtil.h</key> + <data> + JC6VlP6d+S0j8ZhgYZ54nNn2uQg= + </data> + <key>Info.plist</key> + <data> + bjiOmC65JJJLY9aIB4xGm0hid+0= + </data> + <key>Modules/module.modulemap</key> + <data> + F+ypTGV+iQ/v2RkDihIdZwWU40k= + </data> + </dict> + <key>files2</key> + <dict> + <key>Headers/NSData+MD5.h</key> + <data> + W1DilsTKd4k2FzKXKXtwGs1AgPM= + </data> + <key>Headers/NSError+VKError.h</key> + <data> + MJ22+xIuLa7kbKNczNMR3lrsbsU= + </data> + <key>Headers/NSString+MD5.h</key> + <data> + QorWKcgrSuqvOjtTdQ5/G2wfvXE= + </data> + <key>Headers/OrderedDictionary.h</key> + <data> + jh+xYKCVSlQFR0afovM5uqNJrNE= + </data> + <key>Headers/VKAccessToken.h</key> + <data> + iFtSBFrcVnnTzHkJq+uqYcIkbbQ= + </data> + <key>Headers/VKActivity.h</key> + <data> + e5XcLz1rzbYWVzZBBvebgZUZqkg= + </data> + <key>Headers/VKApi.h</key> + <data> + 5B/0FaX3AqXZl7NwT5mt6NO4QVU= + </data> + <key>Headers/VKApiBase.h</key> + <data> + FxbjQbvbmJ1IE9yl7U+Ap+vPOCw= + </data> + <key>Headers/VKApiCaptcha.h</key> + <data> + 3hLG9po9J20utOdNeH1G96Nff6s= + </data> + <key>Headers/VKApiConst.h</key> + <data> + jG6MT5QBJFP7HOt+KPvlk9Dp8ug= + </data> + <key>Headers/VKApiDocs.h</key> + <data> + 4gvNgYXe7vgN6o/BFvJB8wOvlDg= + </data> + <key>Headers/VKApiFriends.h</key> + <data> + uLn3T32rbzuo4BTYFU/tkCJRAZk= + </data> + <key>Headers/VKApiGroups.h</key> + <data> + cnkkZXzoq2VxQNCpT8NbWF6z6N8= + </data> + <key>Headers/VKApiModels.h</key> + <data> + iTImeI/g4iQI2pqHCY1uBt7coYQ= + </data> + <key>Headers/VKApiObject.h</key> + <data> + A6HpWrinzULKbmbKCfhWoy0vdGo= + </data> + <key>Headers/VKApiObjectArray.h</key> + <data> + qG2eTx+J3k0UiaB+AEGP9ckzils= + </data> + <key>Headers/VKApiPhotos.h</key> + <data> + 8I+qil2bHRVRl6tWYomhHP7lr/I= + </data> + <key>Headers/VKApiUsers.h</key> + <data> + boWMg9o7WMQCug5dUFSENgrb4QU= + </data> + <key>Headers/VKApiWall.h</key> + <data> + hL73sMwFLvOlO4WgZktRzxPfO/I= + </data> + <key>Headers/VKAudio.h</key> + <data> + IyCpytA1EjZjYxakoVsJj9SkxDo= + </data> + <key>Headers/VKAuthorizationResult.h</key> + <data> + ZLfX6zFOyv7ctbjph8XJi0G+wvo= + </data> + <key>Headers/VKAuthorizeController.h</key> + <data> + 2yLVLNojJLZ6sZaY2S50VbtnPA8= + </data> + <key>Headers/VKBatchRequest.h</key> + <data> + RIfQ7o07lpMIjSaCENJmrsyOHNM= + </data> + <key>Headers/VKBundle.h</key> + <data> + 8YmPZjRqpQSnVsv+/HHvess9g1M= + </data> + <key>Headers/VKCaptchaView.h</key> + <data> + HUbDnyNrAyKYGYDFXtH0YJQd9Ys= + </data> + <key>Headers/VKCaptchaViewController.h</key> + <data> + 0Z689zPWZ3WU0A/ziV2D3d8tAUQ= + </data> + <key>Headers/VKCounters.h</key> + <data> + APegMoxHOKkbocRI+WQ214ENUUw= + </data> + <key>Headers/VKDocs.h</key> + <data> + ltiYDQjEWC8lP5I31ZgmXiJ75q8= + </data> + <key>Headers/VKError.h</key> + <data> + fv5qoaSGcF1btXQXb/fxJyT0w+8= + </data> + <key>Headers/VKGroup.h</key> + <data> + T/PkHDZ41vPcFkI8T3fEkvECgQM= + </data> + <key>Headers/VKHTTPClient.h</key> + <data> + egPrHuv8ucP0br1W140GAF1hO0c= + </data> + <key>Headers/VKHTTPOperation.h</key> + <data> + k2XEnjEWk+e88woXRKWXn4SmuYY= + </data> + <key>Headers/VKImageParameters.h</key> + <data> + t8LnuGljOhLY8yWherQjU+bWvd0= + </data> + <key>Headers/VKJSONOperation.h</key> + <data> + MdgKmdtebVhfP20auOcakSGGcZE= + </data> + <key>Headers/VKLikes.h</key> + <data> + BNoF+dDUc+Y7Z0MAYflD0yZXJw4= + </data> + <key>Headers/VKObject.h</key> + <data> + xVmmio+KW9MEqfMcIAuruO6Tr1U= + </data> + <key>Headers/VKOperation.h</key> + <data> + SqYcHTpG6HHBLgJ+ggFZeHKIXW4= + </data> + <key>Headers/VKPermissions.h</key> + <data> + 1khKsg4kndZKbG5E3uBu8GhpxvM= + </data> + <key>Headers/VKPhoto.h</key> + <data> + 037vcx4x6dMjKw79kAo0GUZamGE= + </data> + <key>Headers/VKPhotoSize.h</key> + <data> + pAI92rhitAM15nc3+uBziW87wAU= + </data> + <key>Headers/VKRelative.h</key> + <data> + CIIbXD0jr9aEMxeHcXETjELDrq0= + </data> + <key>Headers/VKRequest.h</key> + <data> + OTOLx4JPewLo3q3vKBt/NWsz8ik= + </data> + <key>Headers/VKRequestsScheduler.h</key> + <data> + AfTJzHAePp4M0YYlStPf0XvuywE= + </data> + <key>Headers/VKResponse.h</key> + <data> + NJ6sQPpOmutTof1iuE4gNQy/6As= + </data> + <key>Headers/VKSchool.h</key> + <data> + v+Z2zfiKHVROdCmwLUMr0QSOhJg= + </data> + <key>Headers/VKSdk.h</key> + <data> + aG7rCTXNT9QL8YIt/HNVkY4RWws= + </data> + <key>Headers/VKSdkVersion.h</key> + <data> + xVqUMQzVE5u4iZ3KLM4tsz8ig2M= + </data> + <key>Headers/VKShareDialogController.h</key> + <data> + WOjA8KhD+rwcBSseIzkvbCnp0qw= + </data> + <key>Headers/VKSharedTransitioningObject.h</key> + <data> + sNO1MuQYStWswp3RDAvJir+psBk= + </data> + <key>Headers/VKUniversity.h</key> + <data> + QzH69eL63Jm46e1KTMD/e0fZum8= + </data> + <key>Headers/VKUploadImage.h</key> + <data> + FrJbkL4sHKS/V/Dl5oWICJQ43RQ= + </data> + <key>Headers/VKUploadMessagesPhotoRequest.h</key> + <data> + y8bWqURogIAxPHEuq/QlPjlF7xA= + </data> + <key>Headers/VKUploadPhotoBase.h</key> + <data> + EyFfFFPFRNa/ez16x9r19m4J1MM= + </data> + <key>Headers/VKUploadPhotoRequest.h</key> + <data> + HIiBCmYo41htXIL0T3evsN+T6OQ= + </data> + <key>Headers/VKUploadWallPhotoRequest.h</key> + <data> + CpTPVpz4eRQquubC+O7ZDjDMGFs= + </data> + <key>Headers/VKUser.h</key> + <data> + uXj3KzUP1G9NddUpDaWllL1OjHk= + </data> + <key>Headers/VKUtil.h</key> + <data> + JC6VlP6d+S0j8ZhgYZ54nNn2uQg= + </data> + <key>Modules/module.modulemap</key> + <data> + F+ypTGV+iQ/v2RkDihIdZwWU40k= + </data> + </dict> + <key>rules</key> + <dict> + <key>^</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> diff --git a/frameworks/VKSdkFramework.framework/_CodeSignature/CodeSignature b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..bf76a04 --- /dev/null +++ b/frameworks/VKSdkFramework.framework/_CodeSignature/CodeSignature Binary files differ diff --git a/frameworks/WAVkImpl.framework/Headers/WAVkImpl.h b/frameworks/WAVkImpl.framework/Headers/WAVkImpl.h new file mode 100644 index 0000000..494bec3 --- /dev/null +++ b/frameworks/WAVkImpl.framework/Headers/WAVkImpl.h @@ -0,0 +1,19 @@ +// +// WAVkImpl.h +// WAVkImpl +// +// Created by wuyx on 16/7/4. +// Copyright © 2016年 GHW. All rights reserved. +// + +#import <UIKit/UIKit.h> + +//! Project version number for WAVkImpl. +FOUNDATION_EXPORT double WAVkImplVersionNumber; + +//! Project version string for WAVkImpl. +FOUNDATION_EXPORT const unsigned char WAVkImplVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import <WAVkImpl/PublicHeader.h> + +//time:2016/11/29 15:40 diff --git a/frameworks/WAVkImpl.framework/Info.plist b/frameworks/WAVkImpl.framework/Info.plist new file mode 100644 index 0000000..3bb5adc --- /dev/null +++ b/frameworks/WAVkImpl.framework/Info.plist Binary files differ diff --git a/frameworks/WAVkImpl.framework/Modules/module.modulemap b/frameworks/WAVkImpl.framework/Modules/module.modulemap new file mode 100644 index 0000000..6dd0adb --- /dev/null +++ b/frameworks/WAVkImpl.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module WAVkImpl { + umbrella header "WAVkImpl.h" + + export * + module * { export * } +} diff --git a/frameworks/WAVkImpl.framework/WAVkImpl b/frameworks/WAVkImpl.framework/WAVkImpl new file mode 100644 index 0000000..c1abd89 --- /dev/null +++ b/frameworks/WAVkImpl.framework/WAVkImpl Binary files differ diff --git a/frameworks/WAVkImpl.framework/_CodeSignature/CodeDirectory b/frameworks/WAVkImpl.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..797e1d5 --- /dev/null +++ b/frameworks/WAVkImpl.framework/_CodeSignature/CodeDirectory Binary files differ diff --git a/frameworks/WAVkImpl.framework/_CodeSignature/CodeRequirements b/frameworks/WAVkImpl.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..fe71f87 --- /dev/null +++ b/frameworks/WAVkImpl.framework/_CodeSignature/CodeRequirements Binary files differ diff --git a/frameworks/WAVkImpl.framework/_CodeSignature/CodeResources b/frameworks/WAVkImpl.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..4b0154c --- /dev/null +++ b/frameworks/WAVkImpl.framework/_CodeSignature/CodeResources @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>files</key> + <dict> + <key>Headers/WAVkImpl.h</key> + <data> + n4XVG/aG7ilVJzgs6Z4qN6HiIU4= + </data> + <key>Info.plist</key> + <data> + Eu8Q3YTSlPCF0lxqzhNpyCnDdmU= + </data> + <key>Modules/module.modulemap</key> + <data> + t1fdJtIAhgYZXS6KJTF0+6+gmXQ= + </data> + </dict> + <key>files2</key> + <dict> + <key>Headers/WAVkImpl.h</key> + <data> + n4XVG/aG7ilVJzgs6Z4qN6HiIU4= + </data> + <key>Modules/module.modulemap</key> + <data> + t1fdJtIAhgYZXS6KJTF0+6+gmXQ= + </data> + </dict> + <key>rules</key> + <dict> + <key>^</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^version.plist$</key> + <true/> + </dict> + <key>rules2</key> + <dict> + <key>.*\.dSYM($|/)</key> + <dict> + <key>weight</key> + <real>11</real> + </dict> + <key>^</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^(.*/)?\.DS_Store$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>2000</real> + </dict> + <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^.*</key> + <true/> + <key>^.*\.lproj/</key> + <dict> + <key>optional</key> + <true/> + <key>weight</key> + <real>1000</real> + </dict> + <key>^.*\.lproj/locversion.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>1100</real> + </dict> + <key>^Info\.plist$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^PkgInfo$</key> + <dict> + <key>omit</key> + <true/> + <key>weight</key> + <real>20</real> + </dict> + <key>^[^/]+$</key> + <dict> + <key>nested</key> + <true/> + <key>weight</key> + <real>10</real> + </dict> + <key>^embedded\.provisionprofile$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + <key>^version\.plist$</key> + <dict> + <key>weight</key> + <real>20</real> + </dict> + </dict> +</dict> +</plist> diff --git a/frameworks/WAVkImpl.framework/_CodeSignature/CodeSignature b/frameworks/WAVkImpl.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..f2dbdf4 --- /dev/null +++ b/frameworks/WAVkImpl.framework/_CodeSignature/CodeSignature Binary files differ -- Gitblit v1.8.0