require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) Pod::Spec.new do |s| s.name = "LiveActivityKit" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] # Pod target is 15.1 so it installs on apps that still support iOS 15. The # ActivityKit code paths are guarded with `#available(iOS 16.1/16.2/17.2, *)` # and isolated in `LiveActivityManager`, so the Hybrid class still constructs # on iOS 15.x. s.platforms = { :ios => "15.1" } s.source = { :git => "https://github.com/aashir-athar/react-native-live-activity-kit.git", :tag => "#{s.version}" } # Our Swift HybridObject + the canonical shared `LiveActivityKitAttributes`. # NOTE: this intentionally does NOT include `plugin/swift` (the widget # extension template) — that file is copied into the generated extension # target by the config plugin, not compiled into the app pod. s.source_files = "ios/**/*.{swift,h,m,mm}" # ActivityKit is iOS 16.1+. Linking it weakly lets the app load on iOS 15.x # (symbols resolve lazily); every call site is `#available`-guarded. s.weak_frameworks = "ActivityKit" s.pod_target_xcconfig = { # Match the C++ standard Nitro's generated bridges are compiled with. "CLANG_CXX_LANGUAGE_STANDARD" => "c++20", "DEFINES_MODULE" => "YES", } # Add all files generated by Nitrogen (C++ bridges, autolinking, NitroModules dep). load File.join(__dir__, "nitrogen", "generated", "ios", "LiveActivityKit+autolinking.rb") add_nitrogen_files(s) # Pulls in React-Core / RCT-Folly / New Architecture deps (RN 0.71+). install_modules_dependencies(s) end