JUCE has helpers to interact with native macOS/iOS APIs, like juce::createNSURLFromFile, which are available when one #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1 before including JUCE’s header. Note that I’m not sure that this is the correct usage, and to make this work for me I also had to #include <AVFoundation/AVFoundation.h> and <objc/message.h> before JUCE.
After merging the latest OpenGL related changes, I now get the error “gltypes.h included before juce_gl.h”. I don’t get this error if not including AVFoundation first, but if I don’t, then including JuceHeader fails for “Use of undeclared identifier NSRange”
Update: My problem was specifically from including AVFoundation before JUCE. For JUCE itself Foundation would suffice and if I need its APIs I can move AVFoundation’s include to after.
Is there somewhere else that gltypes.h might be included? Perhaps you could try temporarily modifying gltypes.h to add an #error near the beginning. This should force the compiler to emit the chain of includes that eventually includes the gltypes header.