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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -