react-native-callkeep icon indicating copy to clipboard operation
react-native-callkeep copied to clipboard

Undefined symbol: _AVAudioSession when trying to build

Open KeKam opened this issue 3 years ago • 8 comments

Bug report

  • [X] I've checked the example to reproduce the issue.

  • Reproduced on:

  • [ ] Android

  • [X] iOS

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 "OBJC_CLASS$_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 avatar Jan 13 '22 13:01 KeKam

Any info regarding this ?

KeKam avatar Jan 28 '22 09:01 KeKam

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?

Romick2005 avatar Jan 28 '22 09:01 Romick2005

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 avatar Jan 28 '22 16:01 KeKam

I'm also not using any fork.

KeKam avatar Feb 03 '22 15:02 KeKam

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 avatar Jul 02 '22 06:07 dnx-xy

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

dnx-xy avatar Jul 02 '22 10:07 dnx-xy

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

elsieej avatar Jul 09 '22 16:07 elsieej

AVFAudio.framework

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

robertcoroianu avatar Aug 16 '23 08:08 robertcoroianu