breautek commented on PR #633: URL: https://github.com/apache/cordova-plugin-file/pull/633#issuecomment-2267703293
[stringByRemovingPercentEncoding](https://developer.apple.com/documentation/foundation/nsstring/1409569-stringbyremovingpercentencoding) and [stringByAddingPercentEncodingWithAllowedCharacters](https://developer.apple.com/documentation/foundation/nsstring/1411946-stringbyaddingpercentencodingwit) are both iOS 7+ so compatibility wise it should be fine. The newer APIs gives a warning... `stringByRemovingPercentEncoding`: > You must call this method only on strings that you know to be percent-encoded. Calling this method on strings that are not percent-encoded can lead to misinterpreting a percent character as the beginning of a percent-encoded sequence. `stringByAddingPercentEncodingWithAllowedCharacters`: > You must not call this method on strings that are already percent-encoded. Calling this method on strings that are already percent-encoded will cause percent characters in a percent-encoded sequence to be percent-encoded twice. I'm not sure how the older deprecated APIs behave but the `encodePath` API path has comments suggesting it doesn't know if the given url is already encoded or not (by blindly decoding it and re-encoding it). Depending how the deprecated API behaves, switching out the APIs might not be sufficient. `stringByAddingPercentEncodingWithAllowedCharacters` has a similar warning that encoding an already encoded url will result in double encoding. Also `stringByAddingPercentEncodingWithAllowedCharacters` is being used wrong, as it doesn't accept character encoding, but a `NSCharacterSet` instead defining allowed characters. So that's failing the build. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org