Method Call

  • Is it possible to call a method in an app that is not running causing it to load?

    -koko
  • I think the approach you would use is to employ -[NSWorkspace] to launch the other app on your behalf.

    Sent from my iPad

    On 2012-06-06, at 1:58 PM, koko <koko...> wrote:

    > Is it possible to call a method in an app that is not running causing it to load?
    >
    > -koko
  • On Jun 6, 2012, at 3:25 PM, Erik Stainsby wrote:

    > I think the approach you would use is to employ -[NSWorkspace] to launch the other app on your behalf.

    I was looking at that. Not sure how to determine if the app was launched that way and not by a user.

    Any suggestions?

    -koko
  • On 6/6/12 2:34 PM, koko wrote:
    > On Jun 6, 2012, at 3:25 PM, Erik Stainsby wrote:
    >
    >> I think the approach you would use is to employ -[NSWorkspace] to launch the other app on your behalf.
    >
    > I was looking at that. Not sure how to determine if the app was launched that way and not by a user.
    >
    > Any suggestions?

    Use –[NSWorkspace launchApplicationAtURL:options:configuration:error:]
    and set the configuration dictionary contents to something meaningful to
    the app being launched.

    You could probably also rig something up by registering your app to act
    as a custom protocol handler, then pass information in via the URI.
    This might be more useful if you want third-party apps to be able to
    easily open your app with certain options, but is likely a little
    messier than just launching with configuration options.

    Would you care to explain what your motivation is?  We might also be
    able to suggest an alternate approach entirely that would better suit
    your needs.

    --
    Conrad Shultz

    Synthetiq Solutions
    www.synthetiqsolutions.com
previous month june 2012 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today