iOS: kAudioComponentRegistrationsChangedNotification

I'm developing an AUv3 host, testing on iOS 11.4. I'd like the host to update its list of registered AudioUnits when a 3rd party AU is installed or uninstalled, so I use kAudioComponentRegistrationsChangedNotification as follows:


// Register to receive notifications when the list of registered AU plugins change
mComponentChangeObserverID = [[NSNotificationCenter defaultCenter] addObserverForName:(__bridge NSString*)kAudioComponentRegistrationsChangedNotification object:nil queue:nil usingBlock:^(NSNotification *note)
{
     // This block is called when the notification is received - obtain a list of available AUs which meet our criteria
     NSArray<AVAudioUnitComponent*> *pAVAudioComponents = [[AVAudioUnitComponentManager sharedAudioUnitComponentManager] componentsPassingTest: ^BOOL (AVAudioUnitComponent *zpComp, BOOL *zpStop)
     {
          // This block is called for each available audio component
          AudioComponentDescription Description([zpComp audioComponentDescription]);

          // Only interested in AUv3
          if ((Description.componentFlags & kAudioComponentFlag_IsV3AudioUnit) == 0)
               return NO;

          return YES;
          }];
     }
}];


Then, when I install or uninstall any 3rd party AU and return my host app to the foreground, it correctly receives this notification. So far so good.


However, when my host then enumerates the list of available audio components (using the code block above), it gets the same list of registered AUs as it obtained at start up


As an experiment I've tried using the notification to trigger a timer which then performs the component enumeration after a 10 second delay, but I still get the same problem. In fact, the only way to get my host to discover the changes is to close it down and restart it.


Has anyone had any luck with this?