-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for rudder facebook integration (#373)
* chore(example): update podfile.lock * feat(rudder-integration-facebook-react-native): add facebook initial setup * feat(rudder-integration-facebook-react-native): add android setup * feat(rudder-integration-facebook-react-native): add ios setup * chore(example): update podfile.lock * chore(rudder-integration-facebook-react-native): set the release as major in project.json This is required to release the first version as 1.0.0 * chore(rudder-sdk-react-native-monorepo): override micromatch to address high vulnerability issue * chore(example): add fb android setup This step is needed to initialise the Facebook App Event Android SDK. * chore(example): update ios project * chore(example): add iOS setup * chore(example): add FB sdk init setup in iOS * chore(rudder-integration-facebook-react-native): address comments
- Loading branch information
1 parent
e48287a
commit 8cac746
Showing
49 changed files
with
1,276 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
<resources> | ||
<string name="app_name">Example</string> | ||
|
||
<!-- Refer to the Facebook doc: https://developers.facebook.com/docs/android/getting-started--> | ||
<string name="facebook_app_id">APPID</string> | ||
<string name="facebook_client_token">CLIENTOKEN</string> | ||
</resources> |
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 @@ | ||
// | ||
// Use this file to import your target's public headers that you would like to expose to Swift. | ||
// | ||
|
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,20 @@ | ||
// | ||
// FBSDKInit.swift | ||
// Example | ||
// | ||
// Created by Abhishek Pandey on 19/09/24. | ||
// | ||
|
||
import Foundation | ||
import FBSDKCoreKit | ||
|
||
|
||
@objc class FBSDKInitializer: NSObject { | ||
|
||
@objc static func setupFBSDK(application: UIApplication, launchOptions: [UIApplication.LaunchOptionsKey: Any]?) { | ||
/** | ||
* This code initializes the SDK when your app launches, and allows the SDK handle logins and sharing from the native Facebook app when you perform a Login or Share action. Otherwise, the user must be logged into Facebook to use the in-app browser to login. Refer Facebook App Event doc for more info: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios | ||
*/ | ||
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions) | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
libs/rudder-integration-facebook-react-native/.eslintrc.json
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,20 @@ | ||
{ | ||
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*", "public", ".cache", "node_modules"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": { | ||
"@typescript-eslint/ban-ts-comment": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# rudder-integration-facebook-react-native | ||
|
||
## Getting started | ||
|
||
`$ npm install @rudderstack/rudder-integration-facebook-react-native --save` | ||
|
||
### Mostly automatic installation | ||
|
||
`$ react-native link rudder-integration-facebook-react-native` | ||
|
||
## Usage | ||
|
||
```javascript | ||
import RudderIntegrationFacebookReactNative from '@rudderstack/rudder-integration-facebook-react-native'; | ||
|
||
// TODO: What to do with the module? | ||
RudderIntegrationFacebookReactNative; | ||
``` |
5 changes: 5 additions & 0 deletions
5
libs/rudder-integration-facebook-react-native/__tests__/Dummy.spec.ts
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,5 @@ | ||
describe('Facebook Integration Package', () => { | ||
it('should have test configs', () => { | ||
expect(true).toBeTruthy(); | ||
}); | ||
}); |
15 changes: 15 additions & 0 deletions
15
libs/rudder-integration-facebook-react-native/android/README.md
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 @@ | ||
# README | ||
|
||
If you want to publish the lib as a maven dependency, follow these steps before publishing a new version to npm: | ||
|
||
1. Be sure to have the Android [SDK](https://developer.android.com/studio/index.html) and [NDK](https://developer.android.com/ndk/guides/index.html) installed | ||
2. Be sure to have a `local.properties` file in this folder that points to the Android SDK and NDK | ||
|
||
``` | ||
ndk.dir=/Users/{username}/Library/Android/sdk/ndk-bundle | ||
sdk.dir=/Users/{username}/Library/Android/sdk | ||
``` | ||
|
||
3. Delete the `maven` folder | ||
4. Run `./gradlew installArchives` | ||
5. Verify that latest set of generated files is in the maven folder with the correct version number |
Oops, something went wrong.