IOMobileFramebufferGetLayerDefaultSurface function failed on iOS 9
I created a app to capture screenshot in background. It works well on iOS 7.x & 8.x, but failed to execute on iOS 9 beta. Here's my code: CFMutableDictionaryRef sm = IOServiceMatching("AppleH1CLCD"); io_service_t ioService = IOServiceGetMatchingService(kIOMasterPortDefault, sm); if (!ioService) { sm = IOServiceMatching("AppleM2CLCD"); ioService = IOServiceGetMatchingService(kIOMasterPortDefault, sm); } if (!ioService) { sm = IOServiceMatching("AppleCLCD"); ioService = IOServiceGetMatchingService(kIOMasterPortDefault, sm); } IOMobileFramebufferConnection connection = 0; IOSurfaceRef ptr = nil;