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

I was able to work around this in my app by adding Keychain Access Groups to the Entitlements file. I turned on the Keychain Sharing switch in the Capabilities section in your test app, and it is working for me as well. Item to add to entitlements: <key>keychain-access-groups</key> <array> <string>$(AppIdentifierPrefix)com.evgenii.KeychainBugDemo</string> </array> I have only tried … Read more

What is ‘Vary for Traits’ in Xcode 8?

This is just an extension as to how to use “Vary Traits” quickly in your project for adding different layouts for iPad and iPhones. Please read this for understanding more on the Size classes. https://developer.apple.com/reference/uikit/uitraitcollection If you are skipping the example which follows below, do read the Summary in the end. OBJECTIVE : You need … Read more

NavigationBar delay updating barTintColor iOS10

Try this code: Note: Code Tested in Swift 3. In ViewController A: override var isViewLoaded: Bool { title = “View 1” navigationController?.navigationBar.barTintColor = .blue navigationController?.navigationBar.isTranslucent = true navigationController?.navigationBar.tintColor = UIColor.white navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.white] UIApplication.shared.statusBarStyle = .lightContent self.navigationController?.navigationBar.barStyle = .black // In case statusbar Light content wont work. return true } In ViewController B: override var … Read more

how to display image in ios push notification?

If you want to customize the appearance of local and remote notifications, perform the following steps: Create a UNNotificationCategory and add to the UNUserNotificationCenter category: let newCategory = UNNotificationCategory(identifier: “newCategory”, actions: [ action ], minimalActions: [ action ], intentIdentifiers: [], options: []) let center = UNUserNotificationCenter.current() center.setNotificationCategories([newCategory]) Create a UNNotificationContentExtension: then use code or storyboard … Read more

App rejected due to missing usage descriptions (Xcode8)

iOS 10 must add permission in info.plist just review this BLOG :- settings-in-ios-10 you get all idea. Add permission in info.plist file base on your error log. Note: Write proper reason for permission in string value otherwise apple reject app again. NSCameraUsageDescription <key>NSCameraUsageDescription</key> <string>You have to describe the real usage for a human.</string> NSContactsUsageDescription <key>NSContactsUsageDescription</key> … Read more