ios9

sendAsynchronousRequest was deprecated in iOS 9, How to alter code to fix

空扰寡人 提交于 2019-11-27 04:14:54
问题 Below is my code I am getting the issue with: func parseFeedForRequest(request: NSURLRequest, callback: (feed: RSSFeed?, error: NSError?) -> Void) { NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in if ((error) != nil) { callback(feed: nil, error: error) } else { self.callbackClosure = callback let parser : NSXMLParser = NSXMLParser(data: data!) parser.delegate = self parser.shouldResolveExternalEntities = false parser

App does not have access to your photos or videos iOS 9

青春壹個敷衍的年華 提交于 2019-11-27 04:04:30
When I access my Photo Library with an UIImagePicker to choose a photo, the app shows me sometimes a black screen and sometimes a screen that says that I have to give permissions to my app to access the photos. But when I go to Settings -> Privacy -> Photos, there’s no app there and the app is nowhere to be seen in Settings. I read that I must add two values to my Info.plist but they didn’t worked either. Have anyone run with the same error? I’m working with xcode 7, swift 2.0 and iOS 9 This is where i prompt for user for Camera access @IBAction func cameraButtonPressed(sender: UIButton) { let

iPad Pro launch image and App icon

非 Y 不嫁゛ 提交于 2019-11-27 03:49:24
问题 iPad Pro requires 167x167 App icon and 2732 x 2048 (landscape) launch image. But where should I put them? Xcode 7.1 Asset Catalogs don't provide any place to add iPad Pro specific icons or images. My launch image is size specific, so using storyboard for this isn't a good option. 回答1: Apple commented on this issue: "Latest beta (7.2b3) added 83.5@2x app icon slot to asset catalogs, and Developer relations reported in a radar comment that they no longer support launch images and will not be

CNContactViewController forUnknownContact unusable, destroys interface

偶尔善良 提交于 2019-11-27 03:34:53
[Appears to be fixed in iOS 10!] So what follows applies to iOS 9 only... I have been experimenting with Apple's new Contacts framework, and I've found a huge bug in one of the three forms of CNContactViewController. It destroys the surrounding interface so that your app becomes useless; the user is stuck. To make this bug easy to see, I've posted an example project at https://github.com/mattneub/CNContactViewControllerBug . To experiment, run the project and do the following steps: Tap the button (Unknown Person). Grant access if requested. You are shown the partial contact, in our navigation

App Transport Security and IP addresses in iOS9

大憨熊 提交于 2019-11-27 03:19:27
I develop my iOS app using a local server running on my dev box. When testing on devices, I connect directly via an IP address, which is over HTTP and not HTTPS (so I don't have to deal with self-signed certs while in development, which the device wouldn't even like anyways). I thought that this would be sufficient: However, cannot get it to work without also adding NSAllowsArbitraryLoads = YES , AKA this: Now, I will have to remember to remove this when rolling a production build but not during development...arg. Should the NSExceptionDomains work with IP addresses, and if not, is there

WkWebView won't loadHTMLstring

别说谁变了你拦得住时间么 提交于 2019-11-27 02:53:38
问题 I'm trying to show in a WkWebView an html page that I previously downloaded and stored in a String. This is how I setup my WkWebView: webView = WKWebView(frame: self.blankView.frame) webView.navigationDelegate = self webView.loadHTMLString(tipShow.htmlString!, baseURL: nil) view.addSubview(webView) The html string i'm trying to show is: <html> <style type="text/css"> * { -webkit-touch-callout: none; -webkit-user-select: none; /* Disable selection/copy in UIWebView */ } </style> <head> <meta

Native Facebook app does not open with Facebook login in iOS 9

心不动则不痛 提交于 2019-11-27 02:43:52
I have updated iPhone 6 plus to iOS 9 beta and trying to perform Facebook login but each time its presenting UIWebView with Facebook login form. I have Facebook sdk FB_IOS_SDK_VERSION_STRING @"3.24.0" FB_IOS_SDK_TARGET_PLATFORM_VERSION @"v2.2" And I am using following methods to perform Facebook Login NSArray *permissions = @[@"email",@"user_birthday",@"public_profile"]; FBSessionStateHandler completionHandler = ^(FBSession *session, FBSessionState status, NSError *error) { [self sessionStateChanged:session state:status error:error]; }; if ([FBSession activeSession].state ==

Timer.scheduledTimer swift 3 pre iOS 10 compatibility

点点圈 提交于 2019-11-27 02:37:57
问题 I need to schedule a Timer for firing a function every second but I see that in xcode 8 beta 3 the scheduledTimer is only available for iOS 10. Is there any alternative for using the timer in iOS 9 or previous versions? Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { (timer) in print("Hi!")}) 回答1: Solved using Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(self.updateTime), userInfo: nil, repeats: true) 回答2: Run a timer with swift3, var timer: Timer?

“This app is not allowed to query for scheme cydia” IOS9 error

戏子无情 提交于 2019-11-27 02:07:36
问题 I have an app where I hit a HTTP Request <NSURLConnection: 0x12d755110> { request: <NSMutableURLRequest: 0x12d754e10> { URL: http://XX.XX.XX.XXX/webService/dataService.svc/SearchLocation } } Now, whenever the above request is made I get the following error and no data is received in the response. After 60 Sec I get " Time Out error ". It is working fine on IOS8 and below but not working gin IOS9. Could anybody let me know what else have I got to do with this issue. Also, I have done the

iOS9 App has black bars on top and bottom

℡╲_俬逩灬. 提交于 2019-11-27 01:49:24
问题 My app doesn't use auto layout, it was originally designed for an iPhone 4/4s and the UI has been mostly untouched since then. The layout is fairly minimal, so it hasnt been deemed a priority to switch it autolayout. Previously building for iOS8 my app would scale properly on iPhone 5, and newer, filling the screen. The View itself would fill the entire screen, while the icons would scale proportionally (such that they were not distorted). however it seems now that using the iOS9 beta the app