You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the String extension requires watchOS 6 to build. For iPhone devices that cannot upgrade to iOS 13, this means that watchOS remains stuck at v5. This requires a complicated setup where a watchOS app has to manually defer to the iPhone via WKSession in order to use Swifter which leads to a more bloated codebase than would otherwise be required for a watchOS app MVP
Offending API usage (restricted to watchOS 6+):
varqueryStringParameters:Dictionary<String,String>{varparameters=Dictionary<String,String>()letscanner=Scanner(string:self)varkey:String?varvalue:String?while !scanner.isAtEnd {
key = scanner.scanUpToString("=") //this method is restricted to watchOS 6+
_ = scanner.scanString(string:"=")
value = scanner.scanUpToString("&")
_ = scanner.scanString(string:"&")iflet key = key,let value = value {
parameters.updateValue(value, forKey: key)}}return parameters
}
As currently written, the scanUpToString extension in Scanner++.swift does not support watchOS. As a result, dynamic linking tries to use the version from Foundation which requires watchOS 6. For devices that cannot upgrade to watchOS 6, this requires invoking WKSession to manually communicate between iOS & watchOS, which is not ideal
The text was updated successfully, but these errors were encountered:
flaw600
added a commit
to flaw600/Swifter
that referenced
this issue
Aug 16, 2020
- Resolves an issue where when calling directly from watchOS 6, Dynamic Runtime may choose to opt to not use the extension version from String / Scanner (NSString and NSScanner as well) and provide an unexpected response
- Backports Swift 5 Foundation support to watchOS 5 for String++ and Scanner++
- Updated Swifter.podspec and Package.swift to support watchOS 5
Currently, the String extension requires watchOS 6 to build. For iPhone devices that cannot upgrade to iOS 13, this means that watchOS remains stuck at v5. This requires a complicated setup where a watchOS app has to manually defer to the iPhone via WKSession in order to use Swifter which leads to a more bloated codebase than would otherwise be required for a watchOS app MVP
Offending API usage (restricted to watchOS 6+):
As currently written, the scanUpToString extension in Scanner++.swift does not support watchOS. As a result, dynamic linking tries to use the version from Foundation which requires watchOS 6. For devices that cannot upgrade to watchOS 6, this requires invoking WKSession to manually communicate between iOS & watchOS, which is not ideal
The text was updated successfully, but these errors were encountered: