reachability - iOS: How to check if cellular data usage is on for an app? -
in app want able observe if cellular info usage on particular application, , depending on result of check deed appropriately.
is there way perform programmatic check?
go next link:
https://developer.apple.com/library/ios/samplecode/reachability/introduction/intro.html
download , import header , iplementation file, utilize code:
reachability *reachability = [reachability reachabilityforinternetconnection]; networkstatus status = [reachability currentreachabilitystatus]; if (status == reachableviawwan) { nslog(@"cellular data"); }
this project little old, might need turn arc mode off see answer:
how can disable arc single file in project?
ios reachability
No comments:
Post a Comment