@heap/react-native-heap
Version:
React Native event tracking with Heap.
18 lines (17 loc) • 812 B
JavaScript
import { AndroidConfig, withStringsXml } from '@expo/config-plugins';
const WithHeap = (expoConfig) => withStringsXml(expoConfig, (modConfig) => {
var _a, _b;
if (!((_a = expoConfig === null || expoConfig === void 0 ? void 0 : expoConfig.android) === null || _a === void 0 ? void 0 : _a.package)) {
console.warn('Please manually update strings.xml with the android package name.');
return modConfig;
}
modConfig.modResults = AndroidConfig.Strings.setStringItem([{
_: (_b = expoConfig.android) === null || _b === void 0 ? void 0 : _b.package,
$: {
name: 'com.heapanalytics.android.buildConfigPkgName',
translatable: 'false',
}
}], modConfig.modResults);
return modConfig;
});
export default WithHeap;