diff --git a/.gitignore b/.gitignore index ecfa96ceaa2..747bb762be9 100644 --- a/.gitignore +++ b/.gitignore @@ -105,6 +105,7 @@ package-lock.json /React/FBReactNativeSpec/FBReactNativeSpec /packages/react-native-codegen/lib /ReactCommon/react/renderer/components/rncore/ +/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec # Visual studio .vscode diff --git a/packages/rn-tester/NativeModuleExample/ScreenshotManager.podspec b/packages/rn-tester/NativeModuleExample/ScreenshotManager.podspec new file mode 100644 index 00000000000..bfa423f63e0 --- /dev/null +++ b/packages/rn-tester/NativeModuleExample/ScreenshotManager.podspec @@ -0,0 +1,39 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "../package.json"))) + +folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' +folly_version = '2021.06.28.00' + +Pod::Spec.new do |s| + s.name = "ScreenshotManager" + s.version = package["version"] + s.summary = package["description"] + s.description = "ScreenshotManager" + s.homepage = "https://github.com/facebook/react-native.git" + s.license = "MIT" + s.platforms = { :ios => "11.0", :tvos => "11.0" } + s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness' + s.author = "Facebook, Inc. and its affiliates" + s.source = { :git => "https://github.com/facebook/react-native.git", :tag => "#{s.version}" } + + s.source_files = "**/*.{h,m,mm,swift}" + s.requires_arc = true + + s.dependency "React" + s.dependency "RCT-Folly", folly_version + + # s.dependency "..." + + # Enable codegen for this library + use_react_native_codegen!(s, { + :react_native_path => "../../..", + :js_srcs_dir => "./", + :output_dir => "./" + }) +end diff --git a/packages/rn-tester/Podfile b/packages/rn-tester/Podfile index ae885b01454..dcc05865ac5 100644 --- a/packages/rn-tester/Podfile +++ b/packages/rn-tester/Podfile @@ -37,6 +37,9 @@ def pods() pod 'React-RCTPushNotification', :path => "#{prefix_path}/Libraries/PushNotificationIOS" pod 'Yoga', :path => "#{prefix_path}/ReactCommon/yoga", :modular_headers => true # Additional Pods which are classed as unstable + + # RNTester native modules and components + pod 'ScreenshotManager', :path => "NativeModuleExample" end target 'RNTester' do diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 52b05d0344b..9fb2a10be87 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -704,6 +704,9 @@ PODS: - React-logger (= 1000.0.0) - React-perflogger (= 1000.0.0) - ReactCommon/turbomodule/core (= 1000.0.0) + - ScreenshotManager (0.0.1): + - RCT-Folly (= 2021.06.28.00) + - React - Yoga (1.14.0) - YogaKit (1.18.1): - Yoga (~> 1.14) @@ -769,6 +772,7 @@ DEPENDENCIES: - React-runtimeexecutor (from `../../ReactCommon/runtimeexecutor`) - ReactCommon/turbomodule/core (from `../../ReactCommon`) - ReactCommon/turbomodule/samples (from `../../ReactCommon`) + - ScreenshotManager (from `NativeModuleExample`) - Yoga (from `../../ReactCommon/yoga`) SPEC REPOS: @@ -857,6 +861,8 @@ EXTERNAL SOURCES: :path: "../../ReactCommon/runtimeexecutor" ReactCommon: :path: "../../ReactCommon" + ScreenshotManager: + :path: NativeModuleExample Yoga: :path: "../../ReactCommon/yoga" @@ -908,9 +914,10 @@ SPEC CHECKSUMS: React-RCTVibration: 1a58f6ab1ae5fad004119979b676cb5e912f2e44 React-runtimeexecutor: 4b0c6eb341c7d3ceb5e2385cb0fdb9bf701024f3 ReactCommon: 632474905edd9a20ec4f4084142ff4b4a4f3fd8b + ScreenshotManager: a23f618c2a205e3087f29b05154a7c3d6e515d8a Yoga: c0d06f5380d34e939f55420669a60fe08b79bd75 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 6e910a576b7db9347c60dfc58f7852f692200116 +PODFILE CHECKSUM: ae3037f2256663bd77e3b1cffcac23908027fdb1 COCOAPODS: 1.10.1