If you are using Unity 4.3.4 or earlier and have started using Xcode 6, you will find that your iOS builds fail due to a missing header in the CMVideoSampling.mm
. The manual fix is to add the following line to the file, every time you do a new build.
#include <OpenGLES/ES2/glext.h>
A better way is to automate it using Unity’s PostProcessBuild
functionality. Use the following code to patch the file automatically every time you do a build. Place the script in a folder called Editor.