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

  • Home
  • SEARCH
  • 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 6255393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:21:26+00:00 2026-05-24T14:21:26+00:00

Let’s say I need to give the user the ability to choose by a

  • 0

Let’s say I need to give the user the ability to choose by a preferences panel whether to use the app as “standard” (with dock icon and menu) or as an agent app (with status bar menu only).

I think I need to programmatically modify the app’s “Info.plist” during execution, changing the parameter “Application is agent” to YES/NO.

Is this the right way?

P.S. You can find this behavior in “Sparrow”.

  • 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-24T14:21:27+00:00Added an answer on May 24, 2026 at 2:21 pm

    You should not modify your app’s Info.plist file (or anything in your app’s bundle) at runtime. This is bad practice and will also break your app if it is code signed. This is more important nowadays as all apps on the app store must be code signed.

    A better option is to use the Application Services function TransformProcessType() to move your app from a background to a foreground app.

    First, set the LSUIElement key in your app’s Info.plist to YES and then check a user default at launch to determine if your app should be running as an agent or not:

    #import <ApplicationServices/ApplicationServices.h>
    
    @implementation AppDelegate
    
    - (void)applicationDidFinishLaunching:(NSNotification *)notification
    {
        if (![[NSUserDefaults standardUserDefaults] boolForKey:@"LaunchAsAgentApp"]) 
        {
            ProcessSerialNumber psn = { 0, kCurrentProcess };
            TransformProcessType(&psn, kProcessTransformToForegroundApplication);
            SetFrontProcess(&psn);
        }
    }
    
    @end
    

    Make sure you don’t forget to add the Application Services framework to your project.

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

Sidebar

Related Questions

let's say i want to build a smartphone app that tells a user when/where
Let's say I have a method in java, which looks up a user in
Let's say I have an facebook application running using the JS SDK. First user
Let's say, if I need to assign an id to element with first name,
Let me first say, my In App Purchase works. I have been struggling with
Let's say I have a user enter the URL of an image. After URL
Let's have an example like below: package xliiv.sandbox; import android.app.Activity; import android.os.Bundle; import android.util.Log;
Let's say I don't have photoshop, but I want to make pattern files (.pat)
Let me explain best with an example. Say you have node class that can
Let me try to explain by example. Say website is hosted at example.com (NOT

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.