diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2fc36ca17..67a18d1b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,11 +43,11 @@ jobs: set -eo pipefail yarn build:ios pod install --project-directory=ios - ../scripts/xcodebuild-ios.sh ios/Example.xcworkspace build-for-testing + ../scripts/xcodebuild.sh ios/Example.xcworkspace build-for-testing working-directory: example - name: Test run: | - ../scripts/xcodebuild-ios.sh ios/Example.xcworkspace test-without-building + ../scripts/xcodebuild.sh ios/Example.xcworkspace test-without-building working-directory: example ios-template: name: "iOS [template]" @@ -67,10 +67,10 @@ jobs: yarn build:ios if [[ ${{ matrix.template }} == ios ]]; then pod install - ../scripts/xcodebuild-ios.sh TemplateExample.xcworkspace build + ../scripts/xcodebuild.sh TemplateExample.xcworkspace build else pod install --project-directory=ios - ../scripts/xcodebuild-ios.sh ios/TemplateExample.xcworkspace build + ../scripts/xcodebuild.sh ios/TemplateExample.xcworkspace build fi working-directory: template-example android: @@ -141,6 +141,24 @@ jobs: ./gradlew clean build check test shell: bash working-directory: template-example + macos: + name: "macOS" + runs-on: macos-latest + if: "!contains(github.event.head_commit.message, '[skip ci]')" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install + run: | + yarn + working-directory: example + - name: Build + run: | + set -eo pipefail + yarn build:macos + pod install --project-directory=macos + ../scripts/xcodebuild.sh macos/Example.xcworkspace build + working-directory: example release: needs: [ @@ -149,6 +167,7 @@ jobs: ios-template, android, android-template, + macos ] runs-on: macos-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" diff --git a/README.md b/README.md index cca1ba1da..c182e4ac4 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,18 @@ pod install --project-directory=ios open ios/Example.xcworkspace ``` +## macOS + +```bash +# Bundle the JS first so CocoaPods can +# find the assets. +yarn build:macos +pod install --project-directory=macos + +# Finally, open the Xcode workspace. +open macos/Example.xcworkspace +``` + # Known Issues ## Invalid `Podfile` file: undefined method `[]' for nil:NilClass diff --git a/ReactTestApp-DevSupport.podspec b/ReactTestApp-DevSupport.podspec index 2e179dcf7..729a78bf6 100644 --- a/ReactTestApp-DevSupport.podspec +++ b/ReactTestApp-DevSupport.podspec @@ -13,6 +13,7 @@ Pod::Spec.new do |s| s.summary = package['description'] s.ios.deployment_target = '12.0' + s.osx.deployment_target = '10.14' s.source_files = 'ios/ReactTestApp/Public/*.h' s.public_header_files = 'ios/ReactTestApp/Public/*.h' diff --git a/example/app.json b/example/app.json index 37885e44f..44e4ddf8a 100644 --- a/example/app.json +++ b/example/app.json @@ -12,6 +12,10 @@ "dist/assets", "dist/main.jsbundle" ], + "macos": [ + "dist/assets", + "dist/main.jsbundle" + ], "android": [ "dist/res", "dist/main.jsbundle" diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index dc11b1806..fef4b1c9c 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -195,7 +195,7 @@ SPEC CHECKSUMS: React-RCTText: d91537e29e38dc69cf09cbca0875cf5dc7402da6 React-RCTVibration: 7655d72dfb919dd6d8e135ca108a5a2bd9fcd7b4 React-RCTWebSocket: 7cd2c8d0f8ddd680dc76404defba7ab1f56b83af - ReactTestApp-DevSupport: ac31b3ca3ffbf3fe674a1364d96d189897db2fef + ReactTestApp-DevSupport: 4bc3104215b749fe64dc0b6f602fb13558d9deb6 ReactTestApp-Resources: c070f72dfcb2806d922eec6656259cbf7a4d2bcf SwiftLint: 55e96a4a4d537d4a3156859fc1c54bd24851a046 yoga: 5079887aa3e4c62142d6bcee493022643ee4d730 diff --git a/example/macos/Podfile b/example/macos/Podfile new file mode 100644 index 000000000..57df3906d --- /dev/null +++ b/example/macos/Podfile @@ -0,0 +1,5 @@ +require_relative '../node_modules/react-native-test-app/macos/test_app.rb' + +workspace 'Example.xcworkspace' + +use_test_app! diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock new file mode 100644 index 000000000..79e3e2a2a --- /dev/null +++ b/example/macos/Podfile.lock @@ -0,0 +1,203 @@ +PODS: + - boost-for-react-native (1.63.0) + - DoubleConversion (1.1.6) + - Folly (2018.10.22.00): + - boost-for-react-native + - DoubleConversion + - Folly/Default (= 2018.10.22.00) + - glog + - Folly/Default (2018.10.22.00): + - boost-for-react-native + - DoubleConversion + - glog + - glog (0.3.5) + - React (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-DevSupport (= 0.60.0-microsoft.79) + - React-RCTActionSheet (= 0.60.0-microsoft.79) + - React-RCTAnimation (= 0.60.0-microsoft.79) + - React-RCTBlob (= 0.60.0-microsoft.79) + - React-RCTImage (= 0.60.0-microsoft.79) + - React-RCTLinking (= 0.60.0-microsoft.79) + - React-RCTNetwork (= 0.60.0-microsoft.79) + - React-RCTSettings (= 0.60.0-microsoft.79) + - React-RCTText (= 0.60.0-microsoft.79) + - React-RCTVibration (= 0.60.0-microsoft.79) + - React-RCTWebSocket (= 0.60.0-microsoft.79) + - React-Core (0.60.0-microsoft.79): + - Folly (= 2018.10.22.00) + - React-cxxreact (= 0.60.0-microsoft.79) + - React-jsiexecutor (= 0.60.0-microsoft.79) + - yoga (= 0.60.0-microsoft.79.React) + - React-cxxreact (0.60.0-microsoft.79): + - boost-for-react-native (= 1.63.0) + - DoubleConversion + - Folly (= 2018.10.22.00) + - glog + - React-jsinspector (= 0.60.0-microsoft.79) + - React-DevSupport (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTWebSocket (= 0.60.0-microsoft.79) + - React-fishhook (0.60.0-microsoft.79) + - React-jsi (0.60.0-microsoft.79): + - boost-for-react-native (= 1.63.0) + - DoubleConversion + - Folly (= 2018.10.22.00) + - glog + - React-jsi/Default (= 0.60.0-microsoft.79) + - React-jsi/Default (0.60.0-microsoft.79): + - boost-for-react-native (= 1.63.0) + - DoubleConversion + - Folly (= 2018.10.22.00) + - glog + - React-jsiexecutor (0.60.0-microsoft.79): + - DoubleConversion + - Folly (= 2018.10.22.00) + - glog + - React-cxxreact (= 0.60.0-microsoft.79) + - React-jsi (= 0.60.0-microsoft.79) + - React-jsinspector (0.60.0-microsoft.79) + - React-RCTActionSheet (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTAnimation (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTBlob (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTNetwork (= 0.60.0-microsoft.79) + - React-RCTWebSocket (= 0.60.0-microsoft.79) + - React-RCTImage (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTNetwork (= 0.60.0-microsoft.79) + - React-RCTLinking (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTNetwork (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTSettings (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTText (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTVibration (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-RCTWebSocket (0.60.0-microsoft.79): + - React-Core (= 0.60.0-microsoft.79) + - React-fishhook (= 0.60.0-microsoft.79) + - ReactTestApp-DevSupport (0.0.15) + - ReactTestApp-Resources (1.0.0-dev) + - SwiftLint (0.39.2) + - yoga (0.60.0-microsoft.79.React) + +DEPENDENCIES: + - boost-for-react-native (from `../node_modules/react-native-macos/third-party-podspecs/boost-for-react-native.podspec`) + - DoubleConversion (from `../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec`) + - Folly (from `../node_modules/react-native-macos/third-party-podspecs/Folly.podspec`) + - glog (from `../node_modules/react-native-macos/third-party-podspecs/glog.podspec`) + - React (from `../node_modules/react-native-macos`) + - React-Core (from `../node_modules/react-native-macos/React`) + - React-cxxreact (from `../node_modules/react-native-macos/ReactCommon/cxxreact`) + - React-DevSupport (from `../node_modules/react-native-macos/React`) + - React-fishhook (from `../node_modules/react-native-macos/Libraries/fishhook`) + - React-jsi (from `../node_modules/react-native-macos/ReactCommon/jsi`) + - React-jsiexecutor (from `../node_modules/react-native-macos/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../node_modules/react-native-macos/ReactCommon/jsinspector`) + - React-RCTActionSheet (from `../node_modules/react-native-macos/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../node_modules/react-native-macos/Libraries/NativeAnimation`) + - React-RCTBlob (from `../node_modules/react-native-macos/Libraries/Blob`) + - React-RCTImage (from `../node_modules/react-native-macos/Libraries/Image`) + - React-RCTLinking (from `../node_modules/react-native-macos/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../node_modules/react-native-macos/Libraries/Network`) + - React-RCTSettings (from `../node_modules/react-native-macos/Libraries/Settings`) + - React-RCTText (from `../node_modules/react-native-macos/Libraries/Text`) + - React-RCTVibration (from `../node_modules/react-native-macos/Libraries/Vibration`) + - React-RCTWebSocket (from `../node_modules/react-native-macos/Libraries/WebSocket`) + - ReactTestApp-DevSupport (from `../..`) + - ReactTestApp-Resources (from `..`) + - SwiftLint + - yoga (from `../node_modules/react-native-macos/ReactCommon/yoga`) + +SPEC REPOS: + trunk: + - SwiftLint + +EXTERNAL SOURCES: + boost-for-react-native: + :podspec: "../node_modules/react-native-macos/third-party-podspecs/boost-for-react-native.podspec" + DoubleConversion: + :podspec: "../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec" + Folly: + :podspec: "../node_modules/react-native-macos/third-party-podspecs/Folly.podspec" + glog: + :podspec: "../node_modules/react-native-macos/third-party-podspecs/glog.podspec" + React: + :path: "../node_modules/react-native-macos" + React-Core: + :path: "../node_modules/react-native-macos/React" + React-cxxreact: + :path: "../node_modules/react-native-macos/ReactCommon/cxxreact" + React-DevSupport: + :path: "../node_modules/react-native-macos/React" + React-fishhook: + :path: "../node_modules/react-native-macos/Libraries/fishhook" + React-jsi: + :path: "../node_modules/react-native-macos/ReactCommon/jsi" + React-jsiexecutor: + :path: "../node_modules/react-native-macos/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../node_modules/react-native-macos/ReactCommon/jsinspector" + React-RCTActionSheet: + :path: "../node_modules/react-native-macos/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../node_modules/react-native-macos/Libraries/NativeAnimation" + React-RCTBlob: + :path: "../node_modules/react-native-macos/Libraries/Blob" + React-RCTImage: + :path: "../node_modules/react-native-macos/Libraries/Image" + React-RCTLinking: + :path: "../node_modules/react-native-macos/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../node_modules/react-native-macos/Libraries/Network" + React-RCTSettings: + :path: "../node_modules/react-native-macos/Libraries/Settings" + React-RCTText: + :path: "../node_modules/react-native-macos/Libraries/Text" + React-RCTVibration: + :path: "../node_modules/react-native-macos/Libraries/Vibration" + React-RCTWebSocket: + :path: "../node_modules/react-native-macos/Libraries/WebSocket" + ReactTestApp-DevSupport: + :path: "../.." + ReactTestApp-Resources: + :path: ".." + yoga: + :path: "../node_modules/react-native-macos/ReactCommon/yoga" + +SPEC CHECKSUMS: + boost-for-react-native: a110407d9db2642fd2e1bcd7c5a51c81f2521dc9 + DoubleConversion: a1bc12a74baa397a2609e0f10e19b8062d864053 + Folly: feff29ba9d0b7c2e4f793a94942831d6cc5bbad7 + glog: b3f6d74f3e2d33396addc0ee724d2b2b79fc3e00 + React: 3231fd482d650466a8936464501ea1a61a5aa678 + React-Core: d6eb0deaee31e7d1c9d6b09e5402f8004ff3d095 + React-cxxreact: 6a8f44872c1df17552ef15ee77e77c6ca3c5f55a + React-DevSupport: e67a5dc7c4797b99d7311ed7e33dcc187c1f0bce + React-fishhook: be31669c26ecc09882cdcbb6a60cc4bae96ac81a + React-jsi: 6eb8cb13eb534aed3ce876d1a797eff41beb9a60 + React-jsiexecutor: caa20535bb6a8418cba8b3c991e8dadc5bba445a + React-jsinspector: afaaf4bb46af238b991d32f75d125418c0dfaa7b + React-RCTActionSheet: e0e2f2ad0d4e3e84445293bfe803d4de3ef7361b + React-RCTAnimation: d096fc8f7301cbb1eb0283ff295a10419464b142 + React-RCTBlob: 75d9e6538433f44b8fbb22d8389e2ccd1a7bf266 + React-RCTImage: 1f08e42378d9f0335948e84a15eaee2b0c2bec8b + React-RCTLinking: f293bb64258f757304a99cbc3e406502690fdccb + React-RCTNetwork: ac1c158ab8cbe1683002f59872a0a6a75d2f8d8a + React-RCTSettings: 1752947f5f133be1adcf32ba1b39278c6e095b27 + React-RCTText: e98ccd6061197bbcab155c2af1184519d4c10290 + React-RCTVibration: d65410f1d96b8ab1e54ed00c5bafcaf83b655424 + React-RCTWebSocket: 064d37b5498df29c2c8753542a248fcfb59a0a1d + ReactTestApp-DevSupport: 4bc3104215b749fe64dc0b6f602fb13558d9deb6 + ReactTestApp-Resources: c070f72dfcb2806d922eec6656259cbf7a4d2bcf + SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447 + yoga: 2a52465aadd70426513eaf9b4f66e1eb3121dac6 + +PODFILE CHECKSUM: d91f67e74b6410c05259188d419eeed2bd768445 + +COCOAPODS: 1.9.1 diff --git a/example/metro.config.js b/example/metro.config.js index 42c68faec..fe1c3374f 100644 --- a/example/metro.config.js +++ b/example/metro.config.js @@ -11,6 +11,7 @@ module.exports = { resolver: { blacklistRE: blacklist([ /node_modules\/.*\/node_modules\/react-native\/.*/, + /node_modules\/react-native-macos\/.*/, ]), }, transformer: { diff --git a/example/metro.config.macos.js b/example/metro.config.macos.js new file mode 100644 index 000000000..f75a6424c --- /dev/null +++ b/example/metro.config.macos.js @@ -0,0 +1,20 @@ +/** + * This cli config is needed for development purposes, e.g. for running + * integration tests during local development or on CI services. + */ + +const path = require("path"); +const blacklist = require("metro-config/src/defaults/blacklist"); + +module.exports = { + resolver: { + extraNodeModules: { + "react-native": path.resolve( + __dirname, + "node_modules/react-native-macos" + ), + }, + blacklistRE: blacklist([/node_modules\/react-native\/.*/]), + platforms: ["macos", "ios", "android"], + }, +}; diff --git a/example/package.json b/example/package.json index 03104c30a..3db27eae7 100644 --- a/example/package.json +++ b/example/package.json @@ -5,11 +5,14 @@ "scripts": { "build:android": "mkdirp dist/res && react-native bundle --entry-file index.js --platform android --dev true --bundle-output dist/main.jsbundle --assets-dest dist/res --reset-cache", "build:ios": "mkdirp dist && react-native bundle --entry-file index.js --platform ios --dev true --bundle-output dist/main.jsbundle --assets-dest dist --reset-cache", - "start": "react-native start" + "build:macos": "mkdirp dist && react-native bundle --entry-file index.js --platform macos --dev true --bundle-output dist/main.jsbundle --assets-dest dist --reset-cache --config=metro.config.macos.js", + "start": "react-native start", + "start:macos": "react-native start --config=metro.config.macos.js" }, "peerDependencies": { "react": "^16.8.6", - "react-native": "^0.60.6" + "react-native": "^0.60.6", + "react-native-macos": "0.60.0-microsoft.79" }, "devDependencies": { "@babel/core": "^7.0.0", @@ -19,6 +22,7 @@ "mkdirp": "^0.5.1", "react": "16.8.6", "react-native": "0.60.6", + "react-native-macos": "0.60.0-microsoft.79", "react-native-test-app": "../" } } diff --git a/example/react-native.config.js b/example/react-native.config.js index 659fea351..aba488745 100644 --- a/example/react-native.config.js +++ b/example/react-native.config.js @@ -1,7 +1,13 @@ -module.exports = { - project: { - ios: { - project: "ios/ReactTestApp-Dummy.xcodeproj", +if (process.argv.includes("--config=metro.config.macos.js")) { + module.exports = { + reactNativePath: "node_modules/react-native-macos", + }; +} else { + module.exports = { + project: { + ios: { + project: "ios/ReactTestApp-Dummy.xcodeproj", + }, }, - }, -}; + }; +} diff --git a/example/yarn.lock b/example/yarn.lock index 6abb8782e..bb5b656d4 100644 --- a/example/yarn.lock +++ b/example/yarn.lock @@ -3857,6 +3857,40 @@ react-is@^16.12.0, react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-native-macos@0.60.0-microsoft.79: + version "0.60.0-microsoft.79" + resolved "https://registry.yarnpkg.com/react-native-macos/-/react-native-macos-0.60.0-microsoft.79.tgz#b3fcb311f34c93f8937dd7eed13b442c0363a12f" + integrity sha512-JgA9FN9HL14wwYSW6Vd9en8BhBnm7jfvlmK13JMGNRNoCsgAXe/3bDLzxc7PdIuGeQEVTzERB9WvttJGE6M4ag== + dependencies: + "@babel/runtime" "^7.0.0" + "@react-native-community/cli" "^2.6.0" + "@react-native-community/cli-platform-android" "^2.6.0" + "@react-native-community/cli-platform-ios" "^2.4.1" + abort-controller "^3.0.0" + art "^0.10.0" + base64-js "^1.1.2" + connect "^3.6.5" + create-react-class "^15.6.3" + escape-string-regexp "^1.0.5" + event-target-shim "^5.0.1" + fbjs "^1.0.0" + fbjs-scripts "^1.1.0" + hermesvm "^0.1.0" + invariant "^2.2.4" + jsc-android "245459.0.0" + metro-babel-register "0.54.1" + metro-react-native-babel-transformer "0.54.1" + metro-source-map "^0.55.0" + nullthrows "^1.1.0" + pretty-format "^24.7.0" + promise "^7.1.1" + prop-types "^15.7.2" + react-devtools-core "^3.6.1" + regenerator-runtime "^0.13.2" + scheduler "0.14.0" + stacktrace-parser "^0.1.3" + whatwg-fetch "^3.0.0" + react-native-test-app@../: version "0.0.15" dependencies: @@ -3868,6 +3902,7 @@ react-native-test-app@../: metro-react-native-babel-preset "0.54.1" react "16.8.6" react-native "0.60.6" + react-native-macos "0.60.0-microsoft.79" react-native@0.60.6: version "0.60.6" diff --git a/ios/ReactTestApp/ReactInstance.swift b/ios/ReactTestApp/ReactInstance.swift index d6c01d88a..2935cd0c1 100644 --- a/ios/ReactTestApp/ReactInstance.swift +++ b/ios/ReactTestApp/ReactInstance.swift @@ -62,12 +62,15 @@ final class ReactInstance: NSObject, RCTBridgeDelegate, RCTTurboModuleLookupDele name: .RCTJavaScriptWillStartLoading, object: nil ) + + #if os(iOS) NotificationCenter.default.addObserver( self, selector: #selector(onRemoteBundleURLReceived(_:)), name: .didReceiveRemoteBundleURL, object: nil ) + #endif } init(forTestingPurposesOnly: Bool) { diff --git a/ios/ReactTestApp/UIViewController+ReactTestApp.h b/ios/ReactTestApp/UIViewController+ReactTestApp.h index aeeaa3e64..0e230c740 100644 --- a/ios/ReactTestApp/UIViewController+ReactTestApp.h +++ b/ios/ReactTestApp/UIViewController+ReactTestApp.h @@ -5,12 +5,19 @@ // LICENSE file in the root directory of this source tree. // +#include +#if TARGET_OS_IOS #import +#define RTAViewController UIViewController +#else +#import +#define RTAViewController NSViewController +#endif -#import +@class RCTBridge; NS_ASSUME_NONNULL_BEGIN -UIViewController *_Nullable RTAViewControllerFromString(NSString *name, RCTBridge *bridge); +RTAViewController *_Nullable RTAViewControllerFromString(NSString *name, RCTBridge *bridge); NS_ASSUME_NONNULL_END diff --git a/ios/ReactTestApp/UIViewController+ReactTestApp.m b/ios/ReactTestApp/UIViewController+ReactTestApp.m index 1cfb19fc2..0de9283fb 100644 --- a/ios/ReactTestApp/UIViewController+ReactTestApp.m +++ b/ios/ReactTestApp/UIViewController+ReactTestApp.m @@ -16,7 +16,7 @@ @protocol RTAViewController - (instancetype)initWithBridge:(RCTBridge *)bridge; @end -UIViewController *RTAViewControllerFromString(NSString *name, RCTBridge *bridge) +RTAViewController *RTAViewControllerFromString(NSString *name, RCTBridge *bridge) { Class viewController = NSClassFromString(name); return [viewController instancesRespondToSelector:@selector(initWithBridge:)] diff --git a/ios/test_app.rb b/ios/test_app.rb index 89ffc8c5b..39e340683 100644 --- a/ios/test_app.rb +++ b/ios/test_app.rb @@ -97,7 +97,9 @@ def use_react_native!(project_root, target_platform) raise "Unsupported React Native version: #{version[0]}" end - include_react_native!(react_native.relative_path_from(project_root).to_s, target_platform) + include_react_native!(react_native.relative_path_from(project_root).to_s, + target_platform, + project_root) end def use_test_app_internal!(target_platform) @@ -115,7 +117,7 @@ def use_test_app_internal!(target_platform) FileUtils.ln_sf(File.join(src_xcodeproj, 'xcshareddata'), dst_xcodeproj) # Link source files - %w[ReactTestApp ReactTestAppTests ReactTestAppUITests].each do |file| + %w[ReactTestApp ReactTestAppShared ReactTestAppTests ReactTestAppUITests].each do |file| source = File.expand_path(File.join(__dir__, '..', target_platform.to_s, file)) FileUtils.ln_sf(source, destination) end diff --git a/ios/use_react_native-0.60.rb b/ios/use_react_native-0.60.rb index f8510468a..7a052332f 100644 --- a/ios/use_react_native-0.60.rb +++ b/ios/use_react_native-0.60.rb @@ -6,7 +6,7 @@ # # rubocop:disable Layout/LineLength -def include_react_native!(react_native, target_platform) +def include_react_native!(react_native, target_platform, project_root) react_native = "#{react_native}-macos" if target_platform == :macos pod 'React', :path => react_native @@ -14,7 +14,8 @@ def include_react_native!(react_native, target_platform) pod 'React-DevSupport', :path => "#{react_native}/React" # fishhook was removed in 0.60.5 - pod 'React-fishhook', :path => "#{react_native}/Libraries/fishhook" if File.exist?("#{react_native}/Libraries/fishhook") + fishhook = "#{react_native}/Libraries/fishhook" + pod 'React-fishhook', :path => fishhook if File.exist?(File.join(project_root, fishhook)) pod 'React-RCTActionSheet', :path => "#{react_native}/Libraries/ActionSheetIOS" pod 'React-RCTAnimation', :path => "#{react_native}/Libraries/NativeAnimation" @@ -36,6 +37,10 @@ def include_react_native!(react_native, target_platform) pod 'DoubleConversion', :podspec => "#{react_native}/third-party-podspecs/DoubleConversion.podspec" pod 'glog', :podspec => "#{react_native}/third-party-podspecs/glog.podspec" pod 'Folly', :podspec => "#{react_native}/third-party-podspecs/Folly.podspec" + + # Required by `react-native-macos` otherwise it will find Boost elsewhere + boost = "#{react_native}/third-party-podspecs/boost-for-react-native.podspec" + pod 'boost-for-react-native', :podspec => boost if File.exist?(File.join(project_root, boost)) end # rubocop:enable Layout/LineLength diff --git a/ios/use_react_native-0.61.rb b/ios/use_react_native-0.61.rb index e10da2d57..600d222a6 100644 --- a/ios/use_react_native-0.61.rb +++ b/ios/use_react_native-0.61.rb @@ -6,7 +6,7 @@ # # rubocop:disable Layout/LineLength -def include_react_native!(react_native, target_platform) +def include_react_native!(react_native, target_platform, _project_root) react_native = "#{react_native}-macos" if target_platform == :macos pod 'FBLazyVector', :path => "#{react_native}/Libraries/FBLazyVector" diff --git a/macos/ReactTestApp.xcodeproj/project.pbxproj b/macos/ReactTestApp.xcodeproj/project.pbxproj new file mode 100644 index 000000000..8cc06b12d --- /dev/null +++ b/macos/ReactTestApp.xcodeproj/project.pbxproj @@ -0,0 +1,611 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 193EF063247A736200BE8C79 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 193EF062247A736200BE8C79 /* AppDelegate.swift */; }; + 193EF065247A736200BE8C79 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 193EF064247A736200BE8C79 /* ViewController.swift */; }; + 193EF067247A736300BE8C79 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 193EF066247A736300BE8C79 /* Assets.xcassets */; }; + 193EF06A247A736300BE8C79 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 193EF068247A736300BE8C79 /* Main.storyboard */; }; + 193EF08F247A799D00BE8C79 /* Manifest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 193EF08E247A799D00BE8C79 /* Manifest.swift */; }; + 193EF093247A830200BE8C79 /* UIViewController+ReactTestApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 193EF091247A830200BE8C79 /* UIViewController+ReactTestApp.m */; }; + 193EF098247B130700BE8C79 /* ReactInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 193EF097247B130700BE8C79 /* ReactInstance.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 193EF072247A736300BE8C79 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 193EF057247A736100BE8C79 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 193EF05E247A736100BE8C79; + remoteInfo = ReactTestApp; + }; + 193EF07D247A736300BE8C79 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 193EF057247A736100BE8C79 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 193EF05E247A736100BE8C79; + remoteInfo = ReactTestApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 193EF05F247A736200BE8C79 /* ReactTestApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactTestApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 193EF062247A736200BE8C79 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 193EF064247A736200BE8C79 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 193EF066247A736300BE8C79 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 193EF069247A736300BE8C79 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 193EF06B247A736300BE8C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 193EF06C247A736300BE8C79 /* ReactTestApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ReactTestApp.entitlements; sourceTree = ""; }; + 193EF071247A736300BE8C79 /* ReactTestAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactTestAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 193EF077247A736300BE8C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 193EF07C247A736300BE8C79 /* ReactTestAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactTestAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 193EF082247A736300BE8C79 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 193EF08E247A799D00BE8C79 /* Manifest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Manifest.swift; path = ../ReactTestAppShared/Manifest.swift; sourceTree = ""; }; + 193EF091247A830200BE8C79 /* UIViewController+ReactTestApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+ReactTestApp.m"; path = "../ReactTestAppShared/UIViewController+ReactTestApp.m"; sourceTree = ""; }; + 193EF092247A830200BE8C79 /* UIViewController+ReactTestApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+ReactTestApp.h"; path = "../ReactTestAppShared/UIViewController+ReactTestApp.h"; sourceTree = ""; }; + 193EF094247A84DA00BE8C79 /* ReactTestApp-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "ReactTestApp-Bridging-Header.h"; path = "../ReactTestAppShared/ReactTestApp-Bridging-Header.h"; sourceTree = ""; }; + 193EF097247B130700BE8C79 /* ReactInstance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ReactInstance.swift; path = ../ReactTestAppShared/ReactInstance.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 193EF05C247A736100BE8C79 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF06E247A736300BE8C79 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF079247A736300BE8C79 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 193EF056247A736100BE8C79 = { + isa = PBXGroup; + children = ( + 193EF061247A736200BE8C79 /* ReactTestApp */, + 193EF074247A736300BE8C79 /* ReactTestAppTests */, + 193EF07F247A736300BE8C79 /* ReactTestAppUITests */, + 193EF060247A736200BE8C79 /* Products */, + ); + sourceTree = ""; + }; + 193EF060247A736200BE8C79 /* Products */ = { + isa = PBXGroup; + children = ( + 193EF05F247A736200BE8C79 /* ReactTestApp.app */, + 193EF071247A736300BE8C79 /* ReactTestAppTests.xctest */, + 193EF07C247A736300BE8C79 /* ReactTestAppUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 193EF061247A736200BE8C79 /* ReactTestApp */ = { + isa = PBXGroup; + children = ( + 193EF062247A736200BE8C79 /* AppDelegate.swift */, + 193EF08E247A799D00BE8C79 /* Manifest.swift */, + 193EF097247B130700BE8C79 /* ReactInstance.swift */, + 193EF064247A736200BE8C79 /* ViewController.swift */, + 193EF094247A84DA00BE8C79 /* ReactTestApp-Bridging-Header.h */, + 193EF092247A830200BE8C79 /* UIViewController+ReactTestApp.h */, + 193EF091247A830200BE8C79 /* UIViewController+ReactTestApp.m */, + 193EF066247A736300BE8C79 /* Assets.xcassets */, + 193EF068247A736300BE8C79 /* Main.storyboard */, + 193EF06B247A736300BE8C79 /* Info.plist */, + 193EF06C247A736300BE8C79 /* ReactTestApp.entitlements */, + ); + path = ReactTestApp; + sourceTree = ""; + }; + 193EF074247A736300BE8C79 /* ReactTestAppTests */ = { + isa = PBXGroup; + children = ( + 193EF077247A736300BE8C79 /* Info.plist */, + ); + path = ReactTestAppTests; + sourceTree = ""; + }; + 193EF07F247A736300BE8C79 /* ReactTestAppUITests */ = { + isa = PBXGroup; + children = ( + 193EF082247A736300BE8C79 /* Info.plist */, + ); + path = ReactTestAppUITests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 193EF05E247A736100BE8C79 /* ReactTestApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 193EF085247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestApp" */; + buildPhases = ( + 19482473248280F7001B8381 /* Run SwiftLint */, + 193EF05B247A736100BE8C79 /* Sources */, + 193EF05C247A736100BE8C79 /* Frameworks */, + 193EF05D247A736100BE8C79 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ReactTestApp; + productName = ReactTestApp; + productReference = 193EF05F247A736200BE8C79 /* ReactTestApp.app */; + productType = "com.apple.product-type.application"; + }; + 193EF070247A736300BE8C79 /* ReactTestAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 193EF088247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestAppTests" */; + buildPhases = ( + 193EF06D247A736300BE8C79 /* Sources */, + 193EF06E247A736300BE8C79 /* Frameworks */, + 193EF06F247A736300BE8C79 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 193EF073247A736300BE8C79 /* PBXTargetDependency */, + ); + name = ReactTestAppTests; + productName = ReactTestAppTests; + productReference = 193EF071247A736300BE8C79 /* ReactTestAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 193EF07B247A736300BE8C79 /* ReactTestAppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 193EF08B247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestAppUITests" */; + buildPhases = ( + 193EF078247A736300BE8C79 /* Sources */, + 193EF079247A736300BE8C79 /* Frameworks */, + 193EF07A247A736300BE8C79 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 193EF07E247A736300BE8C79 /* PBXTargetDependency */, + ); + name = ReactTestAppUITests; + productName = ReactTestAppUITests; + productReference = 193EF07C247A736300BE8C79 /* ReactTestAppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 193EF057247A736100BE8C79 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1150; + LastUpgradeCheck = 1150; + ORGANIZATIONNAME = Microsoft; + TargetAttributes = { + 193EF05E247A736100BE8C79 = { + CreatedOnToolsVersion = 11.5; + LastSwiftMigration = 1150; + }; + 193EF070247A736300BE8C79 = { + CreatedOnToolsVersion = 11.5; + TestTargetID = 193EF05E247A736100BE8C79; + }; + 193EF07B247A736300BE8C79 = { + CreatedOnToolsVersion = 11.5; + TestTargetID = 193EF05E247A736100BE8C79; + }; + }; + }; + buildConfigurationList = 193EF05A247A736100BE8C79 /* Build configuration list for PBXProject "ReactTestApp" */; + compatibilityVersion = "Xcode 11.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 193EF056247A736100BE8C79; + productRefGroup = 193EF060247A736200BE8C79 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 193EF05E247A736100BE8C79 /* ReactTestApp */, + 193EF070247A736300BE8C79 /* ReactTestAppTests */, + 193EF07B247A736300BE8C79 /* ReactTestAppUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 193EF05D247A736100BE8C79 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 193EF067247A736300BE8C79 /* Assets.xcassets in Resources */, + 193EF06A247A736300BE8C79 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF06F247A736300BE8C79 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF07A247A736300BE8C79 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 19482473248280F7001B8381 /* Run SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run SwiftLint"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "${PODS_ROOT}/SwiftLint/swiftlint || exit 0\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 193EF05B247A736100BE8C79 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 193EF063247A736200BE8C79 /* AppDelegate.swift in Sources */, + 193EF08F247A799D00BE8C79 /* Manifest.swift in Sources */, + 193EF098247B130700BE8C79 /* ReactInstance.swift in Sources */, + 193EF065247A736200BE8C79 /* ViewController.swift in Sources */, + 193EF093247A830200BE8C79 /* UIViewController+ReactTestApp.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF06D247A736300BE8C79 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 193EF078247A736300BE8C79 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 193EF073247A736300BE8C79 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 193EF05E247A736100BE8C79 /* ReactTestApp */; + targetProxy = 193EF072247A736300BE8C79 /* PBXContainerItemProxy */; + }; + 193EF07E247A736300BE8C79 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 193EF05E247A736100BE8C79 /* ReactTestApp */; + targetProxy = 193EF07D247A736300BE8C79 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 193EF068247A736300BE8C79 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 193EF069247A736300BE8C79 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 193EF083247A736300BE8C79 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 193EF084247A736300BE8C79 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 193EF086247A736300BE8C79 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = ReactTestApp/ReactTestApp.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "ReactTestAppShared/ReactTestApp-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 193EF087247A736300BE8C79 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = ReactTestApp/ReactTestApp.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestApp/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "ReactTestAppShared/ReactTestApp-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 193EF089247A736300BE8C79 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestAppTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactTestApp.app/Contents/MacOS/ReactTestApp"; + }; + name = Debug; + }; + 193EF08A247A736300BE8C79 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestAppTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.15; + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestAppTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactTestApp.app/Contents/MacOS/ReactTestApp"; + }; + name = Release; + }; + 193EF08C247A736300BE8C79 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestAppUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = ReactTestApp; + }; + name = Debug; + }; + 193EF08D247A736300BE8C79 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = ReactTestAppUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.microsoft.ReactTestAppUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = ReactTestApp; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 193EF05A247A736100BE8C79 /* Build configuration list for PBXProject "ReactTestApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 193EF083247A736300BE8C79 /* Debug */, + 193EF084247A736300BE8C79 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 193EF085247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 193EF086247A736300BE8C79 /* Debug */, + 193EF087247A736300BE8C79 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 193EF088247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 193EF089247A736300BE8C79 /* Debug */, + 193EF08A247A736300BE8C79 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 193EF08B247A736300BE8C79 /* Build configuration list for PBXNativeTarget "ReactTestAppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 193EF08C247A736300BE8C79 /* Debug */, + 193EF08D247A736300BE8C79 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 193EF057247A736100BE8C79 /* Project object */; +} diff --git a/macos/ReactTestApp/AppDelegate.swift b/macos/ReactTestApp/AppDelegate.swift new file mode 100644 index 000000000..96986b9a9 --- /dev/null +++ b/macos/ReactTestApp/AppDelegate.swift @@ -0,0 +1,118 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This source code is licensed under the MIT license found in the +// LICENSE file in the root directory of this source tree. +// + +import Cocoa + +@NSApplicationMain +final class AppDelegate: NSObject, NSApplicationDelegate { + private(set) lazy var reactInstance = ReactInstance() + + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + true + } + + func applicationDidFinishLaunching(_ aNotification: Notification) { + guard let mainMenu = NSApplication.shared.mainMenu else { + return + } + + let reactMenu = NSMenu(title: "React") + reactMenu.autoenablesItems = false + reactMenu.addItem( + withTitle: "Load Embedded JS Bundle", + action: #selector(onLoadEmbeddedBundle), + keyEquivalent: "" + ) + reactMenu.addItem( + withTitle: "Load From Dev Server", + action: #selector(onLoadFromDevServer), + keyEquivalent: "" + ) + reactMenu.addItem(NSMenuItem.separator()) + + if let manifest = Manifest.fromFile() { + for (index, component) in manifest.components.enumerated() { + let title = component.displayName ?? component.appKey + let item = reactMenu.addItem( + withTitle: title, + action: #selector(onComponentSelected), + keyEquivalent: index < 10 ? String(index) : "" + ) + item.keyEquivalentModifierMask = [.shift, .command] + item.isEnabled = false + item.representedObject = component + } + } else { + reactMenu.addItem( + withTitle: "Could not load 'app.json'", + action: nil, + keyEquivalent: "" + ) + } + + // ReactTestApp File Edit Format View React Window Help + let reactMenuItem = mainMenu.insertItem( + withTitle: reactMenu.title, + action: nil, + keyEquivalent: "", + at: 5 + ) + reactMenuItem.submenu = reactMenu + + DispatchQueue.global(qos: .userInitiated).async { [weak self] in + self?.reactInstance.initReact { _ in + DispatchQueue.main.async { + reactMenu.items.forEach { $0.isEnabled = true } + } + } + } + } + + func applicationWillTerminate(_ aNotification: Notification) { + // Insert code here to tear down your application + } + + @objc + private func onComponentSelected(menuItem: NSMenuItem) { + guard let window = NSApplication.shared.keyWindow, + let component = menuItem.representedObject as? Component, + let bridge = reactInstance.bridge else { + return + } + + window.title = component.displayName ?? component.appKey + + let viewController: NSViewController = { + if let viewController = RTAViewControllerFromString(component.appKey, bridge) { + return viewController + } + + let viewController = NSViewController(nibName: nil, bundle: nil) + viewController.view = RCTRootView( + bridge: bridge, + moduleName: component.appKey, + initialProperties: component.initialProperties + ) + return viewController + }() + + let frame = window.contentViewController?.view.frame + viewController.view.frame = frame ?? NSRect(x: 0, y: 0, width: 480, height: 270) + + window.contentViewController = viewController + } + + @objc + private func onLoadEmbeddedBundle(menuItem: NSMenuItem) { + reactInstance.remoteBundleURL = nil + } + + @objc + private func onLoadFromDevServer(menuItem: NSMenuItem) { + reactInstance.remoteBundleURL = ReactInstance.jsBundleURL() + } +} diff --git a/macos/ReactTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/ReactTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..3f00db43e --- /dev/null +++ b/macos/ReactTestApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/ReactTestApp/Assets.xcassets/Contents.json b/macos/ReactTestApp/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/macos/ReactTestApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/macos/ReactTestApp/Base.lproj/Main.storyboard b/macos/ReactTestApp/Base.lproj/Main.storyboard new file mode 100644 index 000000000..d9b6108c4 --- /dev/null +++ b/macos/ReactTestApp/Base.lproj/Main.storyboard @@ -0,0 +1,717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macos/ReactTestApp/Info.plist b/macos/ReactTestApp/Info.plist new file mode 100644 index 000000000..de78254d9 --- /dev/null +++ b/macos/ReactTestApp/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.developer-tools + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSAppTransportSecurity + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSHumanReadableCopyright + Copyright © 2020 Microsoft. All rights reserved. + NSMainStoryboardFile + Main + NSPrincipalClass + NSApplication + NSSupportsAutomaticTermination + + NSSupportsSuddenTermination + + + diff --git a/macos/ReactTestApp/ReactTestApp.entitlements b/macos/ReactTestApp/ReactTestApp.entitlements new file mode 100644 index 000000000..625af03d9 --- /dev/null +++ b/macos/ReactTestApp/ReactTestApp.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + com.apple.security.network.client + + + diff --git a/macos/ReactTestApp/ViewController.swift b/macos/ReactTestApp/ViewController.swift new file mode 100644 index 000000000..569f3ba80 --- /dev/null +++ b/macos/ReactTestApp/ViewController.swift @@ -0,0 +1,25 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// This source code is licensed under the MIT license found in the +// LICENSE file in the root directory of this source tree. +// + +import Cocoa + +final class ViewController: NSViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override var representedObject: Any? { + didSet { + // Update the view, if already loaded. + } + } + +} + diff --git a/macos/ReactTestAppShared b/macos/ReactTestAppShared new file mode 120000 index 000000000..0885fa0a9 --- /dev/null +++ b/macos/ReactTestAppShared @@ -0,0 +1 @@ +../ios/ReactTestApp \ No newline at end of file diff --git a/macos/ReactTestAppTests/Info.plist b/macos/ReactTestAppTests/Info.plist new file mode 100644 index 000000000..64d65ca49 --- /dev/null +++ b/macos/ReactTestAppTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/macos/ReactTestAppUITests/Info.plist b/macos/ReactTestAppUITests/Info.plist new file mode 100644 index 000000000..64d65ca49 --- /dev/null +++ b/macos/ReactTestAppUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/package.json b/package.json index 6a9096ed5..449476c65 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "@react-native-community/cli-platform-ios": "^2.4.1", "metro-react-native-babel-preset": "0.54.1", "react": "16.8.6", - "react-native": "0.60.6" + "react-native": "0.60.6", + "react-native-macos": "0.60.0-microsoft.79" }, "devDependencies": { "@semantic-release/git": "^9.0.0", diff --git a/scripts/xcodebuild-ios.sh b/scripts/xcodebuild-ios.sh deleted file mode 100755 index 3803d36a0..000000000 --- a/scripts/xcodebuild-ios.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -set -eo pipefail - -workspace=$1 -action=$2 -device_name=${3:-'iPhone 11'} - -device=$(instruments -s devices 2> /dev/null | grep "${device_name} (") -re='\(([0-9]+[.0-9]*)\)' -[[ $device =~ $re ]] || exit 1 - -xcodebuild \ - -workspace $workspace \ - -scheme ReactTestApp \ - -destination "platform=iOS Simulator,name=${device_name},OS=${BASH_REMATCH[1]}" \ - -skip-testing:ReactTestAppTests/ReactNativePerformanceTests \ - CODE_SIGNING_ALLOWED=NO \ - COMPILER_INDEX_STORE_ENABLE=NO \ - $action \ - | xcpretty diff --git a/scripts/xcodebuild.sh b/scripts/xcodebuild.sh new file mode 100755 index 000000000..a63c7482a --- /dev/null +++ b/scripts/xcodebuild.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -eo pipefail + +workspace=$1 +action=$2 +platform=$(grep -o '\w\+/ReactTestApp.xcodeproj' "$workspace/contents.xcworkspacedata") + +if [[ $platform == ios/* ]]; then + device_name=${3:-'iPhone 11'} + device=$(xcrun simctl list devices "${device_name}" available | grep "${device_name} (") + re='\(([-0-9A-Fa-f]+)\)' + [[ $device =~ $re ]] || exit 1 + + destination="-destination \"platform=iOS Simulator,id=${BASH_REMATCH[1]}\"" + skip_testing='-skip-testing:ReactTestAppTests/ReactNativePerformanceTests' +elif [[ $platform == macos/* ]]; then + destination='' + skip_testing='' +else + echo "Cannot detect platform: $workspace" + exit 1 +fi + +build_cmd=$( + echo xcodebuild \ + -workspace $workspace \ + -scheme ReactTestApp \ + $destination \ + $skip_testing \ + CODE_SIGNING_ALLOWED=NO \ + COMPILER_INDEX_STORE_ENABLE=NO \ + $action \ +) + +if command -v xcpretty >/dev/null 2>&1; then + eval $build_cmd | xcpretty +else + eval $build_cmd +fi diff --git a/yarn.lock b/yarn.lock index 4136ff585..208939d41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6897,6 +6897,40 @@ react-is@^16.8.1, react-is@^16.8.4: resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527" integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA== +react-native-macos@0.60.0-microsoft.79: + version "0.60.0-microsoft.79" + resolved "https://registry.yarnpkg.com/react-native-macos/-/react-native-macos-0.60.0-microsoft.79.tgz#b3fcb311f34c93f8937dd7eed13b442c0363a12f" + integrity sha512-JgA9FN9HL14wwYSW6Vd9en8BhBnm7jfvlmK13JMGNRNoCsgAXe/3bDLzxc7PdIuGeQEVTzERB9WvttJGE6M4ag== + dependencies: + "@babel/runtime" "^7.0.0" + "@react-native-community/cli" "^2.6.0" + "@react-native-community/cli-platform-android" "^2.6.0" + "@react-native-community/cli-platform-ios" "^2.4.1" + abort-controller "^3.0.0" + art "^0.10.0" + base64-js "^1.1.2" + connect "^3.6.5" + create-react-class "^15.6.3" + escape-string-regexp "^1.0.5" + event-target-shim "^5.0.1" + fbjs "^1.0.0" + fbjs-scripts "^1.1.0" + hermesvm "^0.1.0" + invariant "^2.2.4" + jsc-android "245459.0.0" + metro-babel-register "0.54.1" + metro-react-native-babel-transformer "0.54.1" + metro-source-map "^0.55.0" + nullthrows "^1.1.0" + pretty-format "^24.7.0" + promise "^7.1.1" + prop-types "^15.7.2" + react-devtools-core "^3.6.1" + regenerator-runtime "^0.13.2" + scheduler "0.14.0" + stacktrace-parser "^0.1.3" + whatwg-fetch "^3.0.0" + react-native@0.60.6: version "0.60.6" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.60.6.tgz#8a13dece1c3f6e01db0833db14d2b01b2d8ccba5"