my iphone app runs in IOS 4.3 simulator but not any other IOS 4.0+ simulator. Even though, it shall run there.
I got the following errors -
GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".Attaching to process 71564. dyld: Symbol not found: _OBJC_CLASS_$_AVCaptureDevice Referenced from: /Users/qianfan/Library/Application Support/iPhone Simulator/4.2/Applications/XXXX-XXXX/XXXX.app/XXXX Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/AVFoundation.framework/AVFoundation in /Users/qianfan/Library/Application Support/iPhone Simulator/4.2/Applications/XXXX-XXXX/XXXX.app/XXXX sharedlibrary apply-load-rules all (gdb)
My app is using (statically referencing) latest ZXing iphone code (two versions tested as of 2011-03-31 2001-04-24).
I believe AVCaptureDevice is existing in all iOS 4.0 + AND zxing is supporting ios 4.0 +. when I do:
Macintosh:zxing-trunk XXX$ grep _OBJC_CLASS_$_AVCaptureDevice /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/AVFoundation.framework/* Binary file /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/AVFoundation.framework/AVFoundation matches
Any suggestions? what I shall look for here? Thank you so much.
I just want to mention that mmilo's answer (about changing the 'Required' to 'Optional') solved the problem for me. Simply click on the AVFoundation.framework (under the Frameworks folder in the Project view) and then make sure the Right most view window is open. That's where you can switch the "Target Membership" from Required to Optional.
My specific issue was the same as melvin's. I couldn't get my project to compile on the 4.2 simulator when using the 4.3 SDK because it couldn't find the AVCaptureDevice class.
AVFoundation framework doesn't work in simulator. Only on devices.
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