Skip to content

Commit

Permalink
RCTDeprecation cocoapods integration (facebook#41416)
Browse files Browse the repository at this point in the history
Summary:

Changelog: [Internal]

cocoapods boilerplate to integrate the first RCTFoundation library. decided to split this up so we can reference it easily in the future when adding new libs

Reviewed By: cipolleschi

Differential Revision: D51184321
  • Loading branch information
philIip authored and facebook-github-bot committed Nov 17, 2023
1 parent b92256b commit 9d23af9
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/react-native/React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ Pod::Spec.new do |s|
s.dependency "Yoga"
s.dependency "glog"

add_dependency(s, "RCTDeprecation")

if use_hermes
s.dependency 'React-hermes'
s.dependency 'hermes-engine'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

// Dummy file to make RCTDeprecation a valid framework.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) Meta Platforms, Inc. and 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")))
version = package['version']

Pod::Spec.new do |s|
s.name = "RCTDeprecation"
s.version = version
s.author = "Meta Platforms, Inc. and its affiliates"
s.license = package["license"]
s.homepage = "https://reactnative.dev/"
s.source = { :git => 'https://github.com/facebook/react-native.git', :tag => 'v#{version}' }
s.summary = "Macros for marking APIs as deprecated"
s.source_files = ["Exported/*.h", "RCTDeprecation.m"]
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
}
s.compiler_flags = "-Wnullable-to-nonnull-conversion -Wnullability-completeness"
end
1 change: 1 addition & 0 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"React.podspec",
"React",
"ReactAndroid",
"ReactApple",
"ReactCommon",
"README.md",
"rn-get-polyfills.js",
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def use_react_native! (
pod 'React-utils', :path => "#{prefix}/ReactCommon/react/utils"
pod 'React-Mapbuffer', :path => "#{prefix}/ReactCommon"
pod 'React-jserrorhandler', :path => "#{prefix}/ReactCommon/jserrorhandler"
pod "React-nativeconfig", :path => "#{prefix}/ReactCommon"
pod 'React-nativeconfig', :path => "#{prefix}/ReactCommon"
pod 'RCTDeprecation', :path => "#{prefix}/ReactApple/Libraries/RCTFoundation/RCTDeprecation"

if hermes_enabled
setup_hermes!(:react_native_path => prefix)
Expand Down

0 comments on commit 9d23af9

Please sign in to comment.