2026-07-28 22:34:27 +05:30
|
|
|
require 'json'
|
|
|
|
|
|
|
|
|
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
|
|
|
|
|
|
|
|
Pod::Spec.new do |s|
|
|
|
|
|
# NOTE: the pod name MUST be 'NativeCall' (PascalCase of the npm package name 'native-call').
|
|
|
|
|
# Capacitor's `cap sync` writes `pod 'NativeCall', :path => '../../plugins/native-call'` into the
|
|
|
|
|
# generated Podfile, and CocoaPods then looks for a file literally named NativeCall.podspec whose
|
|
|
|
|
# s.name is 'NativeCall'. Any other name → "No podspec found for `NativeCall`" and pod install fails.
|
|
|
|
|
s.name = 'NativeCall'
|
|
|
|
|
s.version = package['version']
|
|
|
|
|
s.summary = package['description']
|
|
|
|
|
s.license = package['license']
|
|
|
|
|
s.homepage = 'https://bizgaze.com'
|
|
|
|
|
s.author = 'BizGaze'
|
|
|
|
|
s.source = { :git => 'https://bizgaze.com/native-call.git', :tag => s.version.to_s }
|
|
|
|
|
s.source_files = 'ios/Sources/**/*.{swift,h,m}'
|
2026-08-01 18:48:57 +05:30
|
|
|
s.ios.deployment_target = '15.0'
|
2026-07-28 22:34:27 +05:30
|
|
|
s.dependency 'Capacitor'
|
2026-07-30 16:03:01 +05:30
|
|
|
# LiveKit iOS SDK — carries the call media NATIVELY so audio survives backgrounding AND coordinates with
|
2026-07-31 19:46:48 +05:30
|
|
|
# CallKit's audio session (auto-config OFF via AudioManager.shared.audioSession.isAutomaticConfigurationEnabled
|
|
|
|
|
# + setEngineAvailability in CXProvider didActivate/didDeactivate), which the WebView's WebRTC could not do.
|
|
|
|
|
# NOTE ON VERSION: this constraint stays '~> 2.0', but the actual version is pinned to 2.15.3 by a git-tag
|
|
|
|
|
# `pod 'LiveKitClient', :git => ...` line that ios-patch.sh injects into the generated Podfile — because the
|
|
|
|
|
# CallKit audio API needs 2.1+, which LiveKit publishes SPM-only (the CocoaPods TRUNK caps at 2.0.18, but the
|
|
|
|
|
# repo still ships a valid podspec at tag 2.15.3, and its deps are on trunk). 2.15.3 satisfies '~> 2.0'.
|
2026-07-31 19:35:57 +05:30
|
|
|
s.dependency 'LiveKitClient', '~> 2.0'
|
2026-07-28 22:34:27 +05:30
|
|
|
# CallKit + PushKit + AVFoundation are system frameworks (no external pod).
|
|
|
|
|
s.frameworks = 'CallKit', 'PushKit', 'AVFoundation'
|
|
|
|
|
s.swift_version = '5.1'
|
|
|
|
|
end
|