It is not easy to train a dog to use an iPhone--the ergonomics just aren't right and dogs don't have opposable thumbs. Now there's an answer, BuzzTrain.
The BuzzTrain fits on your dog's collar and communicates wirelessly with your smartphone or computer. A camera and microphone allows you to see and hear what your fur-baby is up to. Access real-time GPS coordinates and give commands via buzzer.
Here's the code: https://github.com/425michael/425michael
Check out this video from PBS! Researchers at the North Carolina State University are investigating new ways to talk with dogs!