iosnehotspothelper

How to cancel register an app as a Hotspot Helper (NEHotspotHelper)?


I wrote an app that registered as a Hotspot Helper by method below:

[NEHotspotHelper registerWithOptions:queue:handler:]

which is documented here.

After registered , as the document said

Once this API is invoked successfully, the application becomes eligible to be launched in the background and participate in various hotspot related functions.

Everything walks great.

But, how could I cancel the registration without dispatch a new release ? I want to provide an local configuration , so user could remove my app from hotspot helper.

  1. I tried not to call registerWithOptions:queue:handler after user config, but iOS system still launch the app in the background.
  2. And I know that I could disable some code in the handler (the 3rd parameter), but I just want to disable the app from launching in the background.

Does Apple provide some method to do that ? I searched everywhere with no result. Thanks for some ideas.


Solution

  • I have asked the same question in apple's forum.

    The answer is : There’s currently no way to do this.

    The link is https://forums.developer.apple.com/message/227038#227038