The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::FindMyiPhone::Device - Device object for WebService::FindMyiPhone

SYNOPSIS

  use WebService::FindMyiPhone;
  my $fmiphone = WebService::FindMyiPhone->new(
      username => 'email@address',
      password => 'YaakovLOVE',
  );
  my $iphone = $fmiphone->get_device_by( name => 'mmm cake');
  my $location = $iphone->location();
  $iphone->send_message(1, 'Where did I leave you?');

DESCRIPTION

WebService::FindMyiPhone::Device is the class used for WebService::FindMyiPhone devices. See the documentation there for more information.

Device objects are stored as a blessed hashref, the _parent key is a reference to the WebService::FindMyiPhone object that created it. The rest of the keys are directly from Apple. You are incouraged to inspect the data there and make use of anything interesting to you.

METHODS

send_message( $sound, $message, $subject )

Send a message to the device. $sound determines if a sound should be played with the message, a true value will cause a sound even if the phone or iPad is in silent mode. $message is the message to display. $subject is optional and defaults to 'Important Message'.

remote_lock($passcode)

Lock the device remotely and require $passcode to unlock.

location()

Returns a hashref with location data. Keys include latitude, longitude, horizontalAccuracy, positionType, isInaccurate, isOld , locationType, locationFinished, and timeStamp.

If <locationFinished> is false, the method will sleep 2 seconds, call the parent's update_devices method and check again. It will try up to 3 times and then return what it has.

Possible values for positionType are 'GPS' and 'Wifi'.

timeStamp is epoch time with milliseconds, divide by 1000 for standard time with milliseconds.

AUTHOR

Mike Greb <michael@thegrebs.com>

COPYRIGHT

Copyright 2013- Mike Greb

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO