Proximity iPhones alert

HI, is there a way to create a reaction in iphone (in a program that runs on the background, like skype or facebook) that alert when another iphone is getting closer? (using gps i guess) how is it done? (dont need for information to pass between the iphone, only a local response) tnx,

amit.

It might be possible (something like that), but first thing you should ask is: what do you mean by "close". Precision of GPS is really low (it might be off by 100m, especially if you're in a building). Just see how low precision in map applications are.

You might be able to use bluetooth, with a small power output to decrease the range. This could have major issues with battery life, though, and I'm not sure unity has access to that level of detail.

You might be able to use something like http://prime31.com/unity/docs/#gameKitDoc to find the low level hook-in, but I think you would need to have it connect at a large distance, use the gps to figure out the rough location, then the accelerometer to get bearing and steps taken, and estimate the distance based on that.