require 'json' package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json'))) podfile_properties = JSON.parse(File.read("#{Pod::Config.instance.installation_root}/Podfile.properties.json")) rescue {} new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1' new_arch_compiler_flags = '-DRCT_NEW_ARCH_ENABLED' compiler_flags = '' if new_arch_enabled compiler_flags << ' ' << new_arch_compiler_flags end Pod::Spec.new do |s| s.name = 'bitmovin-player-react-native-analytics-conviva' s.version = package['version'] s.summary = package['description'] s.description = package['description'] s.license = package['license'] s.author = package['author'] s.homepage = package['homepage'] s.platforms = { :ios => '15.1', :tvos => '15.1' } s.swift_version = '5.10' s.source = { git: 'https://github.com/bitmovin/bitmovin-player-react-native-analytics-conviva', :tag => "v#{s.version}" } s.static_framework = true s.dependency 'ExpoModulesCore' s.dependency 'RNBitmovinPlayer' s.dependency 'BitmovinConvivaAnalytics', '>= 3.6.1' # Swift/Objective-C compatibility s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'OTHER_SWIFT_FLAGS' => "$(inherited) #{new_arch_enabled ? new_arch_compiler_flags : ''}", } s.compiler_flags = compiler_flags s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}" end