Skip to content

Commit 6651d8c

Browse files
hramosfacebook-github-bot
authored andcommitted
Enable codegen in RNTester's NativeModuleExample
Summary: Create a ScreenshotManager.podspec (codegen recipe included) and add ScreenshotManager Pod to the Podfile. Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D30623054 fbshipit-source-id: be20880a53ba8a08f8b42b8d81c868c8a21960e1
1 parent ed20a85 commit 6651d8c

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ package-lock.json
105105
/React/FBReactNativeSpec/FBReactNativeSpec
106106
/packages/react-native-codegen/lib
107107
/ReactCommon/react/renderer/components/rncore/
108+
/packages/rn-tester/NativeModuleExample/ScreenshotManagerSpec
108109

109110
# Visual studio
110111
.vscode
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (c) Facebook, Inc. and its affiliates.
2+
#
3+
# This source code is licensed under the MIT license found in the
4+
# LICENSE file in the root directory of this source tree.
5+
6+
require "json"
7+
8+
package = JSON.parse(File.read(File.join(__dir__, "../package.json")))
9+
10+
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
11+
folly_version = '2021.06.28.00'
12+
13+
Pod::Spec.new do |s|
14+
s.name = "ScreenshotManager"
15+
s.version = package["version"]
16+
s.summary = package["description"]
17+
s.description = "ScreenshotManager"
18+
s.homepage = "https://github.com/facebook/react-native.git"
19+
s.license = "MIT"
20+
s.platforms = { :ios => "11.0", :tvos => "11.0" }
21+
s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
22+
s.author = "Facebook, Inc. and its affiliates"
23+
s.source = { :git => "https://github.com/facebook/react-native.git", :tag => "#{s.version}" }
24+
25+
s.source_files = "**/*.{h,m,mm,swift}"
26+
s.requires_arc = true
27+
28+
s.dependency "React"
29+
s.dependency "RCT-Folly", folly_version
30+
31+
# s.dependency "..."
32+
33+
# Enable codegen for this library
34+
use_react_native_codegen!(s, {
35+
:react_native_path => "../../..",
36+
:js_srcs_dir => "./",
37+
:output_dir => "./"
38+
})
39+
end

packages/rn-tester/Podfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ def pods()
3737
pod 'React-RCTPushNotification', :path => "#{prefix_path}/Libraries/PushNotificationIOS"
3838
pod 'Yoga', :path => "#{prefix_path}/ReactCommon/yoga", :modular_headers => true
3939
# Additional Pods which are classed as unstable
40+
41+
# RNTester native modules and components
42+
pod 'ScreenshotManager', :path => "NativeModuleExample"
4043
end
4144

4245
target 'RNTester' do

packages/rn-tester/Podfile.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,9 @@ PODS:
704704
- React-logger (= 1000.0.0)
705705
- React-perflogger (= 1000.0.0)
706706
- ReactCommon/turbomodule/core (= 1000.0.0)
707+
- ScreenshotManager (0.0.1):
708+
- RCT-Folly (= 2021.06.28.00)
709+
- React
707710
- Yoga (1.14.0)
708711
- YogaKit (1.18.1):
709712
- Yoga (~> 1.14)
@@ -769,6 +772,7 @@ DEPENDENCIES:
769772
- React-runtimeexecutor (from `../../ReactCommon/runtimeexecutor`)
770773
- ReactCommon/turbomodule/core (from `../../ReactCommon`)
771774
- ReactCommon/turbomodule/samples (from `../../ReactCommon`)
775+
- ScreenshotManager (from `NativeModuleExample`)
772776
- Yoga (from `../../ReactCommon/yoga`)
773777

774778
SPEC REPOS:
@@ -857,6 +861,8 @@ EXTERNAL SOURCES:
857861
:path: "../../ReactCommon/runtimeexecutor"
858862
ReactCommon:
859863
:path: "../../ReactCommon"
864+
ScreenshotManager:
865+
:path: NativeModuleExample
860866
Yoga:
861867
:path: "../../ReactCommon/yoga"
862868

@@ -908,9 +914,10 @@ SPEC CHECKSUMS:
908914
React-RCTVibration: 1a58f6ab1ae5fad004119979b676cb5e912f2e44
909915
React-runtimeexecutor: 4b0c6eb341c7d3ceb5e2385cb0fdb9bf701024f3
910916
ReactCommon: 632474905edd9a20ec4f4084142ff4b4a4f3fd8b
917+
ScreenshotManager: a23f618c2a205e3087f29b05154a7c3d6e515d8a
911918
Yoga: c0d06f5380d34e939f55420669a60fe08b79bd75
912919
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
913920

914-
PODFILE CHECKSUM: 6e910a576b7db9347c60dfc58f7852f692200116
921+
PODFILE CHECKSUM: ae3037f2256663bd77e3b1cffcac23908027fdb1
915922

916923
COCOAPODS: 1.10.1

0 commit comments

Comments
 (0)