Skip to content

Commit

Permalink
Crash fix, UI glitch fix, and rolling back OVPN
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulda1 committed May 16, 2019
1 parent e019131 commit d7ac927
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Confirmed Blocker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.3.2</string>
<string>1.3.3</string>
<key>CFBundleVersion</key>
<string>14</string>
<string>2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions Confirmed Tunnels/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.3.2</string>
<string>1.3.3</string>
<key>CFBundleVersion</key>
<string>14</string>
<string>2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
17 changes: 14 additions & 3 deletions ConfirmediOS/IPSecV3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class IPSecV3: NSObject, ConfirmedVPNProtocol {
let endpoint = endpointForRegion(region: savedRegion)
let localId = Global.keychain[Global.kConfirmedID]
let p12base64 = Global.keychain[Global.kConfirmedP12Key]

if localId == nil || p12base64 == nil {
completion(NSError.init(domain: "Confirmed VPN", code: 1, userInfo: nil))
return
}

let p12Data = Data(base64Encoded: p12base64!)

ipsecManager?.loadFromPreferences(completionHandler: {(_ error: Error?) -> Void in
Expand Down Expand Up @@ -221,9 +227,14 @@ class IPSecV3: NSObject, ConfirmedVPNProtocol {
}

func getStatus(completion: @escaping (_ status: NEVPNStatus) -> Void) -> Void {
self.ipsecManager?.loadFromPreferences(completionHandler: {(_ error: Error?) -> Void in
completion(self.ipsecManager?.connection.status ?? .invalid)
})
if self.ipsecManager == nil {
completion(.invalid)
}
else {
self.ipsecManager?.loadFromPreferences(completionHandler: {(_ error: Error?) -> Void in
completion(self.ipsecManager?.connection.status ?? .invalid)
})
}
}

var ipsecManager: NEVPNManager?
Expand Down
4 changes: 2 additions & 2 deletions ConfirmediOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.2</string>
<string>1.3.3</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>14</string>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSLocationAlwaysUsageDescription</key>
Expand Down
1 change: 0 additions & 1 deletion ConfirmediOS/VPNViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class VPNViewController: ConfirmedBaseViewController, BWWalkthroughViewControlle
self.vpnPowerButton?.isEnabled = true
}

TunnelsSubscription.refreshAndUploadReceipt()
}

func updateActiveCountry() {
Expand Down
4 changes: 2 additions & 2 deletions Today/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.3.2</string>
<string>1.3.3</string>
<key>CFBundleVersion</key>
<string>14</string>
<string>2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
Expand Down

0 comments on commit d7ac927

Please sign in to comment.