Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFURLCreateStringByReplacingPercentEscapesUsingEncoding() deprecated in iOS 9.0 #359

Closed
funnel20 opened this issue Sep 8, 2016 · 1 comment

Comments

@funnel20
Copy link
Contributor

funnel20 commented Sep 8, 2016

In IASKAppSettingsWebViewController.h, CFURLCreateStringByReplacingPercentEscapesUsingEncoding() is used, which is deprecated in iOS 9.0.
Xcode suggest to use CFURLCreateStringByReplacingPercentEscapes() "which always uses the recommended UTF-8 encoding."

The code will then be (last input argument 'kCFStringEncodingUTF8' is removed):

value =  CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(kCFAllocatorDefault,
                                                                                      (CFStringRef)value,
                                                                                      CFSTR("")));

CFURLCreateStringByReplacingPercentEscapes() is supported since iOS 2.0, so it can be used safely.

@PGSeattle
Copy link

+1 for funnel20's suggestion.
value = CFBridgingRelease(CFURLCreateStringByReplacingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)value,
CFSTR("")));

futuretap added a commit that referenced this issue Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants