Skip to content

Commit

Permalink
Fixed iOS9 deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasgoutaland committed Dec 28, 2016
1 parent a88eb71 commit 7a15b98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/GON_NSURL+Split.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ + (NSArray *)computeURLsFromBase:(NSString *)baseURLStr addingValues:(id <NSFast
for (NSString *value in values)
{
// Ensure that value will be a string
valueStr = [[value description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
valueStr = [[value description] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

if ((computedURLStr.length + valueStr.length + separatorLength) < maxLength)
{
Expand Down Expand Up @@ -70,7 +70,7 @@ + (NSArray *)enumerateURLsFromBase:(NSString *)baseURLStr addingValues:(id <NSFa
for (id value in values)
{
// Ensure that value will be a string
valueStr = [[value description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
valueStr = [[value description] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

if ((computedURLStr.length + valueStr.length + separatorLength) < maxLength)
{
Expand Down Expand Up @@ -108,4 +108,4 @@ + (NSArray *)enumerateURLsFromBase:(NSString *)baseURLStr addingValues:(id <NSFa
return res;
}

@end
@end

0 comments on commit 7a15b98

Please sign in to comment.