Skip to content

Latest commit

 

History

History
87 lines (63 loc) · 1.86 KB

iOSSetup.md

File metadata and controls

87 lines (63 loc) · 1.86 KB

iOS Setup

  • Install Plugin.FacebookClient package into your iOS project.

AppDelegate.cs

On FinishedLaunching just before return base.FinishedLaunching(app, options):

FacebookClientManager.Initialize(app,options);

Override OnActivated(UIApplication uiApplication):

FacebookClientManager.OnActivated();

Override OpenUrl methods

  public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
  {
      return FacebookClientManager.OpenUrl(app, url, options);
  }

  public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
  {
      return FacebookClientManager.OpenUrl(application, url, sourceApplication, annotation);        
  }

Info.plist

Add facebook bundle url types:

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLName</key>
    <string>fb</string>
    <key>CFBundleURLSchemes</key>
    <array>
       <string>fbxxxxxxxxxxxxx</string>
    </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>xxxxxxxxxxxxx</string>
<key>FacebookDisplayName</key>
<string>[Facebook app name]</string>
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>fbapi</string>
  <string>fb-messenger-share-api</string>
  <string>fbauth2</string>
  <string>fbshareextension</string>
</array>

Note: Replace xxxxxxxxxxxxx with your facebook app id

If your app needs access to the gallery because will be posting photos, remember to add the photo library permission.

<key>NSPhotoLibraryUsageDescription</key>
<string>{human-readable reason for photo access}</string>

Entitlement.plist

On your Entitlement.plist add:

  <key>keychain-access-groups</key>
  <array>
    <string>{your-apple-app-id-prefix}.{your-apple-app-id-bundle-identifier}</string>
  </array>

<= Back to Table of Contents