from Kotlin code? If I try to write code that accesses it, I get this linking error:
Undefined symbols for architecture x86_64: "_OBJC___CLASS_$_AVAudioRecorder", referenced from: objc-class-ref in shared(result.o)
. I checked for other people having this problem, but it seems to mostly occur with external dependencies, while to the best of my knowledge
AVAudioRecorder
should be included in the standard iOS SDK. Is it related to me running the project in a simulator on an x86_64 Mac?
l
Landry Norris
07/28/2023, 4:44 PM
Simulator doesn't have a camera or mic on iOS. The symbol should exist, but even so, it won't work on simulator.
m
Marc
07/28/2023, 5:36 PM
I have found conflicting information about this on this internet, but I would at least like to be able to run the app for testing purposes. Is there a way to provide the missing symbols?
l
Landry Norris
07/28/2023, 5:42 PM
I'd add '-framework AVFoundation -framework AudioToolbox' to the linker flags (using cinterop). In the app, add AVFoundation.framework to the 'Link Binary with Libraries' section.