Has anyone else seen a problem with how an AppProxy provider extension is allocated and loaded?
I observed that each time startProxyWithOptions method is called that a new instance of NEAppProxyProvider subclass is created. The AppProxy is stopped by calling [self cancelProxyWithError:nil]. However, any static variables retain their values the next time that the AppProxy is started.
It is not a huge deal, but I wonder if this is the intended behavior. Singletons in particular will break if you are using the common pattern:
+ (id)sharedManager {
static dispatch_once_t onceToken;
dispatch_once(&onceToken_, ^{
instance_ = [[self alloc] init];
});
return instance_;
}I did not try Swift to see if it is similar behavior.