455d16abcc
Root cause of the intermittent dead-mic / no-audio / late-speaker: LiveKit's
automatic AVAudioSession config races CallKit's activation. The fix needs the
2.15+ audio API, which the build wasn't getting ('~> 2.0' resolved an older 2.x
from a stale spec cache). So:
- NativeCall.podspec: pin LiveKitClient '~> 2.15'.
- codemagic.yaml: 'pod install --repo-update' so the spec repo knows 2.15.x.
- Plugin: disable LiveKit auto audio-session config + keep the engine OFF; in
CXProvider didActivate set the session category and enable the engine; in
didDeactivate disable it. Request mic permission on connect so enabling the
engine in didActivate doesn't block on undetermined permission.
All AudioManager APIs verified against the raw 2.15.3 source (setEngineAvailability,
AudioEngineAvailability.default/.none, audioSession.isAutomaticConfigurationEnabled).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
1.7 KiB
Ruby
31 lines
1.7 KiB
Ruby
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}'
|
|
s.ios.deployment_target = '14.0'
|
|
s.dependency 'Capacitor'
|
|
# LiveKit iOS SDK — carries the call media NATIVELY so audio survives backgrounding AND coordinates with
|
|
# 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.
|
|
# Pulls in the WebRTC binary transitively. PINNED to 2.15+: the CallKit audio-session coordination API
|
|
# (AudioManager.audioSession / setEngineAvailability) only exists in 2.15+, and '~> 2.0' was resolving an
|
|
# older 2.x on the build box (see the `pod install --repo-update` in codemagic.yaml).
|
|
s.dependency 'LiveKitClient', '~> 2.15'
|
|
# CallKit + PushKit + AVFoundation are system frameworks (no external pod).
|
|
s.frameworks = 'CallKit', 'PushKit', 'AVFoundation'
|
|
s.swift_version = '5.1'
|
|
end
|