Bladeren bron

Renamed mac test app

Tom Underhill 4 jaren geleden
bovenliggende
commit
fe4e14e51a

+ 4
- 1
example/.gitignore Bestand weergeven

@@ -20,7 +20,10 @@ DerivedData
20 20
 *.hmap
21 21
 *.ipa
22 22
 *.xcuserstate
23
-project.xcworkspace
23
+# exclude project.xcworkspace except for xcshareddata/WorkspaceSettings.xcsettings
24
+project.xcworkspace/*
25
+**/project.xcworkspace/contents.xcworkspacedata
26
+**/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
24 27
 
25 28
 # Android/IntelliJ
26 29
 #

example/macos/RNCWebViewExample-macOS/AppDelegate.h → example/macos/example-macOS/AppDelegate.h Bestand weergeven


example/macos/RNCWebViewExample-macOS/AppDelegate.m → example/macos/example-macOS/AppDelegate.m Bestand weergeven


example/macos/RNCWebViewExample-macOS/Info.plist → example/macos/example-macOS/Info.plist Bestand weergeven


example/macos/RNCWebViewExample-macOS/Main.storyboard → example/macos/example-macOS/Main.storyboard Bestand weergeven

@@ -679,7 +679,7 @@
679 679
         <scene sceneID="R2V-B0-nI4">
680 680
             <objects>
681 681
                 <windowController id="B8D-0N-5wS" sceneMemberID="viewController">
682
-                    <window key="window" title="RNCWebViewExample macOS" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
682
+                    <window key="window" title="example macOS" allowsToolTipsWhenApplicationIsInactive="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
683 683
                         <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
684 684
                         <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
685 685
                         <rect key="contentRect" x="196" y="240" width="480" height="270"/>

example/macos/RNCWebViewExample-macOS/ViewController.h → example/macos/example-macOS/ViewController.h Bestand weergeven


example/macos/RNCWebViewExample-macOS/ViewController.m → example/macos/example-macOS/ViewController.m Bestand weergeven

@@ -16,7 +16,7 @@
16 16
   [super viewDidLoad];
17 17
 
18 18
   RCTBridge *bridge = [((AppDelegate *)[NSApp delegate])bridge];
19
-  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"RNCWebViewExample" initialProperties:nil];
19
+  RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"example" initialProperties:nil];
20 20
 
21 21
   NSView *view = [self view];
22 22
 

example/macos/RNCWebViewExample-macOS/main.m → example/macos/example-macOS/main.m Bestand weergeven


example/macos/RNCWebViewExample.xcodeproj/project.pbxproj → example/macos/example.xcodeproj/project.pbxproj Bestand weergeven

@@ -454,17 +454,17 @@
454 454
 		00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../../node_modules/react-native-macos/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = "<group>"; };
455 455
 		139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../../node_modules/react-native-macos/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = "<group>"; };
456 456
 		139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../../node_modules/react-native-macos/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = "<group>"; };
