How to use Facebook iOS SDK on iOS 10

Error OSStatus -10814 occures when canOpenURL: can’t find any application, that can open this URL (actually, Facebook trying to find their application by calling canOpenURL: with argument “fbauth2:/”). Printing happens inside of function, so you can’t do anything with that. But if you will run your application on device with installed Facebook app, you will … Read more

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

iOS 10 – Changes in asking permissions of Camera, microphone and Photo Library causing application to crash

[UPDATED privacy keys list to iOS 13 – see below] There is a list of all Cocoa Keys that you can specify in your Info.plist file: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html (Xcode: Target -> Info -> Custom iOS Target Properties) iOS already required permissions to access microphone, camera, and media library earlier (iOS 6, iOS 7), but since iOS … Read more

Registering for Push Notifications in Xcode 8/Swift 3.0?

Import the UserNotifications framework and add the UNUserNotificationCenterDelegate in AppDelegate.swift Request user permission func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let center = UNUserNotificationCenter.current() center.requestAuthorization(options:[.badge, .alert, .sound]) { (granted, error) in // Enable or disable features based on authorization. } application.registerForRemoteNotifications() return true } Getting device token func application(_ application: UIApplication, … Read more

What does deployment target mean?

Lets say you have set minimum deployment target to iOS 9. This means your application is compatible for iOS 9 and above devices. The application won’t run on below 9.0 devices but can run on any iOS version greater than iOS 9.0.

disable viewport zooming iOS 10+ safari?

It’s possible to prevent webpage scaling in safari on iOS 10, but it’s going to involve more work on your part. I guess the argument is that a degree of difficulty should stop cargo-cult devs from dropping “user-scalable=no” into every viewport tag and making things needlessly difficult for vision-impaired users. Still, I would like to … Read more

Class PLBuildVersion is implemented in both frameworks

Main Idea Main idea is simple: If your app (or dependencies, such as Pods) uses framework, that uses explicit (or implicit) PhotoLibraryServices.framework or AssetsLibraryServices.framework as dependency, Xcode warns you (even if you are using only one of them). It might be Photos/PhotosUI.framework or AssetsLibrary.framework, or another (I don’t have full list of dependencies, but it … Read more

CGRectMake, CGPointMake, CGSizeMake, CGRectZero, CGPointZero is unavailable in Swift

CGRect Can be simply created using an instance of a CGPoint or CGSize, thats given below. let rect = CGRect(origin: CGPoint(x: 0,y :0), size: CGSize(width: 100, height: 100)) // Or let rect = CGRect(origin: .zero, size: CGSize(width: 100, height: 100)) Or if we want to specify each value in CGFloat or Double or Int, we … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)