Skip to content

Commit

Permalink
RCTDeprecation cocoapods integration (#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

Differential Revision: D51184321
  • Loading branch information
philIip authored and facebook-github-bot committed Nov 11, 2023
1 parent bb7f4ac commit 7af712b
Show file tree
Hide file tree
Showing 4 changed files with 329 additions and 252 deletions.
1 change: 1 addition & 0 deletions packages/react-native/React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Pod::Spec.new do |s|
s.dependency "React-runtimescheduler"
s.dependency "Yoga"
s.dependency "glog"
s.dependency "RCTDeprecation"

if use_hermes
s.dependency 'React-hermes'
Expand Down
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"
s.pod_target_xcconfig = {
"DEFINES_MODULE" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
}
s.compiler_flags = "-Wnullable-to-nonnull-conversion -Wnullability-completeness"
end
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 @@ -128,7 +128,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
Loading

0 comments on commit 7af712b

Please sign in to comment.