457
-		13B07F961A680F5B00A75B9A /* RNCWebViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNCWebViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
458
-		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNCWebViewExample/AppDelegate.h; sourceTree = "<group>"; };
459
-		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = RNCWebViewExample/AppDelegate.m; sourceTree = "<group>"; };
457
+		13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; };
458
+		13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = "<group>"; };
459
+		13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = "<group>"; };
460 460
 		13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
461
-		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = RNCWebViewExample/Images.xcassets; sourceTree = "<group>"; };
462
-		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNCWebViewExample/Info.plist; sourceTree = "<group>"; };
463
-		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = RNCWebViewExample/main.m; sourceTree = "<group>"; };
461
+		13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = "<group>"; };
462
+		13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = "<group>"; };
463
+		13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = "<group>"; };
464 464
 		146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../../node_modules/react-native-macos/React/React.xcodeproj"; sourceTree = "<group>"; };
465 465
 		2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
466
-		38C1417223BBE33000902604 /* RNCWebViewExample-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RNCWebViewExample-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
467
-		38C141D123BBE33000902604 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "RNCWebViewExample-macOS/Info.plist"; sourceTree = "<absolute>"; };
466
+		38C1417223BBE33000902604 /* example-macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-macOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
467
+		38C141D123BBE33000902604 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = "example-macOS/Info.plist"; sourceTree = "<absolute>"; };
468 468
 		38C1421523BBE5B500902604 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
469 469
 		38C1421723BBE65C00902604 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
470 470
 		38C1421923BBE66C00902604 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -579,7 +579,7 @@
579 579
 			name = Products;
580 580
 			sourceTree = "<group>";
581 581
 		};
582
-		13B07FAE1A68108700A75B9A /* RNCWebViewExample */ = {
582
+		13B07FAE1A68108700A75B9A /* example */ = {
583 583
 			isa = PBXGroup;
584 584
 			children = (
585 585
 				008F07F21AC5B25A0029DE68 /* main.jsbundle */,
@@ -590,7 +590,7 @@
590 590
 				13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
591 591
 				13B07FB71A68108700A75B9A /* main.m */,
592 592
 			);
593
-			name = RNCWebViewExample;
593
+			name = example;
594 594
 			sourceTree = "<group>";
595 595
 		};
596 596
 		146834001AC3E56700842450 /* Products */ = {
@@ -635,7 +635,7 @@
635 635
 			name = Frameworks;
636 636
 			sourceTree = "<group>";
637 637
 		};
638
-		38C141D223BBE3E600902604 /* RNCWebViewExample-macOS */ = {
638
+		38C141D223BBE3E600902604 /* example-macOS */ = {
639 639
 			isa = PBXGroup;
640 640
 			children = (
641 641
 				38C141D123BBE33000902604 /* Info.plist */,
@@ -646,7 +646,7 @@
646 646
 				38C1421B23BBE70D00902604 /* ViewController.m */,
647 647
 				38C1422123BBE98D00902604 /* Main.storyboard */,
648 648
 			);
649
-			path = "RNCWebViewExample-macOS";
649
+			path = "example-macOS";
650 650
 			sourceTree = "<group>";
651 651
 		};
652 652
 		3DC5395B220F2C940035D3A3 /* Products */ = {
@@ -710,8 +710,8 @@
710 710
 			isa = PBXGroup;
711 711
 			children = (
712 712
 				3DC5395A220F2C940035D3A3 /* RNCWebView.xcodeproj */,
713
-				13B07FAE1A68108700A75B9A /* RNCWebViewExample */,
714
-				38C141D223BBE3E600902604 /* RNCWebViewExample-macOS */,
713
+				13B07FAE1A68108700A75B9A /* example */,
714
+				38C141D223BBE3E600902604 /* example-macOS */,
715 715
 				832341AE1AAA6A7D00B99B32 /* Libraries */,
716 716
 				83CBBA001A601CBA00E9B192 /* Products */,
717 717
 				2D16E6871FA4F8E400B85C8A /* Frameworks */,
@@ -724,8 +724,8 @@
724 724
 		83CBBA001A601CBA00E9B192 /* Products */ = {
725 725
 			isa = PBXGroup;
726 726
 			children = (
727
-				13B07F961A680F5B00A75B9A /* RNCWebViewExample.app */,
728
-				38C1417223BBE33000902604 /* RNCWebViewExample-macOS.app */,
727
+				13B07F961A680F5B00A75B9A /* example.app */,
728
+				38C1417223BBE33000902604 /* example-macOS.app */,
729 729
 			);
730 730
 			name = Products;
731 731
 			sourceTree = "<group>";
@@ -743,9 +743,9 @@
743 743
 /* End PBXGroup section */
744 744
 
745 745
 /* Begin PBXNativeTarget section */
746
-		13B07F861A680F5B00A75B9A /* RNCWebViewExample */ = {
746
+		13B07F861A680F5B00A75B9A /* example */ = {
747 747
 			isa = PBXNativeTarget;
748
-			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNCWebViewExample" */;
748
+			buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */;
749 749
 			buildPhases = (
750 750
 				13B07F871A680F5B00A75B9A /* Sources */,
751 751
 				13B07F8C1A680F5B00A75B9A /* Frameworks */,
@@ -757,14 +757,14 @@
757 757
 			dependencies = (
758 758
 				1990B95222398FC4009E5EA1 /* PBXTargetDependency */,
759 759
 			);
760
-			name = RNCWebViewExample;
760
+			name = example;
761 761
 			productName = "Hello World";
762
-			productReference = 13B07F961A680F5B00A75B9A /* RNCWebViewExample.app */;
762
+			productReference = 13B07F961A680F5B00A75B9A /* example.app */;
763 763
 			productType = "com.apple.product-type.application";
764 764
 		};
765
-		38C1415723BBE33000902604 /* RNCWebViewExample-macOS */ = {
765
+		38C1415723BBE33000902604 /* example-macOS */ = {
766 766
 			isa = PBXNativeTarget;
767
-			buildConfigurationList = 38C1416F23BBE33000902604 /* Build configuration list for PBXNativeTarget "RNCWebViewExample-macOS" */;
767
+			buildConfigurationList = 38C1416F23BBE33000902604 /* Build configuration list for PBXNativeTarget "example-macOS" */;
768 768
 			buildPhases = (
769 769
 				38C1415A23BBE33000902604 /* Sources */,
770 770
 				38C1415D23BBE33000902604 /* Frameworks */,
@@ -776,9 +776,9 @@
776 776
 			dependencies = (
777 777
 				38116A6F23BBED1000ACE311 /* PBXTargetDependency */,
778 778
 			);
779
-			name = "RNCWebViewExample-macOS";
779
+			name = "example-macOS";
780 780
 			productName = "Hello World";
781
-			productReference = 38C1417223BBE33000902604 /* RNCWebViewExample-macOS.app */;
781
+			productReference = 38C1417223BBE33000902604 /* example-macOS.app */;
782 782
 			productType = "com.apple.product-type.application";
783 783
 		};
784 784
 /* End PBXNativeTarget section */
@@ -790,7 +790,7 @@
790 790
 				LastUpgradeCheck = 0940;
791 791
 				ORGANIZATIONNAME = Facebook;
792 792
 			};
793
-			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNCWebViewExample" */;
793
+			buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */;
794 794
 			compatibilityVersion = "Xcode 3.2";
795 795
 			developmentRegion = English;
796 796
 			hasScannedForEncodings = 0;
@@ -854,8 +854,8 @@
854 854
 			);
855 855
 			projectRoot = "";
856 856
 			targets = (
857
-				13B07F861A680F5B00A75B9A /* RNCWebViewExample */,
858
-				38C1415723BBE33000902604 /* RNCWebViewExample-macOS */,
857
+				13B07F861A680F5B00A75B9A /* example */,
858
+				38C1415723BBE33000902604 /* example-macOS */,
859 859
 			);
860 860
 		};
861 861
 /* End PBXProject section */
@@ -1348,7 +1348,7 @@
1348 1348
 				13B07FB21A68108700A75B9A /* Base */,
1349 1349
 			);
1350 1350
 			name = LaunchScreen.xib;
1351
-			path = RNCWebViewExample;
1351
+			path = example;
1352 1352
 			sourceTree = "<group>";
1353 1353
 		};
1354 1354
 /* End PBXVariantGroup section */
@@ -1360,7 +1360,7 @@
1360 1360
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1361 1361
 				CURRENT_PROJECT_VERSION = 1;
1362 1362
 				DEAD_CODE_STRIPPING = NO;
1363
-				INFOPLIST_FILE = RNCWebViewExample/Info.plist;
1363
+				INFOPLIST_FILE = example/Info.plist;
1364 1364
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1365 1365
 				OTHER_LDFLAGS = (
1366 1366
 					"$(inherited)",
@@ -1368,7 +1368,7 @@
1368 1368
 					"-lc++",
1369 1369
 				);
1370 1370
 				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1371
-				PRODUCT_NAME = RNCWebViewExample;
1371
+				PRODUCT_NAME = example;
1372 1372
 				VERSIONING_SYSTEM = "apple-generic";
1373 1373
 			};
1374 1374
 			name = Debug;
@@ -1378,7 +1378,7 @@
1378 1378
 			buildSettings = {
1379 1379
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1380 1380
 				CURRENT_PROJECT_VERSION = 1;
1381
-				INFOPLIST_FILE = RNCWebViewExample/Info.plist;
1381
+				INFOPLIST_FILE = example/Info.plist;
1382 1382
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1383 1383
 				OTHER_LDFLAGS = (
1384 1384
 					"$(inherited)",
@@ -1386,7 +1386,7 @@
1386 1386
 					"-lc++",
1387 1387
 				);
1388 1388
 				PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
1389
-				PRODUCT_NAME = RNCWebViewExample;
1389
+				PRODUCT_NAME = example;
1390 1390
 				VERSIONING_SYSTEM = "apple-generic";
1391 1391
 			};
1392 1392
 			name = Release;
@@ -1397,7 +1397,7 @@
1397 1397
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1398 1398
 				CURRENT_PROJECT_VERSION = 1;
1399 1399
 				DEAD_CODE_STRIPPING = NO;
1400
-				INFOPLIST_FILE = "RNCWebViewExample-macos/Info.plist";
1400
+				INFOPLIST_FILE = "example-macos/Info.plist";
1401 1401
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1402 1402
 				MACOSX_DEPLOYMENT_TARGET = 10.14;
1403 1403
 				OTHER_LDFLAGS = (
@@ -1418,7 +1418,7 @@
1418 1418
 			buildSettings = {
1419 1419
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1420 1420
 				CURRENT_PROJECT_VERSION = 1;
1421
-				INFOPLIST_FILE = "RNCWebViewExample-macos/Info.plist";
1421
+				INFOPLIST_FILE = "example-macos/Info.plist";
1422 1422
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1423 1423
 				MACOSX_DEPLOYMENT_TARGET = 10.14;
1424 1424
 				OTHER_LDFLAGS = (
@@ -1536,7 +1536,7 @@
1536 1536
 /* End XCBuildConfiguration section */
1537 1537
 
1538 1538
 /* Begin XCConfigurationList section */
1539
-		13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "RNCWebViewExample" */ = {
1539
+		13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = {
1540 1540
 			isa = XCConfigurationList;
1541 1541
 			buildConfigurations = (
1542 1542
 				13B07F941A680F5B00A75B9A /* Debug */,
@@ -1545,7 +1545,7 @@
1545 1545
 			defaultConfigurationIsVisible = 0;
1546 1546
 			defaultConfigurationName = Release;
1547 1547
 		};
1548
-		38C1416F23BBE33000902604 /* Build configuration list for PBXNativeTarget "RNCWebViewExample-macOS" */ = {
1548
+		38C1416F23BBE33000902604 /* Build configuration list for PBXNativeTarget "example-macOS" */ = {
1549 1549
 			isa = XCConfigurationList;
1550 1550
 			buildConfigurations = (
1551 1551
 				38C1417023BBE33000902604 /* Debug */,
@@ -1554,7 +1554,7 @@
1554 1554
 			defaultConfigurationIsVisible = 0;
1555 1555
 			defaultConfigurationName = Release;
1556 1556
 		};
1557
-		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "RNCWebViewExample" */ = {
1557
+		83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = {
1558 1558
 			isa = XCConfigurationList;
1559 1559
 			buildConfigurations = (
1560 1560
 				83CBBA201A601CBA00E9B192 /* Debug */,

+ 10
- 0
example/macos/example.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings Bestand weergeven

@@ -0,0 +1,10 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+<plist version="1.0">
4
+<dict>
5
+	<key>BuildSystemType</key>
6
+	<string>Original</string>
7
+	<key>PreviewsEnabled</key>
8
+	<false/>
9
+</dict>
10
+</plist>

example/macos/RNCWebViewExample.xcodeproj/xcshareddata/xcschemes/RNCWebViewExample-macOS.xcscheme → example/macos/example.xcodeproj/xcshareddata/xcschemes/example-macOS.xcscheme Bestand weergeven

@@ -4,8 +4,22 @@
4 4
    version = "1.3">
5 5
    <BuildAction
6 6
       parallelizeBuildables = "NO"
7
-      buildImplicitDependencies = "NO">
7
+      buildImplicitDependencies = "YES">
8 8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "6B857DA21EC51FC600A9D063"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React-macOS"
20
+               ReferencedContainer = "container:../../node_modules/react-native-macos/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9 23
          <BuildActionEntry
10 24
             buildForTesting = "YES"
11 25
             buildForRunning = "YES"
@@ -15,9 +29,9 @@
15 29
             <BuildableReference
16 30
                BuildableIdentifier = "primary"
17 31
                BlueprintIdentifier = "38C1415723BBE33000902604"
18
-               BuildableName = "RNCWebViewExample-macOS.app"
19
-               BlueprintName = "RNCWebViewExample-macOS"
20
-               ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
32
+               BuildableName = "example-macOS.app"
33
+               BlueprintName = "example-macOS"
34
+               ReferencedContainer = "container:example.xcodeproj">
21 35
             </BuildableReference>
22 36
          </BuildActionEntry>
23 37
       </BuildActionEntries>
@@ -45,9 +59,9 @@
45 59
          <BuildableReference
46 60
             BuildableIdentifier = "primary"
47 61
             BlueprintIdentifier = "38C1415723BBE33000902604"
48
-            BuildableName = "RNCWebViewExample-macOS.app"
49
-            BlueprintName = "RNCWebViewExample-macOS"
50
-            ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
62
+            BuildableName = "example-macOS.app"
63
+            BlueprintName = "example-macOS"
64
+            ReferencedContainer = "container:example.xcodeproj">
51 65
          </BuildableReference>
52 66
       </BuildableProductRunnable>
53 67
    </LaunchAction>
@@ -62,9 +76,9 @@
62 76
          <BuildableReference
63 77
             BuildableIdentifier = "primary"
64 78
             BlueprintIdentifier = "38C1415723BBE33000902604"
65
-            BuildableName = "RNCWebViewExample-macOS.app"
66
-            BlueprintName = "RNCWebViewExample-macOS"
67
-            ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
79
+            BuildableName = "example-macOS.app"
80
+            BlueprintName = "example-macOS"
81
+            ReferencedContainer = "container:example.xcodeproj">
68 82
          </BuildableReference>
69 83
       </BuildableProductRunnable>
70 84
    </ProfileAction>

example/macos/RNCWebViewExample.xcodeproj/xcshareddata/xcschemes/RNCWebViewExample.xcscheme → example/macos/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme Bestand weergeven

@@ -3,9 +3,23 @@
3 3
    LastUpgradeVersion = "1120"
4 4
    version = "1.3">
5 5
    <BuildAction
6
-      parallelizeBuildables = "YES"
6
+      parallelizeBuildables = "NO"
7 7
       buildImplicitDependencies = "YES">
8 8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React"
20
+               ReferencedContainer = "container:../../node_modules/react-native-macos/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9 23
          <BuildActionEntry
10 24
             buildForTesting = "YES"
11 25
             buildForRunning = "YES"
@@ -15,9 +29,9 @@
15 29
             <BuildableReference
16 30
                BuildableIdentifier = "primary"
17 31
                BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18
-               BuildableName = "RNCWebViewExample.app"
19
-               BlueprintName = "RNCWebViewExample"
20
-               ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
32
+               BuildableName = "example.app"
33
+               BlueprintName = "example"
34
+               ReferencedContainer = "container:example.xcodeproj">
21 35
             </BuildableReference>
22 36
          </BuildActionEntry>
23 37
       </BuildActionEntries>
@@ -45,9 +59,9 @@
45 59
          <BuildableReference
46 60
             BuildableIdentifier = "primary"
47 61
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
48
-            BuildableName = "RNCWebViewExample.app"
49
-            BlueprintName = "RNCWebViewExample"
50
-            ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
62
+            BuildableName = "example.app"
63
+            BlueprintName = "example"
64
+            ReferencedContainer = "container:example.xcodeproj">
51 65
          </BuildableReference>
52 66
       </BuildableProductRunnable>
53 67
    </LaunchAction>
@@ -62,9 +76,9 @@
62 76
          <BuildableReference
63 77
             BuildableIdentifier = "primary"
64 78
             BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
65
-            BuildableName = "RNCWebViewExample.app"
66
-            BlueprintName = "RNCWebViewExample"
67
-            ReferencedContainer = "container:RNCWebViewExample.xcodeproj">
79
+            BuildableName = "example.app"
80
+            BlueprintName = "example"
81
+            ReferencedContainer = "container:example.xcodeproj">
68 82
          </BuildableReference>
69 83
       </BuildableProductRunnable>
70 84
    </ProfileAction>

example/macos/RNCWebViewExample/AppDelegate.h → example/macos/example/AppDelegate.h Bestand weergeven

@@ -11,6 +11,5 @@
11 11
 @interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
12 12
 
13 13
 @property (nonatomic, strong) UIWindow *window;
14
-@property (nonatomic, strong) NSMutableDictionary<NSString *, NSString *> *memoryStorage;
15 14
 
16 15
 @end

example/macos/RNCWebViewExample/AppDelegate.m → example/macos/example/AppDelegate.m Bestand weergeven

@@ -8,23 +8,19 @@
8 8
 #import "AppDelegate.h"
9 9
 
10 10
 #import <React/RCTBridge.h>
11
-
12 11
 #import <React/RCTBundleURLProvider.h>
13
-#import <React/RCTDevMenu.h>
14 12
 #import <React/RCTRootView.h>
15 13
 
16
-@implementation AppDelegate {
17
-  __weak RCTBridge *_bridge;
18
-}
14
+@implementation AppDelegate
19 15
 
20 16
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
21 17
 {
22 18
   RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
23 19
   RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
24
-                                                   moduleName:@"RNCWebViewExample"
20
+                                                   moduleName:@"example"
25 21
                                             initialProperties:nil];
26 22
 
27
-  rootView.backgroundColor = [UIColor blackColor];
23
+  rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 24
 
29 25
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 26
   UIViewController *rootViewController = [UIViewController new];
@@ -36,11 +32,11 @@
36 32
 
37 33
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
38 34
 {
39
-  #if DEBUG
40
-    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:nil];
41
-  #else
42
-    return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
43
-  #endif
35
+#if DEBUG
36
+  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:nil];
37
+#else
38
+  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
39
+#endif
44 40
 }
45 41
 
46 42
 @end

example/macos/RNCWebViewExample/Base.lproj/LaunchScreen.xib → example/macos/example/Base.lproj/LaunchScreen.xib Bestand weergeven

@@ -18,7 +18,7 @@
18 18
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19 19
                     <nil key="highlightedColor"/>
20 20
                 </label>
21
-                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="RNCWebViewExample" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21
+                <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22 22
                     <rect key="frame" x="20" y="140" width="441" height="43"/>
23 23
                     <fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24 24
                     <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>

example/macos/RNCWebViewExample/Images.xcassets/AppIcon.appiconset/Contents.json → example/macos/example/Images.xcassets/AppIcon.appiconset/Contents.json Bestand weergeven


example/macos/RNCWebViewExample/Images.xcassets/Contents.json → example/macos/example/Images.xcassets/Contents.json Bestand weergeven


example/macos/RNCWebViewExample/Info.plist → example/macos/example/Info.plist Bestand weergeven

@@ -5,7 +5,7 @@
5 5
 	<key>CFBundleDevelopmentRegion</key>
6 6
 	<string>en</string>
7 7
 	<key>CFBundleDisplayName</key>
8
-	<string>RNCWebViewExample</string>
8
+	<string>example</string>
9 9
 	<key>CFBundleExecutable</key>
10 10
 	<string>$(EXECUTABLE_NAME)</string>
11 11
 	<key>CFBundleIdentifier</key>
@@ -20,19 +20,6 @@
20 20
 	<string>1.0</string>
21 21
 	<key>CFBundleSignature</key>
22 22
 	<string>????</string>
23
-	<key>CFBundleURLTypes</key>
24
-	<array>
25
-		<dict>
26
-			<key>CFBundleTypeRole</key>
27
-			<string>Editor</string>
28
-			<key>CFBundleURLName</key>
29
-			<string>org.reactjs.native.example.RNCWebViewExample</string>
30
-			<key>CFBundleURLSchemes</key>
31
-			<array>
32
-				<string>rnc-webview</string>
33
-			</array>
34
-		</dict>
35
-	</array>
36 23
 	<key>CFBundleVersion</key>
37 24
 	<string>1</string>
38 25
 	<key>LSRequiresIPhoneOS</key>

example/macos/RNCWebViewExample/main.m → example/macos/example/main.m Bestand weergeven


+ 29
- 29
macos/RNCWebView.xcodeproj/project.pbxproj Bestand weergeven

@@ -7,12 +7,12 @@
7 7
 	objects = {
8 8
 
9 9
 /* Begin PBXBuildFile section */
10
-		3515965E21A3C86000623BFA /* RNCWKProcessPoolManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3515965D21A3C86000623BFA /* RNCWKProcessPoolManager.m */; };
11
-		38116A2B23BBECB700ACE311 /* RNCWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351B21446E6C00F9801F /* RNCWebViewManager.m */; };
12
-		38116A2C23BBECB700ACE311 /* RNCWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351C21446E6C00F9801F /* RNCWebView.m */; };
13
-		38116A2D23BBECB700ACE311 /* RNCWKProcessPoolManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3515965D21A3C86000623BFA /* RNCWKProcessPoolManager.m */; };
14
-		E91B351D21446E6C00F9801F /* RNCWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351B21446E6C00F9801F /* RNCWebViewManager.m */; };
15
-		E91B351E21446E6C00F9801F /* RNCWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351C21446E6C00F9801F /* RNCWebView.m */; };
10
+		3515965E21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3515965D21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m */; };
11
+		38116A2B23BBECB700ACE311 /* ../ios/RNCWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351B21446E6C00F9801F /* ../ios/RNCWebViewManager.m */; };
12
+		38116A2C23BBECB700ACE311 /* ../ios/RNCWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351C21446E6C00F9801F /* ../ios/RNCWebView.m */; };
13
+		38116A2D23BBECB700ACE311 /* ../ios/RNCWKProcessPoolManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 3515965D21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m */; };
14
+		E91B351D21446E6C00F9801F /* ../ios/RNCWebViewManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351B21446E6C00F9801F /* ../ios/RNCWebViewManager.m */; };
15
+		E91B351E21446E6C00F9801F /* ../ios/RNCWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E91B351C21446E6C00F9801F /* ../ios/RNCWebView.m */; };
16 16
 /* End PBXBuildFile section */
