1# Copyright (c) Meta Platforms, Inc. and 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 6require "json" 7 8package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json"))) 9version = package['version'] 10 11 12 13folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1' 14folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32' 15 16new_arch_enabled_flag="RCT_NEW_ARCH_ENABLED" 17is_new_arch_enabled = ENV[new_arch_enabled_flag] == "1" 18other_cflags = "$(inherited) -DRN_FABRIC_ENABLED " + folly_flags + (is_new_arch_enabled ? " -D"+"RCT_NEW_ARCH_ENABLED" : "") 19 20use_hermes = ENV['USE_HERMES'] == '1' 21 22header_search_paths = [ 23 "$(PODS_TARGET_SRCROOT)/ReactCommon", 24 "$(PODS_ROOT)/Headers/Private/React-Core", 25 "$(PODS_ROOT)/boost", 26 "$(PODS_ROOT)/DoubleConversion", 27 "$(PODS_ROOT)/RCT-Folly", 28 "${PODS_ROOT}/Headers/Public/FlipperKit", 29 "$(PODS_ROOT)/Headers/Public/ReactCommon", 30 "$(PODS_ROOT)/Headers/Public/React-RCTFabric" 31].concat(use_hermes ? [ 32 "$(PODS_ROOT)/Headers/Public/React-hermes", 33 "$(PODS_ROOT)/Headers/Public/hermes-engine" 34] : []).map{|p| "\"#{p}\""}.join(" ") 35 36Pod::Spec.new do |s| 37 s.name = "ABI48_0_0React-RCTAppDelegate" 38 s.version = version 39 s.summary = "An utility library to simplify common operations for the New Architecture" 40 s.homepage = "https://reactnative.dev/" 41 s.documentation_url = "https://reactnative.dev/docs/actionsheetios" 42 s.license = package["license"] 43 s.author = "Facebook, Inc. and its affiliates" 44 s.platforms = { :ios => "12.4" } 45 s.source = { :path => "." } 46 s.source_files = "**/*.{c,h,m,mm,S,cpp}" 47 48 # This guard prevent to install the dependencies when we run `pod install` in the old architecture. 49 s.compiler_flags = other_cflags 50 s.pod_target_xcconfig = { 51 "HEADER_SEARCH_PATHS" => header_search_paths, 52 "OTHER_CPLUSPLUSFLAGS" => other_cflags, 53 "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "DEFINES_MODULE" => "YES", 54 } 55 s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} 56 57 s.dependency "ABI48_0_0React-Core" 58 s.dependency "RCT-Folly" 59 s.dependency "ABI48_0_0RCTRequired" 60 s.dependency "ABI48_0_0RCTTypeSafety" 61 s.dependency "ABI48_0_0ReactCommon/turbomodule/core" 62 63 if is_new_arch_enabled 64 s.dependency "ABI48_0_0React-RCTFabric" 65 s.dependency "ABI48_0_0React-graphics" 66 end 67end 68