Hello,
below is our code block used in our app to connect to web service. Our app worked fine in iOS9. But users upgraded to iOS10, the app failed to connect to the web service.
data on line 8 returns nil.
error returns "domain:@"NSCocoaErrorDomain" -code:256"
the url we use in this format: "https://***.***.com/xxiOSService/partFinder.svc/GetLogin/ID=2451789487"
any idea why it only fails in iOS10?
thank you!
1) NSSTRING *_login = badgeTxt.text;
2) NSSTRING *lab = [NSString stringWithFormat:@"%@", _login];
3) NSSTRING *filepath = [WcfServiceURL1 absoluteString];
4) NSSTRING *test = [URL stringByAppendingString:filePath];
5) NSSTRING *GetURL1 = [test stringByAppendingString:lab];
6) NSURL *url = [NSURL URLWithString:GetURL1];
7) NSError *error = nil;
8) NSData *data = [NSData dataWithContentsOfURL: url options:NSDataReadingUncached error:&
9) error];
10) if (!error)
11) {
12) NSDictionary* json = [NSJSONSerialization
13) JSONObjectWithData:data
14) options:NSJSONReadingMutableContainers
15) error:&error];