17 17
 
18 18
 /* Begin PBXCopyFilesBuildPhase section */
@@ -38,13 +38,13 @@
38 38
 
39 39
 /* Begin PBXFileReference section */
40 40
 		134814201AA4EA6300B7C361 /* libRNCWebView.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNCWebView.a; sourceTree = BUILT_PRODUCTS_DIR; };
41
-		3515965D21A3C86000623BFA /* RNCWKProcessPoolManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWKProcessPoolManager.m; sourceTree = "<group>"; };
42
-		3515965F21A3C87E00623BFA /* RNCWKProcessPoolManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWKProcessPoolManager.h; sourceTree = "<group>"; };
41
+		3515965D21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWKProcessPoolManager.m; sourceTree = "<group>"; };
42
+		3515965F21A3C87E00623BFA /* ../ios/RNCWKProcessPoolManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWKProcessPoolManager.h; sourceTree = "<group>"; };
43 43
 		38116A3323BBECB700ACE311 /* libRNCWebView-macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libRNCWebView-macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
44
-		E91B351921446E6C00F9801F /* RNCWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWebViewManager.h; sourceTree = "<group>"; };
45
-		E91B351A21446E6C00F9801F /* RNCWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWebView.h; sourceTree = "<group>"; };
46
-		E91B351B21446E6C00F9801F /* RNCWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWebViewManager.m; sourceTree = "<group>"; };
47
-		E91B351C21446E6C00F9801F /* RNCWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWebView.m; sourceTree = "<group>"; };
44
+		E91B351921446E6C00F9801F /* ../ios/RNCWebViewManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWebViewManager.h; sourceTree = "<group>"; };
45
+		E91B351A21446E6C00F9801F /* ../ios/RNCWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ../ios/RNCWebView.h; sourceTree = "<group>"; };
46
+		E91B351B21446E6C00F9801F /* ../ios/RNCWebViewManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWebViewManager.m; sourceTree = "<group>"; };
47
+		E91B351C21446E6C00F9801F /* ../ios/RNCWebView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ../ios/RNCWebView.m; sourceTree = "<group>"; };
48 48
 /* End PBXFileReference section */
