Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 99c8c4e

Browse files
DmitriyKirakosyanvelimir-jankovicMikhailSuendukov
authored
Replace DevInternalSettings with DeveloperSettings for react-native 0.73.0 (#2617)
* Replace DevInternalSettings with DeveloperSettings DevInternalSettings was enclosed in ReactNative 0.73.0-rc.2, so we need to replace it with public class DeveloperSettings. facebook/react-native#37256 * auto install cocoapods in tests --------- Co-authored-by: velimir-jankovic <84719115+velimir-jankovic@users.noreply.github.com> Co-authored-by: JiglioNero <mikhail.suendukov@akvelon.com>
1 parent 5ab89da commit 99c8c4e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

android/app/src/main/java/com/microsoft/codepush/react/CodePush.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import com.facebook.react.bridge.JavaScriptModule;
1111
import com.facebook.react.bridge.NativeModule;
1212
import com.facebook.react.bridge.ReactApplicationContext;
13-
import com.facebook.react.devsupport.DevInternalSettings;
1413
import com.facebook.react.devsupport.interfaces.DevSupportManager;
14+
import com.facebook.react.modules.debug.interfaces.DeveloperSettings;
1515
import com.facebook.react.uimanager.ViewManager;
1616

1717
import org.json.JSONException;
@@ -152,12 +152,12 @@ private boolean isLiveReloadEnabled(ReactInstanceManager instanceManager) {
152152
if (instanceManager != null) {
153153
DevSupportManager devSupportManager = instanceManager.getDevSupportManager();
154154
if (devSupportManager != null) {
155-
DevInternalSettings devInternalSettings = (DevInternalSettings)devSupportManager.getDevSettings();
156-
Method[] methods = devInternalSettings.getClass().getMethods();
155+
DeveloperSettings devSettings = devSupportManager.getDevSettings();
156+
Method[] methods = devSettings.getClass().getMethods();
157157
for (Method m : methods) {
158158
if (m.getName().equals("isReloadOnJSChangeEnabled")) {
159159
try {
160-
return (boolean) m.invoke(devInternalSettings);
160+
return (boolean) m.invoke(devSettings);
161161
} catch (Exception x) {
162162
return false;
163163
}

test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ class RNProjectManager extends ProjectManager {
307307
}
308308
mkdirp.sync(projectDirectory);
309309

310-
return TestUtil.getProcessOutput("npx react-native init " + appName + " --version 0.71.3", { cwd: projectDirectory, timeout: 30 * 60 * 1000 })
310+
return TestUtil.getProcessOutput("npx react-native init " + appName + " --version 0.71.3 --install-pods", { cwd: projectDirectory, timeout: 30 * 60 * 1000 })
311311
.then((e) => { console.log(`"npx react-native init ${appName}" success. cwd=${projectDirectory}`); return e; })
312312
.then(this.copyTemplate.bind(this, templatePath, projectDirectory))
313313
.then<void>(TestUtil.getProcessOutput.bind(undefined, TestConfig.thisPluginInstallString, { cwd: path.join(projectDirectory, TestConfig.TestAppName) }))

0 commit comments

Comments
 (0)