I'm creating an iphone app using xcode 4.2, and trying to use the AVFoundation Framework to play some radio stream.
When i import it to the project's frameworks and the build, i get the following warning:
ld: warning: ignoring file /Users/xanthos/Documents/tabbartest/AVFoundation.framework/AVFoundation, file was built for unsupported file format which is not the architecture being linked (i386)
and of course when using anything of the framework (eg AVAudioSession) i get errors like:
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_AVAudioSession", referenced from:
objc-class-ref in RadioStreamer.o
I've read so many posts about how to compile AVFoundation Library, by i really don't get it, i'm really inexperienced in all these. I can see there's something with the linking of the library, but not completely understand it.
Any clues please?
Thank you in advance.
AVFoundation is a multimedia framework with APIs in Objective-C and Swift, which provides high-level services for working with time-based audiovisual media on Apple Darwin-based operating systems: iOS, macOS, tvOS, and watchOS. It was first introduced in iOS 4 and has seen significant changes in iOS 5 and iOS 6.
Frameworks are self-contained, reusable chunks of code and resources you can import into many apps. You can even share them across iOS, tvOS, watchOS and macOS apps.
AVFoundation is the full featured framework for working with time-based audiovisual media on iOS, macOS, watchOS and tvOS. Using AVFoundation, you can easily play, create, and edit QuickTime movies and MPEG-4 files, play HLS streams, and build powerful media functionality into your apps.
It looks like you have you copied AVFoundation.framework
from somewhere to your project directory. That's wrong. You just need to add it to the "Link Binary With Libraries" build phase of your project:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With