ios9

Deprecated: 'sendAsynchronousRequest:queue:completionHandler:' in iOS9

寵の児 提交于 2019-12-22 04:02:08
问题 I have my own class to make http calls but now in iOS9 this method is deprecated: [NSURLConnetion sendAsynchronousRequest:queue:completionHandler:] I'm trying to test the new one [NSURLSession dataTaskWithRequest:completionHandler:] but Xcode give an error because it doesn't found this method. Xcode compiler warning with deprecated line: 'sendAsynchronousRequest:queue:completionHandler:' is deprecated: first deprecated in iOS 9.0 - Use [NSURLSession dataTaskWithRequest:completionHandler:]

Using the device simulator for iOS 8 with Xcode 7

旧街凉风 提交于 2019-12-22 03:50:43
问题 I thinking about port my App to Swift 2 and Xcode 7. But the device simulator only targets iOS 9 and I see no way to download iOS 8. I have parallel Xcode 6.3 installed. Is there any way to test and debug my app under iOS 8 with the device simulator? 回答1: Xcode release note says below thing, Simulator Xcode 7.0 beta does not support iOS 8.4 and earlier simulator runtimes. (20699475) Refer this link for more info. 回答2: You can download older versions of iOS via Xcode. Open Xcode -> Preferences

Crash when launching from push notification with iOS 9

只谈情不闲聊 提交于 2019-12-21 22:28:35
问题 If I launch my app from a push notification the app crash while showing splash screen. How can I solve this issue? The crash comes only with iOS9, while everything works with iOS8. Thanks for the help! This is my crash log: Last Exception Backtrace: 0 CoreFoundation 0x185900f5c __exceptionPreprocess + 124 1 libobjc.A.dylib 0x19a4f3f80 objc_exception_throw + 56 2 CoreFoundation 0x185900e2c +[NSException raise:format:arguments:] + 108 3 Foundation 0x1867eff3c -[NSAssertionHandler

Change color pin iOS 9 Mapkit

可紊 提交于 2019-12-21 21:53:51
问题 I don't know how to change the code for the pin color in iOS 9 (because lately Apple changed the code for it), and I'm still new in Swift. So, I don't know how to integrate pinTintColor in my code now. Please find below my code: import UIKit import MapKit class ViewController: UIViewController, MKMapViewDelegate { @IBOutlet var map: MKMapView! override func viewDidLoad() { super.viewDidLoad() let annotation = MKPointAnnotation() let latitude:CLLocationDegrees = 40.5 let longitude

iOS 9 CollectionView slowing down

守給你的承諾、 提交于 2019-12-21 20:37:13
问题 I have been developing my app for iOS8, and haven't really had any issues regarding the scrolling speed. The moment I have upgraded to iOS9 the collectionView became very jumpy and staggering. I cant point out to any specific reason why. In my collection view, I have items with images that uses 3rd party library (SDWebImage) and I also use a custom layout library to achieve double column layout. Is there any obvious reason why this could be happening? 回答1: We were experiencing the same issues

How to force a new CNContact into a Local CNContainer?

六眼飞鱼酱① 提交于 2019-12-21 20:35:36
问题 I'm writing an app that stores contact-info fetched through REST and JSON into a container, using CNContactStore. I would like to keep these contacts separate from any other accounts, and only stored locally on the device, but a local store doesn't exist, and I can't find any way to create/activate one? I'm able to get the default store's ID (as configured on the device, e.g. iCloud), using: let store = CNContactStore() let containerID = store.defaultContainerIdentifier() ...and I can

Why sending file to watchOS2 simulator from iPhone simulator won't work?

混江龙づ霸主 提交于 2019-12-21 19:47:26
问题 I am trying to copy database from iOS 9 iPhone to watchOS 2 Apple Watch (Both simulators) and, nothing. File/files is/are no where to found. (searched everywhere) I want to transfer database when entering in the application from iPhone to Apple Watch even if only application on iPhone is on(app on watchOS2 is off). What am i doing wrong? +(BOOL)initDatabase{ BOOL ok = NO; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *err; NSArray *paths =

Is there an alternative to (the deprecated) canOpenURL in iOS 9?

你离开我真会死。 提交于 2019-12-21 17:13:10
问题 I am using apple's canOpenURL: and openURL: methods to detect & open other application. But as these methods are deprecated in iOS9, They returns NO. Is there any alternate to manage this? Thanks 回答1: You need to provide "whitelist" to your plist <key>LSApplicationQueriesSchemes</key> <array> <string>urlscheme</string> <string>urlscheme2</string> <string>urlscheme3</string> <string>urlscheme4</string> </array> See for more details iOS 9 has made a small change to the handling of URL scheme.

Custom transition for push animation with NavigationController on iOS 9

我的梦境 提交于 2019-12-21 09:36:59
问题 I have a custom push transition between view controllers embedded in a UINavigationController which is working fine when built with iOS 7/8 but presents a wrong layout when built against iOS 9 SDK. - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext { UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; UIViewController *toViewController = [transitionContext viewControllerForKey

“unsafeMutableAddressor : Swift.String”, referenced from:.."

耗尽温柔 提交于 2019-12-21 07:05:11
问题 I got an error: Undefined symbols for architecture x86_64: "DirectBistro.DBTabBarOrderedIndexesKey.unsafeMutableAddressor : Swift.String", referenced from: DirectBistroUITests.TabBarControllerTests.setUp (DirectBistroUITests.TabBarControllerTests)() -> () in TabBarControllerTests.o ld: symbol(s) not found for architecture x86_64 This is my simple UITest class: import XCTest @testable import DirectBistro class TabBarControllerTests: XCTestCase { override func setUp() { super.setUp() let