XCode Errors: "_AVCaptureSession" - Unity 3.5 compile problems?

I’m getting errors from XCode when I try to export a Unity project (which I have successfully published Previous to Unity 3.5 - with ver. 3.4 - to iPhone and also the Simulator)

There are 8 errors - I’ve tried starting a brand new Build, Quit/Restart XCode a few times - and turned on Symlink Unity Libraries - but no success…

Anyway - can anyone tell me what I need to adjust?
It’s referenceing VIDEO, so there is a chance I have an old video-texture based player floating somewhere in the files - will search and see if I can remove it - but in the meantime- can you take a look and see if some of the other errors here can be fixed?

Appreciated Much!

Here is the FULL set of (x8) errors:

ld: warning: directory '"/Users/djkr/MCTG(iPHONE5)"' following -L not found

ld: warning: directory ‘“/Users/djkr/MCTG(iPHONE5)/Libraries”’ following -L not found

“_AVCaptureSessionPresetLow”, referenced from:

  _AVCaptureSessionPresetLow$non_lazy_ptr in libiPhone-lib.a(VideoTexture.o)

 (maybe you meant: _AVCaptureSessionPresetLow$non_lazy_ptr)

OBJC_CLASS$_AVCaptureVideoDataOutput”, referenced from:

  objc-class-ref-to-AVCaptureVideoDataOutput in libiPhone-lib.a(VideoTexture.o)

OBJC_CLASS$_AVCaptureSession”, referenced from:

  objc-class-ref-to-AVCaptureSession in libiPhone-lib.a(VideoTexture.o)

“_AVCaptureSessionPreset640x480”, referenced from:

  _AVCaptureSessionPreset640x480$non_lazy_ptr in libiPhone-lib.a(VideoTexture.o)

 (maybe you meant: _AVCaptureSessionPreset640x480$non_lazy_ptr)

“_AVCaptureSessionPreset1280x720”, referenced from:

  _AVCaptureSessionPreset1280x720$non_lazy_ptr in libiPhone-lib.a(VideoTexture.o)

 (maybe you meant: _AVCaptureSessionPreset1280x720$non_lazy_ptr)

OBJC_CLASS$_AVCaptureDeviceInput”, referenced from:

  objc-class-ref-to-AVCaptureDeviceInput in libiPhone-lib.a(VideoTexture.o)

“_AVCaptureSessionPresetMedium”, referenced from:

  _AVCaptureSessionPresetMedium$non_lazy_ptr in libiPhone-lib.a(VideoTexture.o)

 (maybe you meant: _AVCaptureSessionPresetMedium$non_lazy_ptr)

OBJC_CLASS$_AVCaptureDevice”, referenced from:

  objc-class-ref-to-AVCaptureDevice in libiPhone-lib.a(VideoTexture.o)

ld: symbol(s) not found

collect2: ld returned 1 exit status

I got the ANSWER!

I’m answering my own question after several failed attempts…

TO FIX UNITY 3.5 Problems exporting to iOS (to XCODE) - You may want to try checking/doing the following:

  1. I was using XCODE 3.2.5 (LoL)… so: DOWNLOAD XCODE 4.2 (Depending on your system - make sure you have 10.6 or higher)


  1. Upgrade your Mac’s System Software (I tried installing, and got INSTALLATION FAILED - I didnt have an updated system (LoL2) )

  2. INSTAL XCODE 4.2 (and Restart after the install)

  3. TRY IT EXPORTING WITH UNITY 3.5 to your new XCode after Restarting/Upgrading…
    You might want to make sure when you BUILD AND RUN you project - that you:
    a) first USE A NEW Build NAME/FOLDER for your EXPORT (or REPLACE the previous Attempt)
    b) second make sure that ‘Symlink Unity Libraries’ IS CHECKED! (in the BUILD SETTINGS)

Hope this helps… it took me a while to do all the Upgrading, Restarting, Builds, etc… so give yourself about 1-4 hours, because it depends on how ‘old’ (not upgraded) your system is…


The other thing which can help is to Clean the build in XCode. This is because recent versions of Xcode will treat a project at the same path as sharing the same intermediate object data in its temp directory. When Unity completely replaces an existing project, XCode can still be using an old object file.

This is one of the reasons why the tip to use a new build folder name from Kris works, but even if you delete the folder and recreate it from Unity, XCode may need that Clean before it will build the project properly!