ios9

preferredLanguages iOS 9

不羁岁月 提交于 2019-11-27 07:15:15
问题 in order to localize my App, I use the following code: NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0]; if ([language isEqualToString:@"fr"]) { }else{ } But since iOS 9, I'have to replace "fr" by "fr-FR". The problem is that only works for France. How can I support all the other regions (Canada, Belgium,..) ? and the "general setting" for french ? Thanks 回答1: If language is returning other values such a "fr-FR" and "fr-CA", then you should split language on the -

Can an 'Unwind Segue' work between two storyboards connected by a storyboard reference?

我怕爱的太早我们不能终老 提交于 2019-11-27 05:45:00
问题 In iOS 9, storyboards can be connected by a 'storyboard reference' that links to a second storyboard by adding a storyboard reference and setting the 'referenced ID' to the name of another storyboard file. Is it possible to set up an unwind segue in the second file that unwinds to a scene in the first file? If so, what steps are involved, either in Interface Builder or in code? 回答1: Starting from your storyboard reference, create a new storyboard reference that will be a reference back to

How big can the payload be when sending data via WatchConnectivity?

依然范特西╮ 提交于 2019-11-27 05:40:55
问题 When sending data using the WatchConnectivity framework, either from the phone to the watch or vice-versa, how big can the payload be before the framework gives me the WCErrorCodePayloadTooLarge error? I couldn't find the answer on Apple's documentation, and there doesn't seem to be much information on this on the internet at this time (in fact, googling WCErrorCodePayloadTooLarge gives me just 4 results). Has anyone tested to try to find the answer to this? If this question doesn't get an

How to get a CNContact phone number(s) as string in Swift?

百般思念 提交于 2019-11-27 05:32:49
问题 I am attempting to retrieve the names and phone number(s) of all contacts and put them into arrays with Swift in iOS. I have made it this far: func findContacts() -> [CNContact] { marrContactsNumber.removeAllObjects() marrContactsName.removeAllObjects() let store = CNContactStore() let keysToFetch = [CNContactGivenNameKey, CNContactFamilyNameKey, CNContactPhoneNumbersKey] let fetchRequest = CNContactFetchRequest(keysToFetch: keysToFetch) var contacts = [CNContact]() do { try store

iOS 9 - “attempt to delete and reload the same index path”

半世苍凉 提交于 2019-11-27 05:16:18
问题 This is an error: CoreData: error: Serious application error. An exception was caught from the delegate of NSFetchedResultsController during a call to -controllerDidChangeContent:. attempt to delete and reload the same index path ( {length = 2, path = 0 - 0}) with userInfo (null) This is my typical NSFetchedResultsControllerDelegate : func controllerWillChangeContent(controller: NSFetchedResultsController) { tableView.beginUpdates() } func controller(controller: NSFetchedResultsController,

Does App Store reject submission if NSAllowsArbitraryLoads set to YES?

社会主义新天地 提交于 2019-11-27 05:14:57
The new ATS involved by iOS 9 cause lots of http related functionalities stop working. I have to add all the http request url into a whitelist or I could simply disable the ATS by setting NSAllowsArbitraryLoads to YES . Does anybody know if App Store will reject the submission if the NSAllowsArbitraryLoads has been set to YES ? UPDATE: Apple will reject Apps not conforming to ATS after the end of Dec 2016. Source However, If you need to load a http:// resource only in web (UIWebView/WKWebView/SafariViewController) then the following should suffice. NOTE: This key is available only from iOS 10.

Change status bar text color to light in iOS 9 with Objective C [duplicate]

瘦欲@ 提交于 2019-11-27 04:58:22
问题 This question already has an answer here: How to change Status Bar text color in iOS 52 answers In iOS 9, how do I change the color of the status bar text to white? 回答1: If you want to change Status Bar Style from the launch screen, You should take this way. Go to Project -> Target , Set Status Bar Style to Light Set View controller-based status bar appearance to NO in Info.plist . 回答2: Using a UINavigationController and setting its navigation bar's barStyle to .Black . past this line in your

error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader: '703.0.31_0')

天涯浪子 提交于 2019-11-27 04:36:06
When I try to Archive my application on Xcode 7.3.1, I am getting following error: error: Invalid bitcode version (Producer: '800.0.35.0_0' Reader: '703.0.31_0') clang: error: linker command failed with exit code 1 (use -v to see invocation) I was able to successfully Archive my app yesterday, can any one please help me? i had this error before ... you may try the following solution it worked for me search for bitcode keyword in app --> Build Settings and change it to NO then archive again --> it should work fine now Install Xcode 8: https://developer.apple.com/download/ Xcode 8 GM seed may be

Cordova - window.history.back() not working on HTML back button in iOS 9

对着背影说爱祢 提交于 2019-11-27 04:31:47
问题 In my application I am using window.history.back to navigate back to previous View Declaration of back button <div class="back_icon" id="verification_back_icon"><a href="#" data-rel="back" data-transition="slidedown"><img src="images/back_btn.png" width="23"/></a></div> Button action: $( "#verification_back_icon" ).on( "click", function ( e ) { if ( checkDirtyVacation() ) { e.preventDefault(); if ( backbtnAlt == false ) { backbtnAlt = true; confirm( "All data will be lost. Do you want to

IOS 9 Error Domain=kCLErrorDomain Code=0 “(null)”

你。 提交于 2019-11-27 04:22:00
Code below should get current location. But above error is generated. Function didUpdateLocations never gets called. Running this on a device (iPhone 5s)iOS 9.1. Info.plist has Required device capabilities and Privacy - Location usage description configured as shown in the attached image. Please help! let locationManager = CLLocationManager() override func viewDidLoad() { super.viewDidLoad() locationManager.delegate = self locationManager.requestAlwaysAuthorization() locationManager.requestLocation() } func locationManager(manager: CLLocationManager, didFailWithError error: NSError) print