networkProcessWithInterruptionHandler:completion:
Launches a networking extension process asynchronously.
Declaration
+ (void) networkProcessWithInterruptionHandler:(void (^)()) interruptionHandler completion:(void (^)(BENetworkingProcess *process, NSError *error)) completion;Parameters
- interruptionHandler:
A block the system calls if the networking extension process exits abnormally.
- completion:
A block the system calls when the process finishes launching.
Discussion
Your browser app can run one instance of each of its networking extensions. The first time you call this method, the system launches your networking extension. If you subsequently call this method, or you call networkProcessWithBundleID:interruptionHandler:completion: with nil as the bundle identifier, your completion handler gets a reference to the same process.
The system guarantees that the process launched when it calls your completion handler.
This method is equivalent to calling networkProcessWithBundleID:interruptionHandler:completion:, passing nil as the bundle identifier.