0

I need to pass the values between 2 cocoa application.I have explored 2 ways -

  1. Using NSDistributionNotification Center as in the below - how to pass parameters between cocoa applications

Problem here is this is does not seems to work in sandboxed scenario.

  1. Using MDAdditions class as in Pass arguments between Objective-C applications

Not sure, If this works in sandbox scenario. Problem here is I am not able to get changed arguments when it is reopen from dock scenario. It shows initial argument passed.Every time app2 is called/invoked from app1, different arguments will be passed. First time when app2 is opened, I am getting param. But when I hide/minimize app2 and it becomes active again (when app2 is called again from app1), it is not getting new argument. I need the param in applicationDidBecomeActive:.

Any solution for the above case?

Community
  • 1
  • 1

2 Answers2

0

I think you need distributed objects

Cy-4AH
  • 4,370
  • 2
  • 15
  • 22
0

the recommended way is to use XPC to pass arguments from one app to another as I get it

that works in sandbox mode too

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135