In my app I'm listening to didActivateApplicationNotification notifications and then add AXObserver to the app that was activated.
I've noticed that in some scenarios I got UnknownUIElement errors when I was trying to add an observable right after launching Chrome.
I think this is due to the fact that chrome has isFinishedLaunching = false when activated.
The solution for me is to listen for another additional event (didLaunchApplicationNotification), but you may want to consider adding a check for isFinishedLaunching in Application initializers.
In my app I'm listening to
didActivateApplicationNotificationnotifications and then addAXObserverto the app that was activated.I've noticed that in some scenarios I got
UnknownUIElementerrors when I was trying to add an observable right after launching Chrome.I think this is due to the fact that chrome has
isFinishedLaunching = falsewhen activated.The solution for me is to listen for another additional event (
didLaunchApplicationNotification), but you may want to consider adding a check forisFinishedLaunchinginApplicationinitializers.