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' Pod::Spec.new do |s| s.name = "olopaysdk-react-native" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] s.platforms = { :ios => "14.0" } s.source = { :git => "https://github.com/ololabs/olo-pay-react-native.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm,swift}" # Include ComponentView files for Fabric support (new architecture) s.dependency "React-Core" s.dependency "OloPaySDK", "5.2.4" s.dependency "React-RCTFabric" # Fabric architecture configuration # Force FOLLY_HAS_COROUTINES=0 to avoid coroutine header issues s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_HAS_COROUTINES=0" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "$(inherited) \"$(PODS_TARGET_SRCROOT)/ios\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/Headers/Public/ReactCodegen\" \"$(PODS_ROOT)/Headers/Public/React-utils\"", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "CLANG_ENABLE_MODULES" => "YES", "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => "YES" } end