Selaa lähdekoodia

Merge branch 'master' into android-download-try-catch

Jamon Holmgren 4 vuotta sitten
vanhempi
commit
407db11fb1
No account linked to committer's email address

+ 5
- 11
.github/workflows/windows-ci.yml Näytä tiedosto

@@ -15,17 +15,10 @@ jobs:
15 15
       with:
16 16
         node-version: '12.9.1'
17 17
 
18
-    - name: Install Visual Studio components
19
-      shell: powershell
20
-      run: .\.github\workflows\scripts\install-vs-features.ps1 Microsoft.VisualStudio.Component.VC.v141.x86.x64,Microsoft.VisualStudio.ComponentGroup.UWP.VC.v141
21
-
22 18
     - name: Setup MSBuild
23 19
       uses: microsoft/setup-msbuild@v1.0.0
24 20
       with:
25 21
         vs-version: 16.5
26
-       
27
-    - name: Setup NuGet
28
-      uses: NuGet/setup-nuget@v1.0.2
29 22
 
30 23
     - name: Check node modules cache
31 24
       uses: actions/cache@v1
@@ -45,13 +38,14 @@ jobs:
45 38
       run: |
46 39
         yarn build
47 40
         yarn tsc
48
- 
49
-    - name: NuGet restore
50
-      run: nuget restore example\windows\WebViewWindows.sln
51 41
 
52 42
     - name: Build x64 release
53
-      run: msbuild example\windows\WebViewWindows.sln /p:Configuration=Release /p:Platform=x64 -m
43
+      shell: powershell
44
+      run: npx react-native run-windows --root example --arch x64 --release --no-packager --no-deploy --logging
54 45
 
46
+    # Workaround for a bug in package searching during deploy.
47
+    # The deploy script only searches windows/{*/bin/x64/Release,Release/*}, but the build step above placed the pakcages at windows/x64/Release.
48
+    # Copy the packages to Windows/Release before deploying.
55 49
     - name: Deploy
56 50
       shell: powershell
57 51
       run: |

+ 9
- 4
android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java Näytä tiedosto

@@ -437,6 +437,11 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
437 437
 
438 438
   @ReactProp(name = "incognito")
439 439
   public void setIncognito(WebView view, boolean enabled) {
440
+    // Don't do anything when incognito is disabled
441
+    if (!enabled) {
442
+      return;
443
+    }
444
+
440 445
     // Remove all previous cookies
441 446
     if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
442 447
       CookieManager.getInstance().removeAllCookies(null);
@@ -446,14 +451,14 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
446 451
 
447 452
     // Disable caching
448 453
     view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
449
-    view.getSettings().setAppCacheEnabled(!enabled);
454
+    view.getSettings().setAppCacheEnabled(false);
450 455
     view.clearHistory();
451
-    view.clearCache(enabled);
456
+    view.clearCache(true);
452 457
 
453 458
     // No form data or autofill enabled
454 459
     view.clearFormData();
455
-    view.getSettings().setSavePassword(!enabled);
456
-    view.getSettings().setSaveFormData(!enabled);
460
+    view.getSettings().setSavePassword(false);
461
+    view.getSettings().setSaveFormData(false);
457 462
   }
458 463
 
459 464
   @ReactProp(name = "source")

+ 1
- 1
apple/RNCWebView.m Näytä tiedosto

@@ -878,7 +878,7 @@ static NSDictionary* customCertificatesForHost;
878 878
  */
879 879
 -(UIViewController *)topViewControllerWithRootViewController:(UIViewController *)viewController{
880 880
   if (viewController==nil) return nil;
881
-  if (viewController.presentedViewController!=nil) {
881
+  if (viewController.presentedViewController!=nil && viewController.presentedViewController.isBeingPresented) {
882 882
     return [self topViewControllerWithRootViewController:viewController.presentedViewController];
883 883
   } else if ([viewController isKindOfClass:[UITabBarController class]]){
884 884
     return [self topViewControllerWithRootViewController:[(UITabBarController *)viewController selectedViewController]];

+ 2
- 0
metro.config.windows.js Näytä tiedosto

@@ -35,6 +35,8 @@ module.exports = {
35 35
       new RegExp(
36 36
         `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
37 37
       ),
38
+      // Avoid error EBUSY: resource busy or locked, open '...\vnext\msbuild.ProjectImports.zip' when building 'vnext\Microsoft.ReactNative.sln' with '/bl'
39
+      /.*\.ProjectImports\.zip/,
38 40
     ]),
39 41
   },
40 42
   transformer: {

+ 1
- 1
package.json Näytä tiedosto

@@ -8,7 +8,7 @@
8 8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
9 9
   ],
10 10
   "license": "MIT",
11
-  "version": "10.4.0",
11
+  "version": "10.4.1",
12 12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13 13
   "scripts": {
14 14
     "start": "node node_modules/react-native/local-cli/cli.js start",