49 49
 
50 50
 /* Begin PBXFrameworksBuildPhase section */
@@ -76,12 +76,12 @@
76 76
 		58B511D21A9E6C8500147676 = {
77 77
 			isa = PBXGroup;
78 78
 			children = (
79
-				E91B351A21446E6C00F9801F /* RNCWebView.h */,
80
-				E91B351C21446E6C00F9801F /* RNCWebView.m */,
81
-				E91B351921446E6C00F9801F /* RNCWebViewManager.h */,
82
-				E91B351B21446E6C00F9801F /* RNCWebViewManager.m */,
83
-				3515965D21A3C86000623BFA /* RNCWKProcessPoolManager.m */,
84
-				3515965F21A3C87E00623BFA /* RNCWKProcessPoolManager.h */,
79
+				E91B351A21446E6C00F9801F /* ../ios/RNCWebView.h */,
80
+				E91B351C21446E6C00F9801F /* ../ios/RNCWebView.m */,
81
+				E91B351921446E6C00F9801F /* ../ios/RNCWebViewManager.h */,
82
+				E91B351B21446E6C00F9801F /* ../ios/RNCWebViewManager.m */,
83
+				3515965D21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m */,
84
+				3515965F21A3C87E00623BFA /* ../ios/RNCWKProcessPoolManager.h */,
85 85
 				134814211AA4EA7D00B7C361 /* Products */,
86 86
 				38116A3323BBECB700ACE311 /* libRNCWebView-macOS.a */,
87 87
 			);
@@ -161,9 +161,9 @@
161 161
 			isa = PBXSourcesBuildPhase;
162 162
 			buildActionMask = 2147483647;
163 163
 			files = (
164
-				38116A2B23BBECB700ACE311 /* RNCWebViewManager.m in Sources */,
165
-				38116A2C23BBECB700ACE311 /* RNCWebView.m in Sources */,
166
-				38116A2D23BBECB700ACE311 /* RNCWKProcessPoolManager.m in Sources */,
164
+				38116A2B23BBECB700ACE311 /* ../ios/RNCWebViewManager.m in Sources */,
165
+				38116A2C23BBECB700ACE311 /* ../ios/RNCWebView.m in Sources */,
166
+				38116A2D23BBECB700ACE311 /* ../ios/RNCWKProcessPoolManager.m in Sources */,
167 167
 			);
168 168
 			runOnlyForDeploymentPostprocessing = 0;
169 169
 		};
