Xcode4 "dyld: Character not found: _OBJC_CLASS _ $ _ AVCaptureDevice" error

my iphone app works in iOS 4.3 simulator, but not in any other iOS 4.0+ simulator. Despite this, he must work 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 modify it and / or distribute it under certain conditions. Type "show copy" to see the conditions. There are absolutely no guarantees for GDB. Enter "show warranty" for more information. This GDB has been configured as "x86_64-apple-darwin". Getting Started Processing 71564. dyld: Symbol not found: _OBJC_CLASS _ $ _ AVCaptureDevice Link 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 application uses (statically referenced) the latest ZXing iphone code (two versions tested for 2011-03-31 2001-04-24).

I believe that AVCaptureDevice exists in all iOS 4.0+, and zxing supports ios 4.0+. when i do this:

Macintosh: zxing-trunk XXX $ grep _OBJC_CLASS _ $ _ AVCaptureDevice / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator4.3.sdk / System / Library / Frameworks / AVFoundation.framework / * Binary / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator4.3.sdk / System / Library / Frameworks / AVFoundation.framework / AVFoundation corresponds

Any suggestions? What will I look for here? Thank you very much.

+6
source share
3 answers

I just want to mention that mmilo's answer (about changing "Required" to "Optional") solved the problem for me. Just click AVFoundation.framework (in the Frameworks folder in the Project view), and then make sure that the Right most view window is open. This means that you can switch "Target Membership" from "Required" to "Advanced."

My specific problem was the same as Melvin's. I could not build my project on simulator 4.2 when using the 4.3 SDK, because it could not find the AVCaptureDevice class.

+8
source

The AVFoundation structure does not work in the simulator. Only on devices.

+3
source

It looks like your project is not affiliated with AVFoundation. Perhaps you are referring to version level or something like that? This explains why it is built on one and not on the other.

0
source

Source: https://habr.com/ru/post/886573/


All Articles