Detect Wallpaper Change - objective-c

First: I am not a c coder myself, but I have an idea and made some research.
Before going through errands trying to find a coder for this, I would like to ask people with experience on the subject if it's even possible.
Detect if the desktop wallpaper has been changed. (note: I am not asking to get the actual file, only for a way to check change has occurred)
use key observer or poll desktopImageURLForScreen (will this even give the current path in sandboxed mode?)
I also found this, but it does not seem to work
Notification when desktop wallpaper changes?
Does anybody else now of ways to accomplish this ? Preferably in a sandboxed way.

Related

How to bypass the Hotmart platform module countdown

I need to download some video lessons from a Hotmart course, but some modules of that course haven't been "released" yet due to a countdown on the page. I wanted to know if there is any way to break this timer and have access to the video code so that I can download it later on youtube-dl.
I'm not a programmer so I haven't tried anything and I haven't even found a solution for this due to not knowing how to specifically research this. I think it has something to do with Javascript.

How can I capture shift-command-3/4 in Cocoa [duplicate]

I have an image application and I want to release it where unregistered users can view the files but cant save until they've registered.
I'm looking for a way to prevent the user from using the built in screenshot functionality so I don't have to watermark the images. How might I accomplish this?
-- Edit Below --
I decided to watermark the images. I had been trying to avoid watermarking since the images are stereoscopic but I'm rather happy about how the watermark looks now. I put a logo in the corner and offset it enough on each image so it appears in the foreground.
Whether people agree with it in practice or not, my question is still valid. Apple's DVD Player hides the video in its screenshots, which doesn't altogether stop the user from taking screenshots but accomplishes my original goal.
I would still very much like to know how to do this. (the DVD player way)
Based on a symbols search through DVD Player, it likely uses the private API CGSSetWindowCaptureExcludeShape. Richard Heard has been kind enough to reverse engineer it and wrap it for easy use.
Being private, it may stop working (or have already stopped working) at any time.
But ultimately the answer to your question is "yes, but not in any publicly documented way". Some other takeaways from this lengthy thread are:
Asking this question inevitably excites a lot of myopic moral outrage.
Given there's no public method, reverse engineering DVD Player is a useful path to pursue.
A request to Apple DTS might be the only reliable method to find an answer.
DVD Player does this (the user can still take the screenshot, but the player window doesn't appear in it), so I'm sure there's a way. Maybe setting the window's sharing type to NSWindowSharingNone?
One option that is very user hostile is to change the folder in which screen captures are stored to a /dev/null style directory by changing the com.apple.screencapture setting.
A huge downside of this is that you might mess up the users settings and not being able to restore them if the exit from your application isn't clean.
Another option is to keep track of what files that are created in the screen capture location, see if they match the pattern for name and then remove them.
This method is still quite hostile though.
I also investigated if it was possibility to kill the process that handle the screen capture, unfortunately the process that handles it, SystemUIServer just reboots after being killed.
SystemUIServer seems to refuse taking screenshots if DVD Player currently is playing a DVD. I have no idea how the DVD playback detection works though, but it might be a lead to prevent screenshots.
Links
Technical details about Screenshots in Mac OS X
com.apple.screencapture details
ScreenCapture.strings - List of error messages from ScreenCapture
Disclaimer before people start ranting: I have a legit reason to solve this problem, but won't use the com.apple.screencapture -> /dev/null method due to it's downsides.
You could try to run your application fullscreen and then capture all the keystrokes. But please listen to siride.
No; that's a system feature.

Importing Code From Online

I know its a bit of a far fetched question.
But is it possible to import code from online, like say I had a .h and .m file on my website server and in the code I wanted to use it would I be able to import it? And How?
I ask this because it makes it loads easier to update an app if all they need to do is reload the app and the app changes to the latest version.
If you're talking about a Mac OS X application, then yes it's possible. No need to share your source code, just compile on the server and have the app download the new binary.
However, if your App needs to go through the App Store, which is necessary for iOS apps, then this surely is not possible. The only thing you can do is streamline the submission process as much as possible (see this question).
If you love the idea of being able to push new code at any time, consider making a web app. There's lots of stuff you can do these days.
I'm not 100% (maybe 95%) sure but I think storing objc code online to keep it auto-upgradable is not possible since the app isn't able to rebuild itself.
But if you want you could do a generic app that firstly fetches an XML/plist (for example) stored online to retrieve data and the app is set to read it and present different behaviours depending on that, but you'll have to code it previously in a generic way to support dynamic changes.
Hope this helps.

How to tell iOS that Speak Selection should be turned on

Is there a way to tell iOS that the Accessibility feature Speak Selection should be turned on?
I thought there might be a way similar to location service where as soon as you start using it, iOS asks the user to turn it on.
I know that Speak Selection is used in a more 'passive' way, but perhaps someone knows the trick, especially now that you cannot open the Settings app using "prefs:root..." anymore since iOS 5.1

Capture mac screen

What is the best way to record the mac screen with cocoa? I know there are many examples at the apple developer reference library. SonOfGrab explain how to capture the screen with quartz but also that it isn't enough fast to use it to grab many frames every second. OpenGLScreenSnapshot has same results but it isn't fast, too. OpenGLScreenCapture seems to be the best way to do it but XCode prompts me many errors because it's made for 10.4 and it requires old Quicktime commands I think they pushed into QTKit but I can't find a way to convert it. Could anyone send me to someone's site that converted the project or tell me if there are some other ways to do it. Thanks in advance.
OpenGL would be the way to go. You should still be able to use the OpenGLScreenCapture sample if your architecture is set to 32-bit. (QuickTime is not available in 64-bit.)
-Ken