Skip to content

Instantly share code, notes, and snippets.

@Piets
Created April 19, 2016 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Piets/a037be2735343fe73c526db7d0d665f6 to your computer and use it in GitHub Desktop.
Save Piets/a037be2735343fe73c526db7d0d665f6 to your computer and use it in GitHub Desktop.
Enable ScreenCaptureDevices in AVFoundation
//Allow ScreenCaptureDevices (iOS Devices connected via Lightning cable)
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