Skip to content

Conversation

@IanVS
Copy link
Contributor

@IanVS IanVS commented Jan 17, 2025

In older versions of iOS, it's not possible to call NETunnelProviderManager.loadAllFromPreferences() from inside the network extension process. We were seeing NETunnelProviderManager objects cannot be instantiated from NEProvider processes errors in iOS 16. It's unclear exactly when the change happened to allow it, but as far as we can tell it was in iOS 17.

To Test:

  1. On a real device running iOS 16, ensure that enrolling as a Managed Nebula host works correctly.
  2. Start the site.
  3. Update the host in the admin panel and wait at least 15 minutes for a checkForUpdate from the mobile client. You should get a Host renewed audit log for the host.
  4. Verify that there's a log for "Reloading Nebula" in the mobile host, and that it has an up-to-date config.

@IanVS IanVS requested review from johnmaguire and nbrownus January 17, 2025 13:32
let siteManager = site.manager
let shouldSaveToManager = siteManager != nil || ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 17, minorVersion: 0, patchVersion: 0))

newSite?.save(manager: site.manager, saveToManager: shouldSaveToManager) { error in
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be called from the NETunnelProviderManager process, in which case there is no manager, and we can't create one in older versions of iOS.

@IanVS IanVS merged commit 87c16ea into main Jan 17, 2025
3 checks passed
@IanVS IanVS deleted the ios-16-support branch January 17, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants