title: Detecting whether iOS App was launched by a Local Notification in Unity
body: <p>I'm using the <a href="http://docs.unity3d.com/ScriptReference/NotificationServices.html" rel="nofollow">NotificationServices</a> to schedule local notifications for my Unity game on the iOS platform. I'm successfully scheduling and presenting the local notifications, however I haven't find a way to detect whether the user has opened (launched or resumed) my app as a result of <strong>opening the local notification</strong> (not the app directly).</p>
  
  <p>I tried to check for <code>NotificationServices.localNotificationCount &gt; 0</code> in <code>OnApplicationPause(false)</code> (when the app is entering foreground) but sometimes <code>NotificationServices.localNotificationCount</code> is <code>&gt; 0</code> even though the user hasn't opened the local notification (maybe <code>NotificationServices.localNotificationCount</code> was updated before, when a local notification was received when the app was in foreground, etc.).</p>
  
  <p>I need a safe way to detect that my app was opened by a local notification. Does anyone know how can I achieve that in Unity?</p>