ios10

SecItemAdd always returns error -34018 in Xcode 8 in iOS 10 simulator

拜拜、爱过 提交于 2019-11-26 18:21:59
Update : This issue has been fixed in Xcode 8.2. Keychain works in the simulator without enabling keychain sharing. Why am I always receiving error -34018 when calling SecItemAdd function in Xcode 8 / iOS 10 simulator ? Steps to Reproduce Create a new Single page iOS app project in Xcode 8. Run the following code in viewDidLoad (or open this Xcode project). let itemKey = "My key" let itemValue = "My secretive bee 🐝" // Remove from Keychain // ---------------- let queryDelete: [String: AnyObject] = [ kSecClass as String: kSecClassGenericPassword, kSecAttrAccount as String: itemKey as AnyObject

Swift 2 to 3 Migration for prepareForSegue [duplicate]

北城余情 提交于 2019-11-26 17:20:38
问题 This question already has an answer here : prepare(for segue: UIStoryboardSegue, sender: AnyObject?) missing in swift 3.0/Xcode 8 b6 (1 answer) Closed 3 years ago . This question might have been answered already but I could not find it. override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { } This code worked fine in swift 2 but now gives me an error to remove the override. Exact Error: "Method does not override any method from its superclass" What is the new correct

Layout issues after updating to Xcode 8

ε祈祈猫儿з 提交于 2019-11-26 17:00:56
Here is a before and after of one of my screens after I upgraded to Xcode 8. All I did was open up my main.storyboard and from there, I built and ran my app on my phone. In my version control, I can see Xcode is doing a lot of changes to my main.storyboard just from me opening it. Whenever I delete those changes, I can see what I use to see in Xcode 7.3.1. But, as soon as I re-open interface builder with my storyboard, I see those changes come back into place. Is there something I can do here? Before Xcode 8 After update to Xcode 8 I had a similar problem with tableview images not appearing

iOS 10, NSUserDefaults Does Not Work

一个人想着一个人 提交于 2019-11-26 16:49:58
问题 I try to write/read values to/from [NSUserDefaults standardUserDefaults] , but it seems not to work. My code is: [[NSUserDefaults standardUserDefaults] setObject:@"sampleString" forKey:@"sampleKey"]; [[NSUserDefaults standardUserDefaults] synchronize]; NSString *defaultsValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"sampleKey"]; return defaultsValue; This code returns nil , for Xcode 8.0 beta and iPhone 6s (10.0) simulator. However it returns sampleString for Xcode 8.0 beta and

NavigationBar delay updating barTintColor iOS10

微笑、不失礼 提交于 2019-11-26 16:43:15
Context: Let's say we have one NavigationController and 2 viewControllers. ViewControllerA has a blue navigationBar, while ViewControllerB has a green one. I set them up like so : override func viewWillAppear(_ animated: Bool) { self.navigationController?.navigationBar.barTintColor = UIColor.blue // Green if ViewController B } It works well when I got from A to B, but when I return, the navigationBar teint is updated after. Like if it was set up in the viewDidAppear . Expected: The navigation bar should have its navigation bar color updated without delay. Solutions tried: I've seen this SO

iOS 10 GM with xcode 8 GM causes views to disappear due to roundedCorners & clipsToBounds

一笑奈何 提交于 2019-11-26 16:12:05
问题 I tested my app with iOS 10 Beta 7 and Xcode 8 beta and everything worked fine. However just a few minutes ago I installed the now available GM releases of both and faced a weird issue. I am using custom table view cells in my app and in my custom cell's I am using cornerRadius and clipsToBounds to create rounded views. - (void)awakeFromNib { [super awakeFromNib]; self.tag2label.layer.cornerRadius=self.tag2label.frame.size.height/2; self.tag2label.clipsToBounds=YES; } This looked okay before

Save dictionary in userdefaults in swift 3 with xcode 8

纵然是瞬间 提交于 2019-11-26 15:57:24
问题 I am using the following code to save an object to UserDefaults (previously NSUserDefaults) using xcode 8: let defaults = UserDefaults.standard() defaults.set(someObject, forKey: "someObject") print(defaults.object(forKey: "someObject")) someObject is a dictionary and I am running on the simulator. For some reason this is not saving the value and 'nil' is printed. Wondering if it's a simulator problem. 回答1: For Swift 3 UserDefaults.standard.setValue(token, forKey: "user_auth_token") print("\

Error: Protocol not available, dumping backtrace [duplicate]

ぐ巨炮叔叔 提交于 2019-11-26 15:17:48
问题 This question already has an answer here: Hide strange unwanted Xcode logs 12 answers 2016-09-17 15:16:04.386085 appDemo[2371:94976] [] __nwlog_err_simulate_crash simulate crash already simulated **"nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"** 2016-09-17 15:16:04.386676 appDemo[2371:94976] [] nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace: [x86_64] libnetcore-856.1.8 0 libsystem

iOS 10 bug: UICollectionView received layout attributes for a cell with an index path that does not exist

白昼怎懂夜的黑 提交于 2019-11-26 15:15:40
问题 Running my app in a device with iOS 10 I get this error: UICollectionView received layout attributes for a cell with an index path that does not exist In iOS 8 and 9 works fine. I have been researching and I have found that is something related to invalidate the collection view layout. I tried to implement that solution with no success, so I would like to ask for direct help. This is my hierarchy view: ->Table view ->Each cell of table is a custom collection view [GitHub Repo][1] ->Each item

CLLocationManager delegate methods are not getting called(google maps is integrated)

和自甴很熟 提交于 2019-11-26 14:59:00
问题 The delegate Methods of CLLocationManager didChangeAuthorizationStatus and didUpdateToLocation are not getting called. Location Always Usage Description key is already added in info.plist and I am getting notification also when i launch app for the first time. I am able to see the google map, but i am not able to see current location, When i change location, its not getting updated. Basicaaly delegate methods are not getting called. //code import UIKit import GoogleMaps class ViewController: