ios9

HTTPS request in iOS 9 : NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

喜夏-厌秋 提交于 2019-12-17 15:58:09
问题 I'm updating my app to accommodate Apple's new ATS. Without any changes to the Plist-Info,the following code throws an error at sendSynchronousRequest() in a vanilla `iOS 9 simulator. NSURL *url =[NSURL URLWithString:@"https://Google.com"]; NSMutableURLRequest *request = [[NSMutableURLRequest alloc]init]; [request setHTTPMethod:@"GET"]; [request setURL:url]; NSURLResponse *urlResponse = nil; NSError *error = nil; NSData *reponse = [NSURLConnection sendSynchronousRequest:request

NSURLConnection deprecated in iOS9

杀马特。学长 韩版系。学妹 提交于 2019-12-17 15:44:28
问题 I want to download a file with a NSURLRequest and save it but in the line with the NSData * data = ... happens an error. NSURL *Urlstring = [NSURL URLWithString:@"http://yourdomain.com/yourfile.pdf"]; NSURLRequest *request = [NSURLRequest requestWithURL: Urlstring]; NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; NSURL *documentsURL = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];

How to delete app Build in New iTunes Connect Site?

陌路散爱 提交于 2019-12-17 15:24:23
问题 I want to upload my app's new version on iTunes connect, but I can't submit it as I mention here. Now I want to delete uploaded build and upload new build with save version, but I get an error as shown in the screenshot. Find Solution Here you can't delete old uploaded build.you have to upload new build with new build(+1) version. 回答1: You can't delete old uploaded build: you have to upload new build with a new build version (== Bundle version in plist ). For example, if your current build

Check if location services are enabled

有些话、适合烂在心里 提交于 2019-12-17 15:21:41
问题 I've been doing some research about CoreLocation. Recently, I encountered a problem that has been covered elsewhere, but in Objective C, and for iOS 8. I feel kinda silly asking this, but how can you check if location services are enabled using swift, on iOS 9? On iOS 7 (and maybe 8?) you could use locationServicesEnabled() , but that doesn't appear to be working when compiling for iOS 9. So how would I accomplish this? Thanks! 回答1: Add the CLLocationManagerDelegate to your class inheritance

Swift 2 / iOS 9 - libz.dylib not found

余生长醉 提交于 2019-12-17 15:16:34
问题 I'm using some external codes from google in my new Swift 2.0 project that required "libz.dylib" in earlier versions. After updating to the new XCode / the new SDK. XCode is now unable to import the libz.dylib and throws some errors Undefined symbols for architecture i386: "_deflate", referenced from: +[GAICompressionUtil gai_dataByCompressingBytes:length:compressionLevel:mode:] in libGoogleAnalyticsServices.a(GAICompressionUtil.o) "_deflateEnd", referenced from: +[GAICompressionUtil gai

Is there a way to test my Xcode 7.2-compiled app with iOS 9.3?

穿精又带淫゛_ 提交于 2019-12-17 13:50:49
问题 I have the iOS 9.3 beta installed on a testing device as I'm running a few 9.3-compiled apps, but I also have an old app that is compiled in Xcode 7.2. I can run the app on any iOS 9.2 device with ease, but if I try to run it on the one iOS 9.3 beta device, I get the "could not find Developer Disk Image" error. Xcode 7.3 includes some updates to Swift, so I'd have to change a great deal of my files, and I just want to test to see if it's working fine. Is there any way to do this without

Google Maps URL scheme not working on iOS 9

好久不见. 提交于 2019-12-17 09:56:53
问题 The following URL scheme was working on previous version but doesn't work anymore on iOS 9: comgooglemaps://?q=Google+Japan,+Minato,+Tokyo,+Japan&center=35.660888,139.73073&zoom=15&views=transit Did something change on iOS 9 that prevent apps from opening other apps using URL schemes? 回答1: In iOS 9, Apple has made a change to the handling of URL schemes. Now you need to add "LSApplicationQueriesSchemes" key in plist and then add URLScheme you want to call. <key>LSApplicationQueriesSchemes<

UITableView Empty with iOS 9 beta 5 update

妖精的绣舞 提交于 2019-12-17 09:56:43
问题 After updating to Xcode 7 and then the iOS 9 beta 5 on my iPhone, none of my UITableViews are displaying data, except one. They are all downloading information from my Parse database, and the one that works, is downloading everything perfectly for one section of the table, but not the other. The other 3 table views download the information, and calculate the correct number of rows, however nothing is being displayed. I tried just displaying static text for all cells, however it is not even

Is it possible to disable ATS in iOS 9 just for debug environment?

女生的网名这么多〃 提交于 2019-12-17 09:46:15
问题 I'm working on a development environment without HTTPS setup. Is it possible to automatically disable ATS just for the development (debug) mode? 回答1: My solution is to keep ATS disable option at the default NO value and add a New Run Script Phase to change it in the app bundle's Info.plist when building the app. This is the script: #Disables ATS in debug builds. INFOPLIST="${TARGET_BUILD_DIR}"/"${INFOPLIST_PATH}" case "${CONFIGURATION}" in "Release"|"Adhoc") /usr/libexec/PlistBuddy -c "Set

Facebook Login - iOS 9 - Without Safari

南笙酒味 提交于 2019-12-17 09:23:20
问题 It worked fine to login with logInWithReadPermissions in iOS 8, but as soon after the update to iOS 9 it keeps opening Safari or a modal UIWebView. Does anyone have the same issue? FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init]; [login setLoginBehavior:FBSDKLoginBehaviorNative]; [login logInWithReadPermissions:@[@"public_profile",@"email"] fromViewController:nil handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) { NSLog(@""); }]; 回答1: Seems there's no way to get the