yahoo / TDOAuth

A BSD-licensed single-header-single-source OAuth1 implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'CFURLCreateStringByAddingPercentEscapes' is deprecated in iOS 9.0

sneakybVer opened this issue · comments

'CFURLCreateStringByAddingPercentEscapes' is deprecated: first deprecated in iOS 9.0 - Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid).

I fixed that
#define TDPCEN(s)
([[s description] stringByAddingPercentEncodingWithAllowedCharacters:[[NSCharacterSet characterSetWithCharactersInString:@"!*'();:@&=+$,/?%#[] "] invertedSet]]) @sneakybVer

Merged.