I'm trying to make an app that does something when you put your hand over the proximity sensor. I was looking at the apple docs. on UIDevice and can't find much information on how to actually do something when the sensor is covered. I would assume there is a method I have to put in my code for this but can't find it. Thanks.
Asked
Active
Viewed 3,392 times
1
-
I wish there were more answers for this. I have an Android app that is very much based on use of the proximity sensor, and there's no problem with that with Android. It would be nice to know how to do it with iOS, or a definitive answer saying that Apple simply does not allow it. There is one other question here at SO that has not been closed, but it doesn't help much. http://stackoverflow.com/questions/31270887/how-to-use-proximity-sensor-programmatically-with-ios-development – RenniePet Mar 06 '17 at 00:42
1 Answers
0
From your link, I get proximityMonitoringEnabled. I've ask google for this, and found this link : http://mobileorchard.com/new-in-iphone-30-tutorial-series-part-4-proximity-detection/
probably not the only one, but look ok.

Armand DOHM
- 1,121
- 1
- 7
- 9
-
I have looked, but all the posts that i have found are very outdated. I posted this to see if anyone knew information I didn't. Thanks for the link. – user3186310 Apr 06 '14 at 19:49
-
From Apple doc : proximityMonitoringEnabled : Available in iOS 3.0 and later. Also, we can easily imagine that old post are still ok (may be some adjustment are required if you use ARC....) – Armand DOHM Apr 06 '14 at 19:55