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

Commit 9f0b3e6

Browse files
committed
Add logging when more than 1 CodePush instance is created
1 parent 68fe5e0 commit 9f0b3e6

File tree

1 file changed

+4
-0
lines changed
  • android/app/src/main/java/com/microsoft/codepush/react

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public CodePush(String deploymentKey, Activity mainActivity, boolean isDebugMode
101101
}
102102

103103
initializeUpdateAfterRestart();
104+
if (currentInstance != null) {
105+
CodePushUtils.log("More than one CodePush instances has been initialized, please use the non-static method codePush.getBundleUrlInternal() to get the correct bundleURL for a particular instance.");
106+
}
107+
104108
currentInstance = this;
105109
}
106110

0 commit comments

Comments
 (0)