How to enable IOSurfaceRef

I am trying to build an application using private APIs to take screenshots from the background. I found this example: Taking Screenshots in the Background (iOS) - Improving Performance

In the author's code, the first line uses the IOSurfaceRef type. Can anyone explain to me how to include this in my code? I tried linking IOSurfaceAPI.h (where I defined IOSurfaceRef), however it didn't work.


source to share

1 answer

First, let's start with how to link Frameworks

/Applications/ MacOSX10.11.sdk /System/Library/Frameworks/IOSurface.framework/Versions/A/Headers

  1. go to /Applications/ and create a folder called Headers

replace iPhoneOS.platform with iPhoneSimulator.platform , paste the headers into the simulator SDK folder if you want to try apps on the simulator

  1. insert all files inside

You can now use the IOSurface Framework



All Articles