4

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.

Community
  • 1
  • 1
Bharat Sharma
  • 3,926
  • 2
  • 17
  • 29
  • You would use `-weak_framework CoreMedia -weak_framework AVFoundation`. See https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Concepts/WeakLinking.html – trojanfoe Feb 20 '14 at 12:33
  • The problem is that your 10.6 machine has a copy of AVFoundation.framework installed but no CoreMedia.framework. Your app sees AVFoundation and loads it, but that fails because AVFoundation itself requires CoreMedia. – Greg Parker Feb 20 '14 at 22:10
  • 1
    Which OS version is installed on that machine? I don't think AVFoundation was part of 10.6.0. – Greg Parker Feb 20 '14 at 22:11
  • @GregParker I am on 10.7 Mac but I need to run this same application on 10.6 also. If you have any solution then you can please suggest me. – Bharat Sharma Feb 21 '14 at 05:02
  • Which OS version is installed on that machine? 10.6.0? 10.6.1? – Greg Parker Feb 21 '14 at 06:08
  • @GregParker machine is 10.6.8 but I want my application to run on 10.6.0 and above. Thanks.. – Bharat Sharma Feb 21 '14 at 06:11

0 Answers0