Create an app that ask for admin rights

Discussion in 'Mac Programming' started by gaxel, Aug 8, 2011.

  1. gaxel macrumors newbie

    Aug 8, 2011
    Hi all,
    Sorry for my english.

    I have to create an app (c++ using xcode) that need to work with some files that require admin rights. There's a simple way do create an app that ask for the admin password on launch (like an installer)?

  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    Use the Authorisation Services framework. This is a low-level C framework so can be used equally from C++ and Objective-C. I would not say it's simple but you should be able to get your head around it.

    As for creating an installer. Don't. If your application needs an installer use the Apple one.

Share This Page