networking - Sim card change detection in iOS -
somebody please code sim card detection change in ios on swift.
we have app lets users authenticate phone number , want detect when user changes sim(if app in background) , show alert asking if wants authenticate new number. want detect carrier change of phone.
in appdelegate (didfinishlaunching method):-
let info = cttelephonynetworkinfo() if let cellularprovider = cttelephonynetworkinfo().subscribercellularproviderdidupdatenotifier { dispatch_async(dispatch_get_main_queue(), { () -> void in print("notify sim change") }) }
this not detecting sim card change. doing wrong? please guide.
thanks in advance,
Comments
Post a Comment