Skip to content

Commit 5a3dd5c

Browse files
committed
Use stringByAddingPercentEncodingWithAllowedCharacters
1 parent dd3a7ee commit 5a3dd5c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

LMGeocoder/LMGeocoder.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ - (void)cancelGeocode
211211

212212
- (void)buildConnectionFromURLString:(NSString *)urlString
213213
{
214-
NSURL *requestURL = [NSURL URLWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
214+
NSURL *requestURL = [NSURL URLWithString:[urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]];
215215

216216
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:requestURL];
217217
[request setTimeoutInterval:kTimeoutInterval];

LMGeocoderDemo/LMGeocoder.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@
318318
PRODUCT_BUNDLE_IDENTIFIER = com.lminhtm.LMGeocoder;
319319
PRODUCT_NAME = "$(TARGET_NAME)";
320320
PROVISIONING_PROFILE = "";
321-
TARGETED_DEVICE_FAMILY = "1,2";
321+
TARGETED_DEVICE_FAMILY = 1;
322322
WRAPPER_EXTENSION = app;
323323
};
324324
name = Debug;
@@ -336,7 +336,7 @@
336336
PRODUCT_BUNDLE_IDENTIFIER = com.lminhtm.LMGeocoder;
337337
PRODUCT_NAME = "$(TARGET_NAME)";
338338
PROVISIONING_PROFILE = "";
339-
TARGETED_DEVICE_FAMILY = "1,2";
339+
TARGETED_DEVICE_FAMILY = 1;
340340
WRAPPER_EXTENSION = app;
341341
};
342342
name = Release;

0 commit comments

Comments
 (0)