require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) Pod::Spec.new do |s| s.name = "NitroChucker" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] # Wormholy 2.x (the iOS capture engine) requires iOS 16, so this pod does too. # Pin explicitly rather than min_ios_version_supported, which can resolve lower # (e.g. 15.1 on RN 0.83) and break the Wormholy import at compile time. s.platforms = { :ios => "16.0", :visionos => 1.0 } s.source = { :git => "https://github.com/Fluxlabs-tech/react-native-nitro-chucker.git", :tag => "#{s.version}" } s.source_files = [ # Implementation (Swift) "ios/**/*.{swift}", # Autolinking/Registration (Objective-C++) "ios/**/*.{m,mm}", # Implementation (C++ objects) "cpp/**/*.{hpp,cpp}", ] load 'nitrogen/generated/ios/NitroChucker+autolinking.rb' add_nitrogen_files(s) # Ensure our NitroChuckerCapture +load is linked. Under static frameworks the # linker dead-strips object files with no referenced symbols; -ObjC anchors any # file declaring an Obj-C class (ours does), so its +load swizzle runs at startup. s.user_target_xcconfig = { "OTHER_LDFLAGS" => "-ObjC" } s.dependency 'React-jsi' s.dependency 'React-callinvoker' # Network capture engine (SwiftUI-based, iOS 16+). Its own URLSession-swizzle # constructor is dead-stripped under static frameworks, so NitroChuckerCapture.m # re-installs it; the Swift impl drives the UI + the public setEnabled toggle. s.dependency 'Wormholy', '~> 2.4' install_modules_dependencies(s) end