Is your start method called? What about your stop method? If so, what’s do you see passed to the reason parameter?
I managed to find the cause, I was using true
for both:
let providerConfiguration = NEFilterProviderConfiguration()
providerConfiguration.filterSockets = true
providerConfiguration.filterPackets = true
After changing filterPackets
to false
my extension didn't stop anymore!
I’m not sure I undertand this question. However, the code snippet you posted in reasonable enough.
Perfect, that's all I need to know right now! After my extension started working, I was able to disallow all incoming requests and verified my concept.
Btw, I found a small improvement in your guideline: https://developer.apple.com/forums/thread/725805
The next issue you’ll find is that choosing Product > Run runs the app from the build products directory rather than the Applications directory. To fix that:
Edit your app’s scheme again.
- On the left, select Debug.
Debug
was a bit unclear to me at first. I would better understand this if it was named Run
.
Btw, your instructions helped big time!