What about a specialized device that operates off of low energy bluetooth for communicating to the iphone? Something like this could be built with Arduino or Raspberry Pi.
John Muir, the American environmentalist of the 1800-1900's, built an "alarm clock" in 1862 that would dump the occupant off the bed at the defined time.