@@ -171,9 +171,9 @@
171 171
 			isa = PBXSourcesBuildPhase;
172 172
 			buildActionMask = 2147483647;
173 173
 			files = (
174
-				E91B351D21446E6C00F9801F /* RNCWebViewManager.m in Sources */,
175
-				E91B351E21446E6C00F9801F /* RNCWebView.m in Sources */,
176
-				3515965E21A3C86000623BFA /* RNCWKProcessPoolManager.m in Sources */,
174
+				E91B351D21446E6C00F9801F /* ../ios/RNCWebViewManager.m in Sources */,
175
+				E91B351E21446E6C00F9801F /* ../ios/RNCWebView.m in Sources */,
176
+				3515965E21A3C86000623BFA /* ../ios/RNCWKProcessPoolManager.m in Sources */,
177 177
 			);
178 178
 			runOnlyForDeploymentPostprocessing = 0;
179 179
 		};
@@ -183,10 +183,10 @@
183 183
 		38116A3123BBECB700ACE311 /* Debug */ = {
184 184
 			isa = XCBuildConfiguration;
185 185
 			buildSettings = {
186
-				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/**";
186
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/React/**";
187 187
 				HEADER_SEARCH_PATHS = (
188 188
 					"$(inherited)",
189
-					"$(SRCROOT)/../node_modules/react-native/React/**",
189
+					"$(SRCROOT)/../node_modules/react-native-macos/React/**",
190 190
 				);
191 191
 				LIBRARY_SEARCH_PATHS = "$(inherited)";
192 192
 				MACOSX_DEPLOYMENT_TARGET = 10.14;
@@ -200,7 +200,7 @@
200 200
 		38116A3223BBECB700ACE311 /* Release */ = {
201 201
 			isa = XCBuildConfiguration;
202 202
 			buildSettings = {
203
-				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/**";
203
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/React/**";
204 204
 				HEADER_SEARCH_PATHS = (
205 205
 					"$(inherited)",
206 206
 					"$(SRCROOT)/../node_modules/react-native-macos/React/**",
@@ -298,7 +298,7 @@
298 298
 		58B511F01A9E6C8500147676 /* Debug */ = {
299 299
 			isa = XCBuildConfiguration;
300 300
 			buildSettings = {
301
-				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/**";
301
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/React/**";
302 302
 				HEADER_SEARCH_PATHS = (
303 303
 					"$(inherited)",
304 304
 					"$(SRCROOT)/../node_modules/react-native-macos/React/**",
@@ -314,7 +314,7 @@
314 314
 		58B511F11A9E6C8500147676 /* Release */ = {
315 315
 			isa = XCBuildConfiguration;
316 316
 			buildSettings = {
317
-				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/**";
317
+				FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../node_modules/react-native-macos/React/**";
318 318
 				HEADER_SEARCH_PATHS = (
319 319
 					"$(inherited)",
320 320
 					"$(SRCROOT)/../node_modules/react-native-macos/React/**",

+ 1
- 1
package.json Bestand weergeven

@@ -12,9 +12,9 @@
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",
15
-    "start-macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
16 15
     "start:android": "react-native run-android --root example/",
17 16
     "start:ios": "react-native run-ios --project-path example/ios --scheme example",
17
+    "start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
18 18
     "ci": "CI=true && yarn lint && yarn test",
19 19
     "ci:publish": "yarn semantic-release",
20 20
     "lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",

+ 19
- 2
react-native.config.js Bestand weergeven

@@ -1,7 +1,24 @@
1
+/**
2
+ * This cli config is needed for the coexistance of react-native and other
3
+ * out-of-tree implementations such react-native-macos.
4
+ * The following issue is tracked by
5
+ * https://github.com/react-native-community/discussions-and-proposals/issues/182
6
+ *
7
+ * The work-around involves having a metro.config.js for each out-of-tree
8
+ * platform, i.e. metro.config.js for react-native and 
9
+ * metro.config.macos.js for react-native-macos.
10
+ * This react-native.config.js looks for a --use-react-native-macos
11
+ * switch and when present pushes --config=metro.config.macos.js 
12
+ * and specifies reactNativePath: 'node_modules/react-native-macos'.
13
+ * The metro.config.js has to blacklist 'node_modules/react-native-macos', 
14
+ * and conversely metro.config.macos.js has to blacklist 'node_modules/react-native'.
15
+ */
1 16
 'use strict';
2 17
 
3
-if (process.argv.includes('--use-react-native-macos')) {
4
-  process.argv = process.argv.filter(arg => arg !== '--use-react-native-macos');
18
+const macSwitch = '--use-react-native-macos';
19
+
20
+if (process.argv.includes(macSwitch)) {
21
+  process.argv = process.argv.filter(arg => arg !== macSwitch);
5 22
   process.argv.push('--config=metro.config.macos.js');
6 23
   module.exports = {
7 24
     reactNativePath: 'node_modules/react-native-macos',

+ 126
- 1
yarn.lock Bestand weergeven

@@ -6043,6 +6043,16 @@ metro-babel7-plugin-react-transform@0.54.1:
6043 6043
   dependencies:
6044 6044
     "@babel/helper-module-imports" "^7.0.0"
6045 6045
 
6046
+metro-cache@0.54.1:
6047
+  version "0.54.1"
6048
+  resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.54.1.tgz#2e9017cbd11106837b8c385c9eb8c8175469a8c1"
6049
+  integrity sha512-RxCFoNcANHXZYi4MIQNnqh68gUnC3bMpzCFJY5pBoqqdrkkn8ibYglBweA0/DW7hx1OZTJWelwS1Dp8xxmE2CA==
6050
+  dependencies:
6051
+    jest-serializer "^24.4.0"
6052
+    metro-core "0.54.1"
6053
+    mkdirp "^0.5.1"
6054
+    rimraf "^2.5.4"
6055
+
6046 6056
 metro-cache@^0.56.4:
6047 6057
   version "0.56.4"
6048 6058
   resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.56.4.tgz#542f9f8a35f8fb9d5576f46fd3ab4d4f42851a7e"
@@ -6053,6 +6063,18 @@ metro-cache@^0.56.4:
6053 6063
     mkdirp "^0.5.1"
6054 6064
     rimraf "^2.5.4"
6055 6065
 
6066
+metro-config@0.54.1, metro-config@^0.54.1:
6067
+  version "0.54.1"
6068
+  resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.54.1.tgz#808b4e17625d9f4e9afa34232778fdf8e63cc8dd"
6069
+  integrity sha512-FpxrA+63rGkPGvGI653dvuSreJzU+eOTILItVnnhmqwn2SAK5V00N/qGTOIJe2YIuWEFXwCzw9lXmANrXbwuGg==
6070
+  dependencies:
6071
+    cosmiconfig "^5.0.5"
6072
+    jest-validate "^24.7.0"
6073
+    metro "0.54.1"
6074
+    metro-cache "0.54.1"
6075
+    metro-core "0.54.1"
6076
+    pretty-format "^24.7.0"
6077
+
6056 6078
 metro-config@^0.56.0, metro-config@^0.56.4:
6057 6079
   version "0.56.4"
6058 6080
   resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.56.4.tgz#338fd8165fba59424cec427c1a881757945e57e9"
@@ -6065,6 +6087,16 @@ metro-config@^0.56.0, metro-config@^0.56.4:
6065 6087
     metro-core "^0.56.4"
6066 6088
     pretty-format "^24.7.0"
6067 6089
 
6090
+metro-core@0.54.1, metro-core@^0.54.1:
6091
+  version "0.54.1"
6092
+  resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.54.1.tgz#17f6ecc167918da8819d4af5726349e55714954b"
6093
+  integrity sha512-8oz3Ck7QFBzW9dG9tKFhrXHKPu2Ajx3R7eatf61Gl6Jf/tF7PNouv3wHxPsJW3oXDFiwKLszd89+OgleTGkB5g==
6094
+  dependencies:
6095
+    jest-haste-map "^24.7.1"
6096
+    lodash.throttle "^4.1.1"
6097
+    metro-resolver "0.54.1"
6098
+    wordwrap "^1.0.0"
6099
+
6068 6100
 metro-core@^0.56.0, metro-core@^0.56.4:
6069 6101
   version "0.56.4"
6070 6102
   resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.56.4.tgz#67cc41b3c0bf66e9c2306f50239a1080b1e82312"
@@ -6075,6 +6107,17 @@ metro-core@^0.56.0, metro-core@^0.56.4:
6075 6107
     metro-resolver "^0.56.4"
6076 6108
     wordwrap "^1.0.0"
6077 6109
 
6110
+metro-inspector-proxy@0.54.1:
6111
+  version "0.54.1"
6112
+  resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.54.1.tgz#0ef48ee3feb11c6da47aa100151a9bf2a7c358ee"
6113
+  integrity sha512-sf6kNu7PgFW6U+hU7YGZfbAUKAPVvCJhY8YVu/A1RMKH9nNULrCo+jlWh0gWgmFfWRQiAPCElevROg+5somk8A==
6114
+  dependencies:
6115
+    connect "^3.6.5"
6116
+    debug "^2.2.0"
6117
+    rxjs "^5.4.3"
6118
+    ws "^1.1.5"
6119
+    yargs "^9.0.0"
6120
+
6078 6121
 metro-inspector-proxy@^0.56.4:
6079 6122
   version "0.56.4"
6080 6123
   resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.56.4.tgz#7343ff3c5908af4fd99e96b6d646e24e99816be4"
@@ -6086,6 +6129,13 @@ metro-inspector-proxy@^0.56.4:
6086 6129
     ws "^1.1.5"
6087 6130
     yargs "^9.0.0"
6088 6131
 
6132
+metro-minify-uglify@0.54.1:
6133
+  version "0.54.1"
6134
+  resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.54.1.tgz#54ed1cb349245ce82dba8cc662bbf69fbca142c3"
6135
+  integrity sha512-z+pOPna/8IxD4OhjW6Xo1mV2EszgqqQHqBm1FdmtdF6IpWkQp33qpDBNEi9NGZTOr7pp2bvcxZnvNJdC2lrK9Q==
6136
+  dependencies:
6137
+    uglify-es "^3.1.9"
6138
+
6089 6139
 metro-minify-uglify@^0.56.4:
6090 6140
   version "0.56.4"
6091 6141
   resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.56.4.tgz#13589dfb1d43343608aacb7f78ddfcc052daa63c"
@@ -6176,7 +6226,7 @@ metro-react-native-babel-preset@^0.56.4:
6176 6226
     "@babel/template" "^7.0.0"
6177 6227
     react-refresh "^0.4.0"
6178 6228
 
6179
-metro-react-native-babel-transformer@0.54.1:
6229
+metro-react-native-babel-transformer@0.54.1, metro-react-native-babel-transformer@^0.54.1:
6180 6230
   version "0.54.1"
6181 6231
   resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.54.1.tgz#45b56db004421134e10e739f69e8de50775fef17"
6182 6232
   integrity sha512-ECw7xG91t8dk/PHdiyoC5SP1s9OQzfmJzG5m0YOZaKtHMe534qTDbncxaKfTI3CP99yti2maXFBRVj+xyvph/g==
@@ -6197,6 +6247,13 @@ metro-react-native-babel-transformer@^0.56.0:
6197 6247
     metro-react-native-babel-preset "^0.56.4"
6198 6248
     metro-source-map "^0.56.4"
6199 6249
 
6250
+metro-resolver@0.54.1:
6251
+  version "0.54.1"
6252
+  resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.54.1.tgz#0295b38624b678b88b16bf11d47288845132b087"
6253
+  integrity sha512-Byv1LIawYAASy9CFRwzrncYnqaFGLe8vpw178EtzStqP05Hu6hXSqkNTrfoXa+3V9bPFGCrVzFx2NY3gFp2btg==
6254
+  dependencies:
6255
+    absolute-path "^0.0.0"
6256
+
6200 6257
 metro-resolver@^0.56.4:
6201 6258
   version "0.56.4"
6202 6259
   resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.56.4.tgz#9876f57bca37fd1bfcffd733541e2ee4a89fad7f"
@@ -6204,6 +6261,15 @@ metro-resolver@^0.56.4:
6204 6261
   dependencies:
6205 6262
     absolute-path "^0.0.0"
6206 6263
 
6264
+metro-source-map@0.54.1:
6265
+  version "0.54.1"
6266
+  resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.54.1.tgz#e17bad53c11978197d3c05c9168d799c2e04dcc5"
6267
+  integrity sha512-E9iSYMSUSq5qYi1R2hTQtxH4Mxjzfgr/jaSmQIWi7h3fG2P1qOZNNSzeaeUeTK+s2N/ksVlkcL5kMikol8CDrQ==
6268
+  dependencies:
6269
+    "@babel/traverse" "^7.0.0"
6270
+    "@babel/types" "^7.0.0"
6271
+    source-map "^0.5.6"
6272
+
6207 6273
 metro-source-map@0.55.0, metro-source-map@^0.55.0:
6208 6274
   version "0.55.0"
6209 6275
   resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.55.0.tgz#1f6289905f08277c398f2b9b9c13e7e0e5a6f540"
@@ -6251,6 +6317,65 @@ metro-symbolicate@^0.56.4:
6251 6317
     through2 "^2.0.1"
6252 6318
     vlq "^1.0.0"
6253 6319
 
6320
+metro@0.54.1, metro@^0.54.1:
6321
+  version "0.54.1"
6322
+  resolved "https://registry.yarnpkg.com/metro/-/metro-0.54.1.tgz#a629be00abee5a450a25a8f71c24745f70cc9b44"
6323
+  integrity sha512-6ODPT4mEo4FCpbExRNnQAcZmf1VeNvYOTMj2Na03FjGqhNODHhI2U/wF/Ul5gqTyJ2dVdkXeyvKW3gl/LrnJRg==
6324
+  dependencies:
6325
+    "@babel/core" "^7.0.0"
6326
+    "@babel/generator" "^7.0.0"
6327
+    "@babel/parser" "^7.0.0"
6328
+    "@babel/plugin-external-helpers" "^7.0.0"
6329
+    "@babel/template" "^7.0.0"
6330
+    "@babel/traverse" "^7.0.0"
6331
+    "@babel/types" "^7.0.0"
6332
+    absolute-path "^0.0.0"
6333
+    async "^2.4.0"
6334
+    babel-preset-fbjs "^3.1.2"
6335
+    buffer-crc32 "^0.2.13"
6336
+    chalk "^2.4.1"
6337
+    concat-stream "^1.6.0"
6338
+    connect "^3.6.5"
6339
+    debug "^2.2.0"
6340
+    denodeify "^1.2.1"
6341
+    eventemitter3 "^3.0.0"
6342
+    fbjs "^1.0.0"
6343
+    fs-extra "^1.0.0"
6344
+    graceful-fs "^4.1.3"
6345
+    image-size "^0.6.0"
6346
+    invariant "^2.2.4"
6347
+    jest-haste-map "^24.7.1"
6348
+    jest-worker "^24.6.0"
6349
+    json-stable-stringify "^1.0.1"
6350
+    lodash.throttle "^4.1.1"
6351
+    merge-stream "^1.0.1"
6352
+    metro-babel-register "0.54.1"
6353
+    metro-babel-transformer "0.54.1"
6354
+    metro-cache "0.54.1"
6355
+    metro-config "0.54.1"
6356
+    metro-core "0.54.1"
6357
+    metro-inspector-proxy "0.54.1"
6358
+    metro-minify-uglify "0.54.1"
6359
+    metro-react-native-babel-preset "0.54.1"
6360
+    metro-resolver "0.54.1"
6361
+    metro-source-map "0.54.1"
6362
+    mime-types "2.1.11"
6363
+    mkdirp "^0.5.1"
6364
+    node-fetch "^2.2.0"
6365
+    nullthrows "^1.1.0"
6366
+    react-transform-hmr "^1.0.4"
6367
+    resolve "^1.5.0"
6368
+    rimraf "^2.5.4"
6369
+    serialize-error "^2.1.0"
6370
+    source-map "^0.5.6"
6371
+    temp "0.8.3"
6372
+    throat "^4.1.0"
6373
+    wordwrap "^1.0.0"
6374
+    write-file-atomic "^1.2.0"
6375
+    ws "^1.1.5"
6376
+    xpipe "^1.0.5"
6377
+    yargs "^9.0.0"
6378
+
6254 6379
 metro@^0.56.0, metro@^0.56.4:
6255 6380
   version "0.56.4"
6256 6381
   resolved "https://registry.yarnpkg.com/metro/-/metro-0.56.4.tgz#be7e1380ee6ac3552c25ead8098eab261029e4d7"