I am building an application for Mac OS X in which I want to use AVFoundation and CoreMedia framework. Problem is these frameworks are not available in Mac OS X 10.6. There are different projects in our application and some of the projects are using AVFoundation and CoreMedia and Our main project is not using these frameworks.
I want to run same application on Mac 10.6 and later so I tried weak linking for AVFoundation and CoreMedia framework. After setting Deployment target to 10.6 in my main project I set AVFoundation and CoreMedia as Optional in all other projects. I am building my application in 10.7 Mac and when I try to run it in 10.6 Mac OS X it is giving following errors:
Library not loaded: /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia
Referenced from: /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation
So it means it is still trying to load it so I think something is missing I checked Mac OS X reference also but not getting how to fix.
How to use -weak_framework
?
Like if I have two frameworks for weak linking AVFoundation and CoreMedia so what will be the syntax of -weak_framework
.