Skip to content

Commit

Permalink
Add setFBAppID method for Android
Browse files Browse the repository at this point in the history
  • Loading branch information
arunlodhi committed Dec 30, 2024
1 parent 02170e5 commit 4fda031
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions android/src/main/java/io/branch/rnbranch/RNBranchModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -1257,4 +1257,11 @@ public void setDMAParamsForEEA(boolean eeaRegion, boolean adPersonalizationConse
public void validateSDKIntegration() {
IntegrationValidator.validate(mActivity);
}

@ReactMethod
public void setFBAppID(String fbAppID) {
Branch branch = Branch.getInstance();
branch.setFBAppID(fbAppID);
}

}
6 changes: 6 additions & 0 deletions ios/RNBranch.m
Original file line number Diff line number Diff line change
Expand Up @@ -750,4 +750,10 @@ - (CGFloat) colorComponentFrom: (NSString *) string start: (NSUInteger) start le
[[Branch getInstance] validateSDKIntegration];
}

#pragma mark setIdentity
RCT_EXPORT_METHOD(
setFBAppID:(NSString *)fbAppID
) {
}

@end
1 change: 1 addition & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ interface Branch {
setPreInstallPartner: (partner: string) => void;
setDMAParamsForEEA: (eeaRegion: boolean, adPersonalizationConsent: boolean, adUserDataUsageConsent: boolean) => void;
validateSDKIntegration: () => void;
setFBAppID: (fbAppID: string) => void;
}
declare const branch: Branch;
export default branch;
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ class Branch {

validateSDKIntegration = () => {
RNBranch.validateSDKIntegration();
};
};

setFBAppID = (fbAppID) => RNBranch.setFBAppID(fbAppID);
}

const validateParam = (param, paramName) => {
Expand Down

0 comments on commit 4fda031

Please sign in to comment.