问题
I am currently working for a tech support company. I want to set up a script for our phone system that will check and see if a person's IPhone is powered on, and if not move to the next person in the escalation list. Or possibly try alternative numbers that we don't want to give out to the customers. (Personal cells, and in a real emergency there home number.)
I tried getting the IP address of my phone from what's my IP .com but I can't seem to ping that number.
:(
回答1:
In most cases (all?) an iPhone is going to be behind a NAT router/gateway of the 3G cellular provider that phone is connected to. Therefore the iPhone will not have a public IP address that you can ping. If the phone is connected to a WiFi network its likely to be acting as a NAT router as well and stop ICMP (ping) packets from reaching the device.
You're not going to be able to approach your problem from this perspective. Perhaps looking more at the Apple supplied "Find My Phone" would prove to be more productive.
回答2:
You can try the opposite. Create or buy a background-capable location based app which updates a database when the device is on and the app is live. Then just check the time stamps in the database.
回答3:
If you dont mind jail breaking iPhone. You can install openSSH and try ssh for each iphone. Problem with this is they must be in the wifi network.
来源:https://stackoverflow.com/questions/9863333/is-there-a-way-to-ping-an-iphone-to-see-if-its-turned-on