forked from MetaMask/metamask-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreact-native.config.js
More file actions
43 lines (38 loc) · 1.2 KB
/
Copy pathreact-native.config.js
File metadata and controls
43 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* eslint-disable import-x/no-nodejs-modules */
/* eslint-disable import-x/no-commonjs */
// react-native.config.js
const fs = require('fs');
const path = require('path');
/**
* React Native configuration for autolinking.
*/
// Check if Google Tap and Pay SDK is present for Android push provisioning
const tapAndPaySdkPath = path.join(
__dirname,
'android/libs/com/google/android/gms/play-services-tapandpay',
);
const hasTapAndPaySdk = fs.existsSync(tapAndPaySdkPath);
// Build dependencies config
const dependencies = {
'@react-native-community/viewpager': {
platforms: {
ios: null, // react-native-pager-view is the modern replacement; both link identical Obj-C symbols
android: null,
},
},
'react-native-aes-crypto-forked': {
platforms: {
ios: null, // disable Android platform, other platforms will still autolink if provided
},
},
// "Add to Google Wallet" library setup: Android enabled only when TapAndPay SDK present
'@expensify/react-native-wallet': {
platforms: {
...(hasTapAndPaySdk ? {} : { android: null }),
},
},
};
module.exports = {
dependencies,
// Note: Font assets now managed by expo-font plugin instead of React Native assets
};