react-native-webrtc / react-native-callkeep

iOS CallKit framework and Android ConnectionService for React Native
ISC License
923 stars 445 forks source link

Undefined symbol: _AVAudioSession when trying to build #513

Open KeKam opened 2 years ago

KeKam commented 2 years ago

Bug report

Description

When trying to build for iOS with Xcode 13.2.1 it fails with unless we manually add AVFAudio.framework

Undefined symbol: _AVAudioSessionInterruptionTypeKey Undefined symbol: _AVAudioSessionInterruptionOptionKey Undefined symbol: _AVAudioSessionInterruptionNotification Undefined symbol: _AVAudioSessionCategoryPlayAndRecord Undefined symbol: _AVAudioSessionModeVoiceChat Undefined symbol: OBJC_CLASS$_AVAudioSession

Steps to Reproduce

Build in XCode 13.2.1

Versions

- Callkeep: 4.3.1
- React Native: 0.66.3
- iOS: 13.6
- Phone model: iPhone 6s

Logs

Undefined symbols for architecture arm64: "_AVAudioSessionInterruptionNotification", referenced from: -[RNCallKeep provider:didActivateAudioSession:] in RNCallKeep.o "_AVAudioSessionPortBuiltInSpeaker", referenced from: +[RNCallKeep formatAudioInputs:] in RNCallKeep.o +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_AVAudioSessionCategoryPlayAndRecord", referenced from: +[RNCallKeep getAudioInputs] in RNCallKeep.o -[RNCallKeep configureAudioSession] in RNCallKeep.o "_AVAudioSessionModeDefault", referenced from: -[RNCallKeep configureAudioSession] in RNCallKeep.o "_AVAudioSessionInterruptionOptionKey", referenced from: -[RNCallKeep provider:didActivateAudioSession:] in RNCallKeep.o "_AVAudioSessionPortBuiltInMic", referenced from: +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_AVAudioSessionPortHeadsetMic", referenced from: +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_AVAudioSessionPortBluetoothHFP", referenced from: +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_AVAudioSessionPortBluetoothA2DP", referenced from: +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_OBJCCLASS$_AVAudioSession", referenced from: objc-class-ref in RNCallKeep.o "_AVAudioSessionPortHeadphones", referenced from: +[RNCallKeep getAudioInputType:] in RNCallKeep.o "_AVAudioSessionInterruptionTypeKey", referenced from: -[RNCallKeep provider:didActivateAudioSession:] in RNCallKeep.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

KeKam commented 2 years ago

Any info regarding this ?

Romick2005 commented 2 years ago

I am using my custom version in fork: in package.json
"react-native-callkeep": "git+https://github.com/Romick2005/react-native-callkeep.git", and do not have such issue.

Have you add #import "RNCallKeep.h" in AppDelegate.m?

KeKam commented 2 years ago

Yes #import "RNCallKeep.h" is added in AppDelegate.m. The library works but in order to be able to build it with XCode I have to manually add the AVFAudio.framework.

KeKam commented 2 years ago

I'm also not using any fork.

dnx-xy commented 2 years ago

hi im still having this issue. adding AVFAudio.framework doesnt solved the issues. Even fork form Romick2005 doesnt solved.

Im using RN Firebase with use_frameworks!

dnx-xy commented 2 years ago

hi im still having this issue. adding AVFAudio.framework doesnt solved the issues. Even fork form Romick2005 doesnt solved.

Im using RN Firebase with use_frameworks!

got solved in Podfile insert this

pre_install do |installer| installer.pod_targets.each do |pod| if pod.name.eql?('RNCallKeep') def pod.build_type Pod::BuildType.static_library end end end end

elsieej commented 2 years ago

@1stblood i spent 3 days for research how to found solution, tks you so much becuz save my life.

robertcoroianu commented 1 year ago

AVFAudio.framework

Hi, How I can add the AVFAudio.framework? I've just started to develop first time on ios.