require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) Pod::Spec.new do |s| s.name = "CheckoutReactNativeComponents" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/checkout/checkout-react-native-components.git", :tag => "#{s.version}" } # TODO: Ignore until we have a way to automate the installation of the frameworks # NOTE: ios_sdk_version should be bumped manually when updating the iOS Components SDK. # In the future, this will match the RN SDK release version. # ios_sdk_version = "1.7.0" # ios_sdk_sha256 = "e0148b3f16bb2d54a9f4bd36c861961f1c621ba5db3aca8afb7b4e01a802294b" # s.prepare_command = <<-CMD # set -euo pipefail # curl -L "https://github.com/checkout/checkout-ios-components/releases/download/#{ios_sdk_version}/CheckoutComponentsSDK.xcframework.zip" \ # -o /tmp/CheckoutComponentsSDK.zip # echo "#{ios_sdk_sha256} /tmp/CheckoutComponentsSDK.zip" | shasum -a 256 -c - # unzip -o /tmp/CheckoutComponentsSDK.zip -d ios/frameworks/ # rm -rf ios/frameworks/__MACOSX # CMD s.ios.vendored_frameworks = [ "ios/frameworks/CheckoutComponentsSDK.xcframework", ] s.dependency 'Risk' s.source_files = "ios/**/*.{h,m,mm,cpp,swift}" s.private_header_files = "ios/Sources/*.h" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'SWIFT_OBJC_INTERFACE_HEADER_NAME' => 'CheckoutReactNativeComponents-Swift.h' } install_modules_dependencies(s) end