|
<!-- FACEBOOK -- Info.plist for ios 9--> |
|
<!-- |
|
configure FB Application @ developers.facebook.com |
|
and get {your-app-id} |
|
https://developers.facebook.com/docs/ios/getting-started#appid |
|
--> |
|
|
|
<!-- Pods --> |
|
pod 'FBSDKCoreKit', '~> 4.10' |
|
pod 'FBSDKLoginKit', '~> 4.10' |
|
|
|
<!-- FB APP --> |
|
<key>FacebookAppID</key> |
|
<string>{your-app-id}</string> |
|
<key>FacebookDisplayName</key> |
|
<string>{your-app-name}</string> |
|
<key>CFBundleURLTypes</key> |
|
<array> |
|
<dict> |
|
<key>CFBundleURLSchemes</key> |
|
<array> |
|
<string>fb{your-app-id}</string> |
|
</array> |
|
</dict> |
|
</array> |
|
|
|
<!-- Whitelist for FB servers (ios9) --> |
|
<key>NSAppTransportSecurity</key> |
|
<dict> |
|
<key>NSExceptionDomains</key> |
|
<dict> |
|
<key>facebook.com</key> |
|
<dict> |
|
<key>NSIncludesSubdomains</key> <true/> |
|
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> |
|
</dict> |
|
<key>fbcdn.net</key> |
|
<dict> |
|
<key>NSIncludesSubdomains</key> <true/> |
|
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> |
|
</dict> |
|
<key>akamaihd.net</key> |
|
<dict> |
|
<key>NSIncludesSubdomains</key> <true/> |
|
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key> <false/> |
|
</dict> |
|
</dict> |
|
</dict> |
|
|
|
<!-- can open app --> |
|
<key>LSApplicationQueriesSchemes</key> |
|
<array> |
|
<string>fbapi</string> |
|
<string>fb-messenger-api</string> |
|
<string>fbauth2</string> |
|
<string>fbshareextension</string> |
|
</array> |
|
|
|
|
|
<!-- Application Delegate --> |
|
// AppDelegate.m |
|
#import <FBSDKCoreKit/FBSDKCoreKit.h> |
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
|
[[FBSDKApplicationDelegate sharedInstance] application:application |
|
didFinishLaunchingWithOptions:launchOptions]; |
|
return YES; |
|
} |
|
|
|
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { |
|
return [[FBSDKApplicationDelegate sharedInstance] application:application |
|
openURL:url |
|
sourceApplication:sourceApplication |
|
annotation:annotation |
|
]; |
|
} |