Skip to content

Commit bb63211

Browse files
committed
Add fallback between serverUrl/serverURL
This was a typo from the original ms module so let's add a fallback to keep good compatibility
1 parent 0a7d03b commit bb63211

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ public CodePush(Context context) {
8585
}
8686

8787
String serverUrlFromStrings = getCustomPropertyFromStringsIfExist("ServerUrl");
88+
if (serverUrlFromStrings == null) {
89+
serverUrlFromStrings = getCustomPropertyFromStringsIfExist("ServerURL");
90+
}
8891
if (serverUrlFromStrings != null) {
8992
CodePushUtils.log("Executing CodePush with a custom server URL.");
9093
mServerUrl = serverUrlFromStrings;

ios/CodePush/CodePushConfig.m

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ - (instancetype)init
3535
NSString *buildVersion = [infoDictionary objectForKey:(NSString *)kCFBundleVersionKey];
3636
NSString *releaseChannelPublicId = [infoDictionary objectForKey:@"CodePushReleaseChannelPublicId"];
3737
NSString *serverURL = [infoDictionary objectForKey:@"CodePushServerURL"];
38+
if (!serverURL) {
39+
serverURL = [infoDictionary objectForKey:@"CodePushServerUrl"];
40+
}
41+
3842
NSString *publicKey = [infoDictionary objectForKey:@"CodePushSigningPublicKey"];
3943

4044
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

0 commit comments

Comments
 (0)