sizeof.io

Snap webcam photos whenever you build your app

This is more of a fun experiment I wanted to try out today than anything signifigantly useful.

The goal: Take my photo whenever I build my application in Xcode.

First, install the imagesnap library from homebrew:

brew install imagesnap

Once all is good, open your project in Xcode, and add a new Run Script Build Phase.

Make sure to change the ~/Pictures/BuildPhotos/ to whatever directory you want to save your photos into.

imagesnap ~/Pictures/BuildPhotos/$(date +%y%m%d%H%M%S).png

XCode Run Script Build Phase

Now build your app!

Meeee!


All the photos will be timestamped, so the order will be logical if you plan on doing something with the photos :)