문제

Upon "Adding Files to Project ..." within Xcode that are either .mm or .cpp, Xcode pauses then crashes.

I have Xcode 4.4.1 installed with Phonegap 2.0.0 properly setup. I am using the Phonegap BarcodeScanner plugin from this master repo:

https://github.com/phonegap/phonegap-plugins/tree/master/iOS/BarcodeScanner

I changed the compiler from Apple LLVM 4.0 to LLVM GCC 4.2 through Xcode -> (Target Build) -> Build Settings -> Build Options -> Compiler for C/C++/Objective-C.

The following Frameworks are also added properly:

  • AVFoundation.framework
  • AssetsLibrary.framework
  • CoreVideo.framework
  • libiconv.dylib

There are 4 files that are required for the BarcodeScanner to function properly:

  • barcodescanner.js
  • CDVBarcodeScanner.mm
  • zxing-all-in-one.cpp
  • zxing-all-in-one.h

Upon adding the "zxing-all-in-one.h" file to my plugins folder and "barcodescanner.js" to the www/ directory, everything is fine. It's only when adding the .mm or .cpp files that Xcode crashes.

I have another MacBook Pro running Phonegap 1.7.0 and Xcode 4.4 and the barcode scanner works fine. What's happened in Phonegap 2.0.0 that is crashing? I looked through the FAQs and README documentation but couldn't find anything that worked. Thanks for the help!

도움이 되었습니까?

해결책

Sounds like a bug in your specific version of Xcode.

Works perfectly fine for me in Xcode 4.3.2. Try downloading an older version of Xcode or the latest beta.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top