Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 426889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:31:27+00:00 2026-05-12T19:31:27+00:00

I seem to have the exact opposite problem than this question on stopping dock

  • 0

I seem to have the exact opposite problem than this question on stopping dock bounce.

I can’t get my app to continually bounce the dock icon!

I too hate continually bouncing dock icons, but in this case if the user doesn’t realise my app can’t launch, they could potentially lose hours of time tracking data.

Here’s my code that I’ve put in the app delegates applicationWillFinishLaunching: method.

if (!AXAPIEnabled()) {        // I'm checking that Accessibility is turned on

    NSAlert *alert = [[NSAlert alloc] init];
    [alert setAlertStyle:NSCriticalAlertStyle];
    [alert setMessageText:@"Lapsus cannot run."];
    [alert addButtonWithTitle:@"Open Accessibility Prefs..."];
    [alert addButtonWithTitle:@"Quit"];
    [alert setInformativeText:@"Lapsus needs \"Enable access for assistive devices\" in the Accessibility pane of System Preferences to be turned on."];

    [NSApp activateIgnoringOtherApps:YES];
    int attentionrequest = [NSApp requestUserAttention:NSCriticalRequest];

    NSInteger returnValue = [alert runModal];
    ....
    [NSApp cancelUserAttentionRequest:attentionrequest];
}

I’ve tried removing the requestUserAttention line.

I’ve tried putting the requestUserAttention line in lots of different places: directly before the runModal call, first thing etc.

I’ve tried removing the activateIgnoringOtherApps line.

No matter what I do, the dock icon bounces once then stops.

The user will probably see that my app as I’m bringing it to the front, but there is a possibility that if they click at the right time, their active application will hide the critical error message.

So I want something so that even when their dock is hidden, they know something’s not right.

I’m building this on Mac OS X 10.5 Leopard. Any ideas on what I’m doing wrong? Or does Leopard not support continually bouncing dock icons any more?

UPDATE:

I was putting the method call in applicationWillFinishLaunching:

As soon as I put it into applicationDidFinishLaunching:, and removed the activateIgnoringOtherApps: call, it worked as required.

However, my question still is “Can I bring my app to the front as well as bouncing the dock icon? From the first answer, it would seem not, although I’m not sure I understand why.

UPDATE:

I didn’t understand why because I wasn’t thinking it through. Now that it’s been pointed out to me that stealing focus means the dock got what it wanted, it makes perfect sense.

Conclusion

If you want the users attention, don’t use [NSApp activateIgnoringOtherApps:YES];

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:31:28+00:00Added an answer on May 12, 2026 at 7:31 pm

    If you send activateIgnoringOtherApps then you’re basically dismissing your own notification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.