My React Native 0.70 app uses react-native-code-push 7.1.0. And the way it was integrated into the React Native app happens at the index.js
:
/**
* @format
*/
import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import codePush from "react-native-code-push"; //code push
AppRegistry.registerComponent(appName, () => codePush(App));
I was told by app reviewer that codePush is retrieving user's ANDROIDID (red flag) before his/her consent (as index.js is the first module loaded when app is launched). I was told that a popup window asking for users' consent before the code push is needed. There are 2 questions. 1. Does code push depends on user's ANDROIDID to work. 2. If it does, how to load the code push module after users' consent.
Here is the app call stack provided by the reviewer:
[com.microsoft.codepush.react.CodePushNativeModule.<init>(CodePushNativeModule.java:63),
com.microsoft.codepush.react.CodePush.createNativeModules(CodePush.java:414),
com.facebook.react.ReactPackageHelper.getNativeModuleIterator(ReactPackageHelper.java:42),
com.facebook.react.NativeModuleRegistryBuilder.processPackage(NativeModuleRegistryBuilder.java:42),
com.facebook.react.ReactInstanceManager.processPackage(ReactInstanceManager.java:1456),
com.facebook.react.ReactInstanceManager.processPackages(ReactInstanceManager.java:1427),
com.facebook.react.ReactInstanceManager.createReactContext(ReactInstanceManager.java:1338),
com.facebook.react.ReactInstanceManager.access$1200(ReactInstanceManager.java:136),
com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:1108),
java.lang.Thread.run(Thread.java:933)]