iCloud Find My iPhone Node Module
What is this for?
Apple provides some really excellent find my phone functions using it's iCloud website. I wanted to use this programmibly so I could track my phone without consuming a lot of additional battery life.
I also wanted a way to send very urgent alerts, for example "Oh no, the house is burning down!" so it will sound an alert even if my phone is on silent.
Before playing with this module, I highly recommend that you activate 2-factor authentication incase you accidentally share your credentials with the world. It won't stop somebody from locking your phone, but it will stop them from doing other nasty stuff or stealing your photos.
There is already another find-my-iphone node module available, but I felt it was a little bit rough for my needs, so I decided to code up this one.
npm install --save find-apple-device
You can create the instance using the following
var ICloud = ;var email = "firstname.lastname@example.org";var password = "PASSWORD_GOES_HERE!";var iCloud = email password;iCloud;
- silentLostDevice(deviceId, emailUpdates, callback)
- lostDevice(deviceId, callNumber, text, emailUpdates, callback)
- alertDevice(deviceId, subject, callback)
All methods return JSON, please see the examples linked above for more info on how to call each method.
Gives this json object (some data has been faked for privacy)
- eraseDevice(deviceId, callback)
- can we stop these annoying emails?
- how can we refresh the session easily?
- how can we check if we are logged in?
Feel free to submit any pull requests or add functionality, I'm usually pretty responsive.
If you like the module, please consider donating some bitcoin or litecoin.