Skip to content

Commit

Permalink
Merge pull request #234 from AppsFlyerSDK/releases/6.x.x/6.10.x/6.10.…
Browse files Browse the repository at this point in the history
…31-rc4

Releases/6.x.x/6.10.x/6.10.31 rc4
  • Loading branch information
noa-kogonia authored Jun 21, 2023
2 parents 755ec76 + 4fdece3 commit 641415c
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy-to-QA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ jobs:
SLACK_TOKEN: ${{ secrets.CI_SLACK_TOKEN }}
run: |
echo "I'm here 1"
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyerSDK \*\*v[0-9].[0-9]+.[0-9]+\*\*')
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyerSDK' | grep -Eo '[0-9].[0-9]+.[0-9]+')
echo "The ios sdk version is: $ios_sdk_version"
echo "I'm here 2"
android_sdk_version=$(cat README.md | grep 'Android AppsFlyerSDK \*\*v[0-9].[0-9]+.[0-9]+\*\*')
android_sdk_version=$(cat README.md | grep 'Android AppsFlyerSDK' | grep -Eo '[0-9].[0-9]+.[0-9]+')
echo "I'm here 3"
CHANGES=$(cat "${{env.JIRA_FIXED_VERSION}}-releasenotes".txt)
echo "I'm here 4"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-Production-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ jobs:
run: |
chmod +x .github/workflows/scripts/releaseNotesGenerator.sh
.github/workflows/scripts/releaseNotesGenerator.sh $JIRA_TOKEN "$JIRA_FIXED_VERSION"
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyerSDK \*\*v[0-9].[0-9]+.[0-9]+\*\*')
android_sdk_version=$(cat README.md | grep 'Android AppsFlyerSDK \*\*v[0-9].[0-9]+.[0-9]+\*\*')
android_sdk_version=$(cat README.md | grep 'Android AppsFlyerSDK' | grep -Eo '[0-9].[0-9]+.[0-9]+')
ios_sdk_version=$(cat README.md | grep 'iOS AppsFlyerSDK' | grep -Eo '[0-9].[0-9]+.[0-9]+')
CHANGES=$(cat "$JIRA_FIXED_VERSION-releasenotes".txt)
curl -X POST -H 'Content-type: application/json' --data '{"jira_fixed_version": "'"${{env.JIRA_FIXED_VERSION}}"'", "deploy_type": "Production", "install_tag": "latest", "git_branch": "'"$RELEASE_BRACH_NAME"'", "changes_and_fixes": "'"$CHANGES"'", "android_dependency": "'"$android_sdk_version"'", "ios_dependency": "'"$ios_sdk_version"'"}' "$SLACK_TOKEN"
7 changes: 7 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 6.10.31
Release date: *2023-06-21*

- Cordova >> Release 6.10.31
- Cordova Plugin >> Android >> plugin.xml file settings doesn't merge <uses-permission> tag in App's AndroidManifest.xml
- Cordova Plugin >> User Invite >> Brand domain setup is not supported

## 6.10.3
Release date: *2023-05-10*

Expand Down
1 change: 1 addition & 0 deletions examples/cordovatestapp/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<button type="button" id="logCrossPromotionAndOpenStore" class="btn btn-primary">log Cross Promotion And Open
Store
</button>
<button type="button" id="generateUserInvite" class="btn btn-primary">Generate UserInvite</button>
<button type="button" id="setCurrency" class="btn btn-primary">Set Currency</button>
<button type="button" id="setUserId" class="btn btn-primary">Set App User Id</button>
<button type="button" id="setUserEmails" class="btn btn-primary">Test setUserEmails</button>
Expand Down
17 changes: 17 additions & 0 deletions examples/cordovatestapp/www/js/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
let logEventBtn = document.getElementById('logEvent');
let logCrossPromotionAndOpenStoreBtn = document.getElementById('logCrossPromotionAndOpenStore');
let setCurrencyBtn = document.getElementById('setCurrency');
let generateUserInviteBtn = document.getElementById('generateUserInvite');
let setUserIdBtn = document.getElementById('setUserId');
let setUserEmailsBtn = document.getElementById('setUserEmails');
let setPhoneBtn = document.getElementById('setPhone');
Expand All @@ -12,6 +13,9 @@ let customDomainsBtn = document.getElementById('customDomains');
let enableFBBtn = document.getElementById('enableFB');
let addPushNotificationPathBtn = document.getElementById('addPushNotificationPath');

