Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
504 views
in Technique[技术] by (71.8m points)

core telephony - Detect if iPhone is in Airplane mode?

I need a way to detect if the iPhone is in Airplane Mode or not, I did some research and found:

iphone how to check the Airplane mode?

Which does not work, also I know I can set SBUsersNetwork to show an alert when in airplane mode, but it will ask user to switch on WIFI but my app need user to use 3G and WIFI simply does not work, so is there any straight forward way, in CoreTelephony that I can do my job?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Basically: no. You cannot do this. What you can do is use the Reachability samples from Apple to detect if a network connection is available.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...