Skip to content

[Bug]: VKCaptchaSDK 0.1.2 requires Swift 6.0 due to $NonescapableTypes check, breaking compatibility with Swift 5.x projects #59

@DCEdit

Description

@DCEdit

Описание проблемы

VKCaptchaSDK version 0.1.2 (used by VKID 2.9.2) uses Swift conditional compilation with $NonescapableTypes feature flag, which requires Swift 6.0 compiler. This creates a breaking change for projects that cannot upgrade to Swift 6.0 yet.

Шаги для воспроизведения

Error Message:
// In VKIDCore/URLSessionTransport.swift
let result = VKCaptchaHandler()
.handleCaptchaData(
from: data,
responseHeaders: headers,
domain: domain
)
///////////////////////////////////////////////////////////////////////
Swift 6.0 Requirement (VKCaptchaSDK 0.1.2)
Code in VKCaptchaSDK.swiftinterface:

final public class VKCaptchaHandler {
public init()
#if compiler(>=5.3) && $NonescapableTypes
public static func getDomainToken(for domain: Swift.String) -> VKCaptchaSDK.VKCaptchaToken?
#endif
#if compiler(>=5.3) && $NonescapableTypes
final public func handleCaptchaData(
from response: Foundation.Data?,
responseHeaders: [Swift.AnyHashable : Any]?,
domain: Swift.String
) -> Swift.Result<VKCaptchaSDK.VKCaptchaData, VKCaptchaSDK.CaptchaHandlingError>
#endif
// ... other methods also behind $NonescapableTypes check
}

The $NonescapableTypes feature flag is only available in Swift 6.0+. When compiling VKIDCore (which calls handleCaptchaData) with Swift 5.9 or earlier, the conditional compilation fails and these methods are completely excluded from the public interface.

Версия VK ID SDK

2.9.0

Способ установки

CocoaPods

Версия Xcode

16.1

Версия iOS

17.0

Приложите логи, если необходимо

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions