I have set kCGWindowSharingState to none for my app. Even though the sharing state is none, I am still able to record my app's content using the native screen recording app and third-party apps.
My App window detaills:
{
kCGWindowAlpha = 1;
kCGWindowBounds = {
Height = 700;
Width = 1000;
X = 1956;
Y = 105;
};
kCGWindowIsOnscreen = 1;
kCGWindowLayer = 0;
kCGWindowMemoryUsage = 2176;
kCGWindowName = "Create and Sell Online Training Programs - TrainerCentral";
kCGWindowNumber = 13352;
kCGWindowOwnerName = TrainerCentral;
kCGWindowOwnerPID = 95409;
kCGWindowSharingState = 0;
kCGWindowStoreType = 1;
}