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

Commit 181c96d

Browse files
author
max-mironov
committed
2 parents 2f1afd6 + bb0e206 commit 181c96d

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ protected Void doInBackground(Void... params) {
321321
JSONObject currentPackage = mUpdateManager.getCurrentPackage();
322322

323323
if (currentPackage == null) {
324-
promise.resolve("");
324+
promise.resolve(null);
325325
return null;
326326
}
327327

@@ -335,14 +335,14 @@ protected Void doInBackground(Void... params) {
335335
if (updateState == CodePushUpdateState.PENDING.getValue() && !currentUpdateIsPending) {
336336
// The caller wanted a pending update
337337
// but there isn't currently one.
338-
promise.resolve("");
338+
promise.resolve(null);
339339
} else if (updateState == CodePushUpdateState.RUNNING.getValue() && currentUpdateIsPending) {
340340
// The caller wants the running update, but the current
341341
// one is pending, so we need to grab the previous.
342342
JSONObject previousPackage = mUpdateManager.getPreviousPackage();
343343

344344
if (previousPackage == null) {
345-
promise.resolve("");
345+
promise.resolve(null);
346346
return null;
347347
}
348348

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ public static void copyDirectoryContents(String sourceDirectoryPath, String dest
5555
}
5656

5757
public static void deleteDirectoryAtPath(String directoryPath) {
58+
if (directoryPath == null) {
59+
CodePushUtils.log("deleteDirectoryAtPath attempted with null directoryPath");
60+
return;
61+
}
5862
File file = new File(directoryPath);
5963
if (file.exists()) {
6064
deleteFileOrFolderSilently(file);

docs/setup-ios.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,36 @@ To let the CodePush runtime know which deployment it should query for updates ag
117117
![Deployment list](https://cloud.githubusercontent.com/assets/116461/11601733/13011d5e-9a8a-11e5-9ce2-b100498ffb34.png)
118118

119119
In order to effectively make use of the `Staging` and `Production` deployments that were created along with your CodePush app, refer to the [multi-deployment testing](../README.md#multi-deployment-testing) docs below before actually moving your app's usage of CodePush into production.
120+
121+
### HTTP exception domains configuration (iOS)
122+
123+
CodePush plugin makes HTTPS requests to the following domains:
124+
125+
- codepush.azurewebsites.net
126+
- codepush.blob.core.windows.net
127+
- codepushupdates.azureedge.net
128+
129+
If you want to change the default HTTP security configuration for any of these domains, you have to define the [`NSAppTransportSecurity` (ATS)][ats] configuration inside your __Info.plist__ file:
130+
131+
```xml
132+
<plist version="1.0">
133+
<dict>
134+
<!-- ...other configs... -->
135+
136+
<key>NSAppTransportSecurity</key>
137+
<dict>
138+
<key>NSExceptionDomains</key>
139+
<dict>
140+
<key>codepush.azurewebsites.net</key>
141+
<dict><!-- read the ATS Apple Docs for available options --></dict>
142+
</dict>
143+
</dict>
144+
145+
<!-- ...other configs... -->
146+
</dict>
147+
</plist>
148+
```
149+
150+
Before doing anything, please [read the docs][ats] first.
151+
152+
[ats]: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33

0 commit comments

Comments
 (0)