I assume this inbound communication would happen through Apple events.
That’s one option, but not your only option.
Would it be feasible to reply to these events as well as the
communication needs to be bidirectional?
Yes. Apple events use the request/response model, and the Apple event subsystem ensures that, when you receive an Apple event request, you’re granted the capability to reply to it.
How is a man in the middle attack prevented with Apple events?
Apple events are traditionally targeting via bundle ID, which is definitely susceptible to Mallory-in-the-middle attacks. However, there are other targeting models, like typeProcessSerialNumber, that are not easily impersonated. The receiver can also use Apple event attributes to further validate the sender (like keySenderApplicationIdentifierEntitlementAttr).
What if the sandboxed app and the unsandboxed app are code signed by
the same developer, would that make a difference with the use of
temporary exception entitlements?
Being signed by the same team has interesting technical implications but the the sticking point with temporary exception entitlements is not technical but rather App Review, and I can’t give you definitive answers about their policy.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"