-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[facebook] Improve sample and add README.md (#15)
The facebook sample has been updated to use the bound API, and a README has been added to explain the sample and how to configure it. The Android Gradle build scripts have been updated to use Kotlin DSL. The iOS project has been updated to use Swift Package Manager to manage the Facebook SDK dependency. A few MSBuild changes have been made to improve single platform builds. Android native projects will no longer be built when building for iOS, and vice-versa.
- Loading branch information
Showing
23 changed files
with
297 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Facebook Slim Binding | ||
This folder contains a slim binding for the Facebook SDK which demonstrates simple [App Events][0] usage. | ||
|
||
### Build and Run | ||
```shell | ||
dotnet build sample -t:Run -f net8.0-android | ||
dotnet build sample -t:Run -f net8.0-ios | ||
``` | ||
|
||
### Configure | ||
The included sample requires some modification to fully function. You will need to log in to | ||
a Facebook developer account and configure an app to recieve App Events from this sample. | ||
For more details, reference the [Get Started (Android)][1] or [Get Started (iOS)][2] pages. | ||
|
||
#### Android | ||
The following app identifiers should be updated in the `strings.xml` file of the sample application: | ||
|
||
1. Replace the `YOUR_APP_ID` string in the `facebook/sample/Platforms/Android/Resources/values/strings.xml` file with your Facebook App ID. | ||
2. Replace the `YOUR_CLIENT_TOKEN` string in the `facebook/sample/Platforms/Android/Resources/values/strings.xml` file with your Facebook App Client Token. | ||
|
||
#### iOS | ||
The following app identifiers should be updated in the `Info.plist` file of the sample application: | ||
|
||
1. Replace the `YOUR_APP_ID` string in the `facebook/sample/Platforms/iOS/Info.plist` file with your Facebook App ID. | ||
2. Replace the `YOUR_CLIENT_TOKEN` string in the `facebook/sample/Platforms/iOS/Info.plist` file with your Facebook App Client Token. | ||
|
||
|
||
[0]: https://developers.facebook.com/docs/app-events/ | ||
[1]: https://developers.facebook.com/docs/app-events/getting-started-app-events-android | ||
[2]: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
build | ||
captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
plugins { | ||
id("com.android.library") version "8.2.2" apply false | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
plugins { | ||
id("com.android.library") | ||
} | ||
|
||
android { | ||
namespace = "com.microsoft.mauifacebook" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
configurations { | ||
create("copyDependencies") | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.11.0") | ||
implementation("com.facebook.android:facebook-android-sdk:latest.release") | ||
"copyDependencies"("com.facebook.android:facebook-android-sdk:latest.release") | ||
} | ||
|
||
project.afterEvaluate { | ||
tasks.register<Copy>("copyDeps") { | ||
from(configurations["copyDependencies"]) | ||
into("${projectDir}/build/outputs/deps") | ||
} | ||
tasks.named("preBuild") { finalizedBy("copyDeps") } | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.