Replace use of deprecated API (#679)

Authored by lpromero on Dec 18 2017, 9:07 AM.

Description

Replace use of deprecated API (#679)

This commit clears this warning:

src/core/src/NIFoundationMethods.m:227:34: warning: 'stringByReplacingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding. [-Wdeprecated-declarations]

NSString* key = [kvPair[0] stringByReplacingPercentEscapesUsingEncoding:encoding];
                           ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:593:1: note: 'stringByReplacingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here

  • (nullable NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));

^
src/core/src/NIFoundationMethods.m:239:38: warning: 'stringByReplacingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding. [-Wdeprecated-declarations]

NSString* value = [kvPair[1] stringByReplacingPercentEscapesUsingEncoding:encoding];
                             ^

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURL.h:593:1: note: 'stringByReplacingPercentEscapesUsingEncoding:' has been explicitly marked deprecated here

  • (nullable NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)enc API_DEPRECATED("Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.", macos(10.0,10.11), ios(2.0,9.0), watchos(2.0,2.0), tvos(9.0,9.0));

^

Details

Committed
featherlessDec 18 2017, 9:07 AM
Parents
rNIMBUS2a5248ccdf77: Update .travis.yml (#680)
Branches
Unknown
Tags
Unknown
References
HEAD, master