From 0091b00913ecbca0c25f0702f6bc16f3cb04023c Mon Sep 17 00:00:00 2001 From: Valery Crane <71835639+ValeryCrane@users.noreply.github.com> Date: Mon, 14 Nov 2022 12:28:59 +0500 Subject: [PATCH] Added VKAuthorizationOptionsDisableProviders option to VKAuthorizationOptions and deprecated VKAuthorizationOptionsEnableProviders (#602) * Added VKAuthorizationOptionsDisableProviders option to VKAuthorizationOptions and deprecated VKAuthorizationOptionsEnableProviders * Changed documentation wording for VKAuthorizationOptionsEnableProviders --- VK-ios-sdk.podspec | 2 +- library/Source/VKSdk.h | 7 +++++-- library/Source/VKSdk.m | 2 +- library/Source/VKSdkVersion.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/VK-ios-sdk.podspec b/VK-ios-sdk.podspec index 1c88cdd..de34b6a 100755 --- a/VK-ios-sdk.podspec +++ b/VK-ios-sdk.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "VK-ios-sdk" - s.version = "1.6.3" + s.version = "1.6.4" s.summary = "Library for working with VK." s.homepage = "https://github.com/VKCOM/vk-ios-sdk" s.license = 'MIT' diff --git a/library/Source/VKSdk.h b/library/Source/VKSdk.h index 5cc23b5..2cb488d 100755 --- a/library/Source/VKSdk.h +++ b/library/Source/VKSdk.h @@ -48,8 +48,11 @@ typedef NS_OPTIONS(NSUInteger, VKAuthorizationOptions) { VKAuthorizationOptionsUnlimitedToken = 1 << 0, ///Pass this option to disable usage of SFSafariViewController VKAuthorizationOptionsDisableSafariController = 1 << 1, - ///Pass this option to enable usage of authorization providers - VKAuthorizationOptionsEnableProviders = 1 << 2, + ///VKAuthorizationOptionsEnableProviders is deprecated. Now the transition to the authorization provider is performed automatically. + ///To disable the transition, use the VKAuthorizationOptionsDisableProviders option. + VKAuthorizationOptionsEnableProviders DEPRECATED_MSG_ATTRIBUTE("Now the transition to the authorization provider is performed automatically. To disable the transition, use the VKAuthorizationOptionsDisableProviders option.") = 1 << 2, + ///Pass this option to disable usage of authorization providers + VKAuthorizationOptionsDisableProviders = 1 << 3 }; /** diff --git a/library/Source/VKSdk.m b/library/Source/VKSdk.m index cc92662..39d9845 100644 --- a/library/Source/VKSdk.m +++ b/library/Source/VKSdk.m @@ -156,7 +156,7 @@ static NSString *VK_ACCESS_TOKEN_DEFAULTS_KEY = @"VK_ACCESS_TOKEN_DEFAULTS_KEY_D instance.permissions = [permissionsSet copy]; permissions = [permissionsSet allObjects]; - BOOL providersEnabled = options & VKAuthorizationOptionsEnableProviders; + BOOL providersEnabled = !(options & VKAuthorizationOptionsDisableProviders); BOOL vkApp = [self vkAppMayExists] && instance.authState == VKAuthorizationInitialized && providersEnabled; diff --git a/library/Source/VKSdkVersion.h b/library/Source/VKSdkVersion.h index f186dbe..d241bf2 100755 --- a/library/Source/VKSdkVersion.h +++ b/library/Source/VKSdkVersion.h @@ -20,5 +20,5 @@ // 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.6.3" +#define VK_SDK_VERSION @"1.6.4" #define VK_SDK_API_VERSION @"5.122"