Trigger background sync using notification when app not runnning
<p>I already implemented this:</p>

<ul>
<li>enable remote notifications in background modes</li>
<li>silent notification <code>{"aps": {"content-available": 1}}</code></li>
</ul>

<p>In Apple docs on Push Notification, they are saying:</p>

<blockquote>
  <p>When a silent notification arrives, iOS wakes up your app in the
  background so that you can get new data from your server or do
  background information processing.</p>
</blockquote>

<p>#</p>

<pre><code>(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
</code></pre>

<p>After receive silent notification. In this method, I am downloading some data from the server then data synchronization.</p>

<p>EXPECTED: </p>

<p>The goal is when user open/using the app, it should reflect the latest position for the user.</p>

<p>ACTUAL: </p>

<p>Receive silent notification, download data from server, then data synchronization are works fine when app is running in foreground and background. </p>

<p>But can't wakes up the app in background and to do that when my app is not in running state (app is not launched or killed from app switcher).</p>

<p>QUESTION:</p>

<p>I silent notification doesn't work when app not running? (can't wake up app in background)</p>

<p>Is there missing code in my code which need implemented?</p>

<p>If this way doesn't work when app not running. Is there any way to keep my app local data always same/synced with the database server (when I'm using or not the app)? how other app do it?</p>