Content Filter - iOS9 - Plugin does not have a bundle URL

Hello,


I am trying to get my iOS9 Content Filter up and running. I believe I have the app coded correctly, signed with the correct Network Extensions (which I have), and have the app running in debug mode on a supervised ipad through xcode. In my main code in the enclosing app I initialize the Content Filter's configuration and had accepted the popup asking the user to allow content filtering. However, the content filter never intializes, I can always see in my ipad's logs the following lines whenever the content filter tries to intiailize:


Jan 29 12:47:54 IOS9-Filtering-Test nesessionmanager[182] <Notice>: NESMFilterSession[com.xyz.iOS-MDM-Agent:C68A454B-898E-4677-B65B-A8A1FC0663C1]: Received a start command from nehelper[193]

Jan 29 12:47:54 IOS9-Filtering-Test nesessionmanager[182] <Notice>: NESMFilterSession[com.xyz.iOS-MDM-Agent:C68A454B-898E-4677-B65B-A8A1FC0663C1]: status changed to connecting

Jan 29 12:47:54 IOS9-Filtering-Test nesessionmanager[182] <Error>: Plugin com.xyz.iOS-MDM-Agent does not have a bundle URL

Jan 29 12:47:54 IOS9-Filtering-Test nesessionmanager[182] <Error>: Failed to find plugin com.xyz.iOS-MDM-Agent

Jan 29 12:47:54 IOS9-Filtering-Test nesessionmanager[182] <Notice>: NESMFilterSession[com.xyz.iOS-MDM-Agent:C68A454B-898E-4677-B65B-A8A1FC0663C1]: status changed to disconnected, last stop reason Plugin failed


I initialize the content filter directly through the code as shown below. The log output correctly identifies my app id but says my content filtering plugin does not have a bundle URL.


        let config = NEFilterProviderConfiguration()
        config.filterBrowsers = true
        config.filterSockets = true
        NEFilterManager.sharedManager().providerConfiguration = config
        NEFilterManager.sharedManager().enabled = true
        NEFilterManager.sharedManager().saveToPreferencesWithCompletionHandler { error in
            if let saveError = error {
                NSLog("Failed to save the filter configuration: \(saveError)")
                return
            }
        }


Thank you for any input!


-David

Replies

The message Plugin *** does not have a bundle URL means that that the session manager found your plug-in but somehow failed to record the bundle’s URL. That’s kinda weird. What does

pluginkit -m -v
show for your plug-in? Have you tried
pluginkit -a ***
to force the registration?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi Quinn, Thank you for your quick response. The answer was something simpler and more attributable to me not being fully accustomed to the xcode build system. In the build phase which copied my two app extensions into the main app they were being copied into the "Frameworks" folder instead of the "Plugins" folder :S. After figuring this out everything started working correctly. Thanks again!

Hi eskimo

I have also encountered this problem.

I don't know about 'PLUGIN_BUNDLE_ID' in User-Defined. It should be seted with my Bundle identifier or something else?

What is plugin?

Thank you for any input!

How did you do that toaomtoaom ? I have the same error logs and I don't really understand what you have meant there.