I have a main app with a bundled helper app within. The helper app is a necessity for the main app to function correctly. As of right now, I have the main app launch the helper app on launch, and have the main app send a notification telling the helper app to terminated through the NSDistributedNotificationCenter
on the termination of the main app.
This way works most of the time. However, if the main app is force closed, the helper app remains running (no notification is sent. I am using the AppDelegate
's applicationWillTerminate
method to send the notification).
Is there a way to make the running of the helper app more reliable? Also, is there a better way to make the communication between the two apps (ie not NSDistributedNotificationCenter
; is there away to communicate through app bundles?)?
Thanks!