if (generateUserInviteBtn) {
generateUserInviteBtn.addEventListener('click', generateUserInvite, false);
}
if (logEventBtn) {
logEventBtn.addEventListener('click', logEvent, false);
}
Expand Down Expand Up @@ -53,6 +57,19 @@ function callBackFunction(id) {
alert('received: ' + id);
}

function generateUserInvite(){
window.plugins.appsFlyer.setAppInviteOneLinkID("em3J");
let args = {
"campaign": "testCampaign",
"referrerName": "testReferrer",
"referrerImageURL": "testReferrerImageURL",
"baseDeepLink": "testBaseDeepLink",
"brandDomain": "noakogonia.afsdktests.com",
"userParams": {"a":"b"}
};
window.plugins.appsFlyer.generateInviteLink(args, callBackFunction, callBackFunction);
}

function setCurrency(currencyId) {
currencyId = 'USD';
window.plugins.appsFlyer.setCurrencyCode(currencyId);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-appsflyer-sdk",
"version": "6.10.3",
"version": "6.10.31",
"description": "Cordova AppsFlyer SDK Plugin",
"cordova": {
"id": "cordova-plugin-appsflyer-sdk",
Expand Down
5 changes: 3 additions & 2 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-appsflyer-sdk"
version="6.10.3">
version="6.10.31-rc4">
<name>AppsFlyer</name>
<description>Cordova Plugin AppsFlyer</description>
<license>Apache 2.0</license>
Expand All @@ -47,7 +47,7 @@
<param name="android-package" value="com.appsflyer.cordova.plugin.AppsFlyerPlugin"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest" mode="merge">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
Expand Down Expand Up @@ -95,4 +95,5 @@
</pods>
</podspec>
</platform>

</plugin>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

public class AppsFlyerConstants {

final static String PLUGIN_VERSION = "6.10.3";
final static String PLUGIN_VERSION = "6.10.31";
final static String NO_DEVKEY_FOUND = "AppsFlyer 'devKey' is missing or empty";
final static String NO_GCM_PROJECT_NUMBER_PROVIDED = "No GCM Project number provided";
final static String SUCCESS = "Success";
Expand Down Expand Up @@ -42,9 +42,10 @@ public class AppsFlyerConstants {
final static String INVITE_CHANNEL = "channel";
final static String INVITE_CAMPAIGN = "campaign";
final static String INVITE_REFERRER = "referrerName";
final static String INVITE_IMAGEURL = "referreImageURL";
final static String INVITE_IMAGEURL = "referrerImageURL";
final static String INVITE_CUSTOMERID = "customerID";
final static String INVITE_DEEPLINK = "baseDeepLink";
final static String INVITE_BRAND_DOMAIN = "brandDomain";
final static String PROMOTE_ID = "promotedAppId";

//RECEIPT VALIDATION
Expand Down
6 changes: 6 additions & 0 deletions src/android/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.INVITE_FAIL;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.INVITE_IMAGEURL;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.INVITE_REFERRER;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.INVITE_BRAND_DOMAIN;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.NO_CUSTOMER_ID;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.NO_DEVKEY_FOUND;
import static com.appsflyer.cordova.plugin.AppsFlyerConstants.NO_EVENT_NAME_FOUND;
Expand Down Expand Up @@ -716,6 +717,7 @@ private boolean generateInviteLink(JSONArray args, CallbackContext callbackConte
String referrerImageUrl = null;
String customerID = null;
String baseDeepLink = null;
String brandDomain = null;

try {
final JSONObject options = args.getJSONObject(0);
Expand All @@ -726,6 +728,7 @@ private boolean generateInviteLink(JSONArray args, CallbackContext callbackConte
referrerImageUrl = options.optString(INVITE_IMAGEURL, "");
customerID = options.optString(INVITE_CUSTOMERID, "");
baseDeepLink = options.optString(INVITE_DEEPLINK, "");
brandDomain = options.optString(INVITE_BRAND_DOMAIN, "");

Context context = this.cordova.getActivity().getApplicationContext();
LinkGenerator linkGenerator = ShareInviteHelper.generateInviteUrl(context);
Expand All @@ -748,6 +751,9 @@ private boolean generateInviteLink(JSONArray args, CallbackContext callbackConte
if (baseDeepLink != null && baseDeepLink != "") {
linkGenerator.setBaseDeeplink(baseDeepLink);
}
if (brandDomain != null && brandDomain != "") {
linkGenerator.setBrandDomain(brandDomain);
}

if (options.length() > 1 && !options.get("userParams").equals("")) {
JSONObject jsonCustomValues = options.getJSONObject("userParams");
Expand Down
1 change: 1 addition & 0 deletions src/ios/AppsFlyerPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define afUiImageUrl @"referrerImageUrl"
#define afUiCustomerID @"customerID"
#define afUiBaseDeepLink @"baseDeepLink"
#define afUiBrandDomain @"brandDomain"

// Appsflyer native objects
#define afConversionData @"onInstallConversionDataListener"
Expand Down
7 changes: 6 additions & 1 deletion src/ios/AppsFlyerPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ - (void)initSdk:(CDVInvokedUrlCommand*)command
[AppsFlyerLib shared].deepLinkDelegate = self;
}

[[AppsFlyerLib shared] setPluginInfoWith:AFSDKPluginCordova pluginVersion:@"6.10.3" additionalParams:nil];
[[AppsFlyerLib shared] setPluginInfoWith:AFSDKPluginCordova pluginVersion:@"6.10.31" additionalParams:nil];
[AppsFlyerLib shared].appleAppID = appId;
[AppsFlyerLib shared].appsFlyerDevKey = devKey;
[AppsFlyerLib shared].isDebug = isDebug;
Expand Down Expand Up @@ -347,6 +347,7 @@ - (void)generateInviteLink:(CDVInvokedUrlCommand*)command {
NSString *referrerImageUrl = nil;
NSString *customerID = nil;
NSString *baseDeepLink = nil;
NSString *brandDomain = nil;

if (![inviteLinkOptions isKindOfClass:[NSNull class]]) {
channel = (NSString*)[inviteLinkOptions objectForKey: afUiChannel];
Expand All @@ -355,6 +356,7 @@ - (void)generateInviteLink:(CDVInvokedUrlCommand*)command {
referrerImageUrl = (NSString*)[inviteLinkOptions objectForKey: afUiImageUrl];
customerID = (NSString*)[inviteLinkOptions objectForKey: afUiCustomerID];
baseDeepLink = (NSString*)[inviteLinkOptions objectForKey: afUiBaseDeepLink];
brandDomain = (NSString*)[inviteLinkOptions objectForKey: afUiBrandDomain];

[AppsFlyerShareInviteHelper generateInviteUrlWithLinkGenerator:^AppsFlyerLinkGenerator * _Nonnull(AppsFlyerLinkGenerator * _Nonnull generator) {
if (channel != nil && ![channel isEqualToString:@""]) {
Expand All @@ -375,6 +377,9 @@ - (void)generateInviteLink:(CDVInvokedUrlCommand*)command {
if (baseDeepLink != nil && ![baseDeepLink isEqualToString:@""]) {
[generator setDeeplinkPath:baseDeepLink];
}
if (brandDomain != nil && ![brandDomain isEqualToString:@""]) {
[generator setBrandDomain:brandDomain];
}

if (![customParams isKindOfClass:[NSNull class]]) {
[generator addParameters:customParams];
Expand Down

0 comments on commit 641415c

Please sign in to comment.