Latest 0.0.3
License MIT
Platforms ios 5.0, requires ARC
Frameworks AssetsLibrary

Detecting iOS screenshots ala Snapchat and Facebook Poke.

Current technique is to poll the user’s camera roll and check for new screenshot-esque images; if you would like to add another technique, definitely submit a pull-request!


[[ShotBlocker sharedManager] detectScreenshotWithImageBlock:^(UIImage *screenshot) {
    NSLog(@"Screenshot: %@", screenshot);

// Later on...

[[ShotBlocker sharedManager] stopDetectingScreenshots];

Also available are:

  • detectScreenshotWithBlock:^()
  • detectScreenshotWithBlock:^() andErrorBlock:^(NSError * error){}
  • detectScreenshotWithImageBlock:^(UIImage *screenshot) andErrorBlock:^(NSError * error){}

The NSError will occur if the user denies your app access to their photos.



pod 'ShotBlocker'
#import <ShotBlocker/ShotBlocker.h>


  1. Add ShotBlocker as a git submodule. Here’s how to add it as a submodule:
$ cd rootOfYourGitRepo
$ git submodule add Vendor/ShotBlocker
$ git submodule update --init --recursive
  1. Add ShotBlocker/ShotBlocker.h and ShotBlocker/ShotBlocker.m to your project, but don’t copy the files (so the location is relative).

  2. Add AssetsLibrary.framework to your project
#import "ShotBlocker.h"


Clay Allsopp

Latest podspec

    "name": "ShotBlocker",
    "version": "0.0.3",
    "summary": "Detecting iOS screenshots ala Snapchat and Facebook Poke.",
    "homepage": "",
    "authors": {
        "Clay Allsopp": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.3"
    "platforms": {
        "ios": "5.0"
    "source_files": "ShotBlocker/*.{h,m}",
    "frameworks": "AssetsLibrary",
    "requires_arc": true,
    "license": {
        "type": "MIT",
        "file": "LICENSE"

Pin It on Pinterest

Share This