I coding a VPN tool, using the NetworkExtension
framework. I can connect IPSec through NEVPNManager.sharedManager
, and can grab the notification when VPN connect status changed. But when I kill the app, and reopen it, the NEVPNManager.Connect.Status
always Zero, than means can't display the correct connect state. How to solve it?
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
William Sterling comment does make sense, & it works for me,
Before adding observer for
NEVPNStatusDidChange
load preferences for VPN Manager object like bellow,Try this:
The above code should generate the following messages when running the app with VPN already connected: