Implementing AVFoundation

I'm trying to implement an avFoundation video player in Juce for Mac. I created a new class ( & player.h) , set the classes to be objective-c++, and wrote the outline. But as soon as i #import <AVFoundation/AVFoundation.h>, everyting breaks.

I'm getting issues with Finder.h etc...

Does anyone has a clue on how this could be? Am i forgetting someting?

Found the solution! disable the namespace for the current class :





Or you can just include AVFoundation before the juce headers?