Skip to content

Instantly share code, notes, and snippets.

@jaylyerly
Created January 9, 2015 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaylyerly/58a6c86942bc94af7b2b to your computer and use it in GitHub Desktop.
Save jaylyerly/58a6c86942bc94af7b2b to your computer and use it in GitHub Desktop.
Opt in to enable iOS device as AVCapture device
// Enable iOS device to show up as AVCapture devices
// From WWDC video 2014 #508 at 5:34
// https://developer.apple.com/videos/wwdc/2014/#508
CMIOObjectPropertyAddress prop = {
kCMIOHardwarePropertyAllowScreenCaptureDevices,
kCMIOObjectPropertyScopeGlobal,
kCMIOObjectPropertyElementMaster };
UInt32 allow = 1;
CMIOObjectSetPropertyData(kCMIOObjectSystemObject, &prop, 0, NULL, sizeof(allow), &allow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment