Setting up the Air manifest .xml file for Android and iOS
NOTICE! This post is too old, to implement Facebook SDK into your AdobeAIR app, read here.
For the Facebook SDK ANE to work properly in your Air mobile project, you need to setup the manifest correctly for Android and iOS and make sure it is correctly connected to the Facebook app you must have already created. if you don’t know how to create a Facebook app, you should first read this post.
below, I have copied the whole Air manifest for you which includes necessary settings for both Android and iOS. read comments inline to know more about the settings
<?xml version="1.0" encoding="utf-8"?>
<application xmlns="http://ns.adobe.com/air/application/25.0">
<!-- This is your app bundleID/packageID which you must use in your Facebook developer console while building a new fb app -->
<id>com.doitflash.exFacebook2</id>
<versionNumber>4.22.1</versionNumber>
<supportedProfiles>mobileDevice</supportedProfiles>
<filename>exFacebook</filename>
<name>exFacebook</name>
<android>
<manifestAdditions>
<![CDATA[<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- You surely need internet permission if you are using Facebook SDK -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23"/>
<application android:hardwareAccelerated="true" android:allowBackup="true">
<activity android:hardwareAccelerated="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<!-- Your application scheme. read here for more information: http://www.myflashlabs.com/open-adobe-air-app-browser-pass-parameters/ -->
<data android:scheme="air.com.doitflash.exfacebook2" />
</intent-filter>
</activity>
<!--
This is required by the Facebook ANE. replace the zeros with your actual Facebook App ID
While doing that, notice the empty space after the "\ ". This is required because the ANE
must see the value as an String.
-->
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 00000000000"/>
<!-- This is required by the Facebook ANE for logging in -->
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="My App Name" />
<activity android:name="com.doitflash.facebook.access.MyLogin" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@style/Theme.Transparent" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="fb0000000000000" />
</intent-filter>
</activity>
<!-- This is required by the Facebook ANE for sharing https://developers.facebook.com/docs/sharing/android -->
<provider android:authorities="com.facebook.app.FacebookContentProvider0000000000000" android:name="com.facebook.FacebookContentProvider" android:exported="true" />
<activity android:name="com.doitflash.facebook.sharing.MyShare" android:theme="@style/Theme.Transparent" />
<!-- This is required by the Facebook ANE for app invite feature -->
<activity android:name="com.doitflash.facebook.invite.MyInvite" android:theme="@style/Theme.Transparent" />
</application>
</manifest>]]></manifestAdditions>
</android>
<iPhone>
<InfoAdditions>
<!-- the minimum iOS supported is 6.1 -->
<![CDATA[<key>MinimumOSVersion</key>
<string>8.0</string>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiresPersistentWiFi</key>
<string>NO</string>
<key>UIFileSharingEnabled</key>
<string>NO</string>
<key>UIPrerenderedIcon</key>
<true />
<!-- You should add your FB app ID here like this -->
<key>FacebookAppID</key>
<string>0000000000000</string>
<!-- Put your facebook app's display name exactly like how it is written in your Facebook developer console -->
<key>FacebookDisplayName</key>
<string>Air Native Extension</string>
<!-- Just copy the following nodes to your own manifest and replace the zeros with your own fb app ID. notice the prefix fb. that should stay! -->
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb000000000</string>
<!-- Your application scheme. read here for more information: http://www.myflashlabs.com/open-adobe-air-app-browser-pass-parameters/ -->
<string>air.com.doitflash.exfacebook2</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
<key>NSPhotoLibraryUsageDescription</key>
<string>My description about why I need this feature in my app</string>
<key>UIDeviceFamily</key>
<array>
<!-- iPhone support -->
<string>1</string>
<!-- iPad support -->
<string>2</string>
</array>]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
<initialWindow>
<title>exFacebook</title>
<content>exFacebook.swf</content>
<visible>true</visible>
<fullScreen>true</fullScreen>
<autoOrients>false</autoOrients>
<renderMode>direct</renderMode>
<systemChrome>standard</systemChrome>
<aspectRatio>portrait</aspectRatio>
</initialWindow>
<icon>
<image48x48>icons/icon_48.png</image48x48>
<image57x57>icons/icon_57.png</image57x57>
<image72x72>icons/icon_72.png</image72x72>
<image114x114>icons/icon_114.png</image114x114>
<image512x512>icons/icon_512.png</image512x512>
</icon>
<extensions>
<extensionID>com.myflashlab.air.extensions.facebook</extensionID>
<!-- The following dependency ANEs are required Download from https://github.com/myflashlab/common-dependencies-ANE -->
<!-- This dependency is needed on Android and iOS -->
<extensionID>com.myflashlab.air.extensions.dependency.overrideAir</extensionID>
<!-- This dependency is needed on Android ONLY. You may need to comment it out if necessary -->
<extensionID>com.myflashlab.air.extensions.dependency.androidSupport</extensionID>
</extensions>
</application>
Now that you have your manifest setup and running correctly, you should do one extra step on your Android setup. Facebook requires Android apps to register a key Hash into the Facebook developer console. to complete this step, read part 3.
Adobe Air + Facebook SDK integration part 8
Setting up the Air manifest .xml file for Android and iOS
For the Facebook SDK ANE to work properly in your Air mobile project, you need to setup the manifest correctly for Android and iOS and make sure it is correctly connected to the Facebook app you must have already created. if you don’t know how to create a Facebook app, you should first read this post.
below, I have copied the whole Air manifest for you which includes necessary settings for both Android and iOS. read comments inline to know more about the settings
Now that you have your manifest setup and running correctly, you should do one extra step on your Android setup. Facebook requires Android apps to register a key Hash into the Facebook developer console. to complete this step, read part 3.
Share this:
Related