1
1
mirror of https://github.com/VKCOM/vk-ios-sdk.git synced 2024-08-15 09:40:40 +03:00

Added VKAuthorizationOptionsDisableProviders option to VKAuthorizationOptions and deprecated VKAuthorizationOptionsEnableProviders (#602)

* Added VKAuthorizationOptionsDisableProviders option to VKAuthorizationOptions and deprecated VKAuthorizationOptionsEnableProviders

* Changed documentation wording for VKAuthorizationOptionsEnableProviders
This commit is contained in:
Valery Crane 2022-11-14 12:28:59 +05:00 committed by GitHub
parent a21b432c48
commit 0091b00913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

View File

@ -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'

View File

@ -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
};
/**

View File

@ -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;

View File

@ -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"