|
|
#1 |
|
Block Screenshots of App?
I'm making a freemium art program for the Mac. One of the pay for features is being allowed to export the file in a non-propietary format. If people were allowed to take screenshots of the canvas in the free version, that'd obviously reduce the number of people willing to pay for the full version.
So, does anyone know how I can make a sandboxed app that will distort or block screenshots of its canvas? I'm okay with a non-bulletproof solution, I just want something that reduces the number of people who are content with working around it.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed. Like it on Facebook! |
|
|
|
0
|
|
|
#2 |
|
This used to work:
[window setSharingType:NSWindowSharingNone]; But it appears Apple broke something in 10.7.3, so it no longer prevents screenshots... Last edited by bumper314; Nov 14, 2012 at 08:09 PM. |
|
|
|
0
|
|
|
#3 | |
|
Quote:
Edit: :-/ I made a simple test app where all I had was a subclass of an NSWindow that immediately returned on keyDown, but it didn't do anything to block screen captures... it didn't even notice when the proper keys were pressed. 2X Edit: Tried to assign command-shift-4 to the About App menu item instead, it still completely failed to block screenshots... 3X Edit: Tried the code you suggested even though you said it didn't work. It actually blocks command-shift-4-space (window capture) and displays a message saying the window can't be captured, but it doesn't block command-shift-4 (selection capture) - even if the selected area includes the window. Giving up for now... I'm interested in hearing if anyone has any other suggestions for how to either: 1 - intercept attempts to take screenshots entirely or 2 - know that a screenshot is being taken and black out the window briefly to avoid having it included
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed. Like it on Facebook! Last edited by ArtOfWarfare; Nov 14, 2012 at 10:35 PM. |
||
|
|
0
|
|
|
#4 | |
|
Quote:
Just briefing through the NSWindow/NSView docs, it looks like you might be able to override a couple of methods to do this, but I am not sure what else they may effect, so you will have to experiment: dataWithEPSInsideRect: Returns EPS data that draws the region of the receiver within a specified rectangle. - (NSData *)dataWithEPSInsideRect NSRect)aRectParameters aRect A rectangle defining the region. Discussion This data can be placed on an NSPasteboard object, written to a file, or used to create an NSImage object. Availability Available in OS X v10.0 and later. See Also – writeEPSInsideRect:toPasteboard: Declared In NSView.h So you would have to create a custom class that extends NSWindow then if premium return the super class's method, if not return nil. |
||
|
|
0
|
|
|
#5 |
|
I don't code apps, but I know that the DVD player window is blank when doing screenshots- maybe there's a way to explore its code and find out how to blank out your windows as well. Good luck.
__________________
MacBook White 4,1 2010 model
|
|
|
|
0
|
|
|
#6 |
|
Put a watermark over the canvas. Obviously on export/save don't 'flatten' the watermark layer on top, and don't remove the watermark layer until it's a paid app.
__________________
Obama is a true statesman whose experience as a state senator, half-term US Senator & guest lecturer in a Constitutional Law class has fully prepared him to take control of our nuclear arsenal.-Me |
|
|
|
0
|
|
|
#7 | ||
|
Quote:
Quote:
I suppose I could just put a paid, unlocked, full version of the app on the MAS and then offer a free, uses private APIs to ensure you don't share, version of the app through my website... not sure if my web host would allow that or that Apple would be thrilled with me mentioning it in the app description on their store. --- :-/ Experimented with foidulus's method suggestion, but the system never seems to call that? Blocking various other apps from taking screenshots is pretty easy... as soon as the app loses focus, block the window... heck, it even blocks screenshots from the terminal command, because that involves switching to the terminal application (although it doesn't block Grab > Timed Screen Shot, if the user then clicks back on the window,) but I can't for the life of me come up with how to block users from just using the keyboard shortcuts... I tried using various TrackingRect methods but as soon as the user hits command-shift-4, it stops sending any updates until they either take a picture or hit escape.
__________________
Battery Status - On the Mac App Store
The only app that'll estimate when your wireless devices will need their batteries changed. Like it on Facebook! Last edited by ArtOfWarfare; Nov 16, 2012 at 11:51 PM. |
|||
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 02:56 AM.







NSRect)aRect
Linear Mode
