Skip to content

Commit f47d4b1

Browse files
committed
Adding Expo Android PC Support
1 parent 035a0ab commit f47d4b1

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

expo/withAppsFlyer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
const withAppsFlyerIos = require('./withAppsFlyerIos');
2+
const withAppsFlyerAndroid = require('./withAppsFlyerAndroid');
23

34
module.exports = function withAppsFlyer(config, {
45
shouldUseStrictMode = false,
56
shouldUsePurchaseConnector = false
67
} = {}) {
78
config = withAppsFlyerIos(config, { shouldUseStrictMode, shouldUsePurchaseConnector });
9+
config = withAppsFlyerAndroid(config, { shouldUsePurchaseConnector });
810
return config;
911
};

expo/withAppsFlyerAndroid.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = function withAppsFlyerAndroid(config, {
2+
shouldUsePurchaseConnector = false
3+
} = {}) {
4+
5+
if (shouldUsePurchaseConnector) {
6+
if (!config.android) {
7+
config.android = {};
8+
}
9+
10+
if (!config.android.gradleProperties) {
11+
config.android.gradleProperties = {};
12+
}
13+
14+
// Enable AppsFlyer Purchase Connector for Android
15+
config.android.gradleProperties['appsflyer.enable_purchase_connector'] = 'true';
16+
}
17+
18+
return config;
19+
};

0 commit comments

Comments
 (0)