Skip to content

Commit

Permalink
updated to sdk v5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wesfieldj committed Mar 18, 2020
1 parent 86f487b commit f2588b1
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Versions

## 5.2.0
Android AppsFlyer SDK 5.2.0
iOS SDK AppsFlyer 5.2.0
Added brandDomain support for iOS & Android

## 5.1.3
Downgrade installReferrer to 1.0 due to bug in installReferrer 1.1

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

### <a id="plugin-build-for"> This plugin is built for

- iOS AppsFlyerSDK **v5.1.0**
- Android AppsFlyerSDK **v5.1.0**
- iOS AppsFlyerSDK **v5.2.0**
- Android AppsFlyerSDK **v5.2.0**


## <a id="installation"> 📲 Adding the SDK to your project
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ repositories {
dependencies {
implementation "com.facebook.react:react-native:${safeExtGet('reactNativeVersion', '+')}"
implementation "com.android.installreferrer:installreferrer:${safeExtGet('installReferrerVersion', '1.0')}"
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '5.1.0')}"
implementation "com.appsflyer:af-android-sdk:${safeExtGet('appsflyerVersion', '5.2.0')}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ public class RNAppsFlyerConstants {
final static String INVITE_CUSTOMERID = "customerID";
final static String INVITE_DEEPLINK = "baseDeepLink";
final static String PROMOTE_ID = "promotedAppId";
final static String INVITE_BRAND_DOMAIN = "brandDomain";
}

Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ public void generateInviteLink(ReadableMap args, final Callback successCallback,
String referrerImageUrl = null;
String customerID = null;
String baseDeepLink = null;
String brandDomain = null;

LinkGenerator linkGenerator = ShareInviteHelper.generateInviteUrl(getReactApplicationContext());

Expand All @@ -471,6 +472,7 @@ public void generateInviteLink(ReadableMap args, final Callback successCallback,
referrerImageUrl = options.optString(INVITE_IMAGEURL, "");
customerID = options.optString(INVITE_CUSTOMERID, "");
baseDeepLink = options.optString(INVITE_DEEPLINK, "");
brandDomain = options.optString(INVITE_BRAND_DOMAIN, "");

if (channel != null && channel != "") {
linkGenerator.setChannel(channel);
Expand All @@ -490,6 +492,11 @@ public void generateInviteLink(ReadableMap args, final Callback successCallback,
if (baseDeepLink != null && baseDeepLink != "") {
linkGenerator.setBaseDeeplink(baseDeepLink);
}
if (brandDomain != null && brandDomain != "") {
linkGenerator.setBrandDomain(brandDomain);
}



if (options.length() > 1 && !options.get("userParams").equals("")) {

Expand Down
2 changes: 2 additions & 0 deletions ios/AppsFlyerLinkGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
/// from `-[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:completionHandler]`
+ (instancetype)new NS_UNAVAILABLE;

@property(nonatomic, nullable) NSString *brandDomain;

/// The channel through which the invite was sent (e.g. Facebook/Gmail/etc.). Usage: Recommended
- (void)setChannel :(nonnull NSString *)channel;
/// ReferrerCustomerId setter
Expand Down
7 changes: 6 additions & 1 deletion ios/AppsFlyerTracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// AppsFlyerTracker.h
// AppsFlyerLib
//
// AppsFlyer iOS SDK 5.1.0 (951)
// AppsFlyer iOS SDK 5.2.0 (964)
// Copyright (c) 2012-2019 AppsFlyer Ltd. All rights reserved.
//

Expand Down Expand Up @@ -574,6 +574,11 @@ NS_SWIFT_NAME(trackEvent(name:values:completionHandler:));
*/
@property(atomic) BOOL isStopTracking;

/**
API to set manually Facebook deferred app link
*/
@property(nonatomic, nullable) NSURL *facebookDeferredAppLink;

@end

NS_ASSUME_NONNULL_END
2 changes: 2 additions & 0 deletions ios/RNAppsFlyer.m
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ -(NSError *) trackEventInternal: (NSString *)eventName eventValues:(NSDictionary
[generator setReferrerImageURL:[inviteLinkOptions objectForKey: @"referrerImageUrl"]];
[generator setDeeplinkPath:[inviteLinkOptions objectForKey: @"deeplinkPath"]];
[generator setBaseDeeplink:[inviteLinkOptions objectForKey: @"baseDeeplink"]];
[generator setBrandDomain:[inviteLinkOptions objectForKey: @"brandDomain"]];


if (![customParams isKindOfClass:[NSNull class]]) {
[generator addParameters:customParams];
Expand Down
2 changes: 1 addition & 1 deletion react-native-appsflyer.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ Pod::Spec.new do |s|
s.source_files = 'ios/**/*.{h,m}'
s.platform = :ios, "8.0"
s.static_framework = true
s.dependency 'AppsFlyerFramework', '~> 5.1.0'
s.dependency 'AppsFlyerFramework', '~> 5.2.0'
s.dependency 'React'
end

0 comments on commit f2588b1

Please sign in to comment.