So, I have a status bar app that, when I click on it, does a bunch of stuff like retrieving current artist, track, and so on...
So when the status bar is clicked I check
if([iTunes isRunning]){
NSLog(@"do my stuff...");
}
And it works very nice, but sometimes I get some issues when iTunes is launching or closing:
- If iTunes is launching (icon bouncing on the dock) and I click on the Status Bar icon of my App the "rainbow loading circle" (or beachball) appears when my mouse hovers the status bar icon and my App just freezes. When iTunes finishes launching and shows up my library window my Application continues its work without a problem. This is not a big concern because the app continues to work, even though it freezes when iTunes is launching.
- When iTunes is closing, and if I click on the status bar icon fast (before iTunes completely shuts down) enough, 2 things can happen: 1- iTunes will reopen, even though I chose to close it, and 2- iTunes is closed successfully but my app will freeze forever, the "rainbow loading circle" appears when my mouse hovers the status bar icon. Even if I try to open iTunes again, my app will stay that way. I have to go to Activity Monitor to stop the process.
Any ideas on how to fix some of these issues?
Thank you!