Record iOS device screen from OSX cocoa app with lightning rod

This is possible in Quicktime, with a new video> Camera pop-up menu> select your iOS device. AppShow and Screenflow both do this.

I tried this

Applescript

tell application "QuickTime Player"
set myrec to new movie recording
  tell myrec
      set current camera to video recording device named "Morten iPod touch"
  end tell
end tell

But it gives me

Error "QuickTime Player received an error message: Cant installed the video recorder \" Morten iPod touch "of the video recorder on the video recorder named" Morten iPod touch "of the document" Video recorder "," "number -10006 from the video recorder "Morten iPod touch" of the Video Recording document

AVFoundation iOS Quicktime, , AVFoundation,

for device in AVCaptureDevice.devices() {
    println(device)
}

Facetime HD .

+4
2

, iOS OS X.

. " iOS 8 Yosemite?

CMIOObjectPropertyAddress   prop    = {
    kCMIOHardwarePropertyAllowScreenCaptureDevices,
    kCMIOObjectPropertyScopeGlobal,
    kCMIOObjectPropertyElementMaster
};
UInt32                      allow   = 1;

CMIOObjectSetPropertyData(kCMIOObjectSystemObject, &prop, 0, NULL, sizeof(allow), &allow);

, :

NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeMuxed];
+10
var property = CMIOObjectPropertyAddress(mSelector: CMIOObjectPropertySelector(kCMIOHardwarePropertyAllowScreenCaptureDevices), mScope: CMIOObjectPropertyScope(kCMIOObjectPropertyScopeGlobal), mElement: CMIOObjectPropertyElement(kCMIOObjectPropertyElementMaster))
var allow : UInt32 = 1
let sizeOfAllow = MemoryLayout<UInt32>.size
CMIOObjectSetPropertyData(CMIOObjectID(kCMIOObjectSystemObject), &property, 0, nil, UInt32(sizeOfAllow), &allow)
+2

All Articles