tags:

views:

56

answers:

1

Hi there,

I have an application that runs fine on the simulator.

When trying to run on the actual iPhone, I get link errors that require the CoreVideo and CoreMedia frameworks - and then the application runs fine on the iPhone hardware and the iPhone simulator.

Unfortunately, as soon as I do that, the application crashes on the iPad simulator (and according to some report - on the iPad hardware too) - until I REMOVE the CoreMedia and CoreVideo frameworks... But then again it doesn't link for the iPhone hardware.

Catch 22...

I searched the internet high-and-low, but found no answer. I tried weak-linking to these frameworks, but is still didn't help - the iPad simulator crashes like mad...

Is there maybe a way to add a framework to a specific application?

EDIT
Based on Michal's comment, here's some more information.
1. I need these libraries for the h/w, in order to successfully link with the ZXing QR code scanning widget.
2. The iPad version of my software crashes as soon as it launches with the following error:

Attaching to process 73137. dyld: Library not loaded: /System/Library/Frameworks/CoreMedia.framework/CoreMedia Referenced from: /Users/admin/Library/Application Support/iPhone Simulator/3.2/Applications/CF1E8FD0-3E84-495F-B2CB-3A2BF5F1F916/myappname.app/myappname
Reason: image not found


EDIT

Thanks,

A: 

CoreVideo and CoreMedia are only available on iOS 4.0 and above. I presume the iPad simulator version you're trying to run is iPhone OS 3.2? If so it will crash unless you weak leak those frameworks and put appropriate conditional code checks around code that uses them.

Chris Gummer
Chris, everything you say makes lots of sense... Alas, I did weak link and conditionally call the code... So I'm looking for other ideas. Reuven
Reuven
What's the error message from the crash log?
Chris Gummer
Attaching to process 73137. dyld: Library not loaded: /System/Library/Frameworks/CoreMedia.framework/CoreMedia Referenced from: /Users/admin/Library/Application Support/iPhone Simulator/3.2/Applications/CF1E8FD0-3E84-495F-B2CB-3A2BF5F1F916/myappname.app/myappname Reason: image not found
Reuven
And what line of code in your app is causing the crash?
Chris Gummer
It crashes before my main...
Reuven
In that case, that suggests that the CoreMedia framework is not weakly linked. If it were your app would not be trying to load the library on start up before your main. Can you confirm what the library's type is set to in your Target's Linked Libraries section?
Chris Gummer