title: Firebase FCM Instance ID is nil (running quickstart app on real device)
body: <p>Running the FCM demo app on my iPhone doesn't work - The Firebase ID is <strong>nil</strong>.</p>
  
  <p>Steps to reproduce:</p>
  
  <ol>
  <li><code>pod try Firebase</code>, and run <code>10: quickstart-ios/messaging/FCM.xcodeproj</code></li>
  <li>Copy my <code>GoogleService-Info.plist</code> file into the project</li>
  <li>Run the app on an iPhone 5s (iOS 9.3.2)</li>
  <li>Accept the dialog requesting permission to send notifications</li>
  <li>Click the buttons</li>
  <li>The Instance Id token is <strong>nil</strong></li>
  </ol>
  
  <p>My Mac has the appropriate certificates to develop and deploy apps:</p>
  
  <ol>
  <li>I have both iOS distribution and iOS development provisioning
  profiles, chosen using the 'automatic' settings.</li>
  <li>I have both iOS distribution and iOS development certificates installed, code-signed using the 'automatic: iPhone developer' option</li>
  <li>I have the 'Production' SSL certificate installed: "Apple Push Notification
  service SSL (Sandbox &amp; Production)"</li>
  </ol>
  
  <p>I see lots of noise in the logs, but the most significant error is this one:</p>
  
  <pre><code>Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  </code></pre>
  
  <p>Here is the full console output:</p>
  
  <pre><code>2016-06-25 16:15:08.339 FCM[7398:4128979] Configuring the default app.
  2016-06-25 16:15:08.383 FCM[7398:] &lt;FIRAnalytics/INFO&gt; Firebase Analytics v.3200000 started
  2016-06-25 16:15:08.396: &lt;FIRInstanceID/WARNING&gt; FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
  2016-06-25 16:15:08.397: &lt;FIRInstanceID/WARNING&gt; Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
  2016-06-25 16:15:08.403: &lt;FIRMessaging/INFO&gt; FIRMessaging library version 1.1.0
  2016-06-25 16:15:08.413: &lt;FIRMessaging/WARNING&gt; FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
  2016-06-25 16:15:08.443 FCM[7398:] &lt;FIRAnalytics/INFO&gt; Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
  2016-06-25 16:15:08.508 FCM[7398:] &lt;FIRAnalytics/INFO&gt; Firebase Analytics enabled
  2016-06-25 16:15:08.538: &lt;FIRInstanceID/WARNING&gt; APNS Environment in profile: development
  2016-06-25 16:15:08.848 FCM[7398:4128979] Connected to FCM.
  2016-06-25 16:15:08.893: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:15:22.311: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:15:36.774 FCM[7398:4128979] Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 "(null)"
  2016-06-25 16:15:40.552 FCM[7398:4128979] Subscribed to news topic
  2016-06-25 16:15:43.100 FCM[7398:4128979] InstanceID token: (null)
  2016-06-25 16:15:49.036: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:16:31.022: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:17:32.976: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:17:32.976: &lt;FIRInstanceID/WARNING&gt; Failed to retrieve the default GCM token after 5 retries
  2016-06-25 16:19:10.662 FCM[7398:4128979] InstanceID token: (null)
  2016-06-25 16:19:10.980: &lt;FIRInstanceID/WARNING&gt; Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
  2016-06-25 16:19:10.981: &lt;FIRInstanceID/WARNING&gt; Failed to retrieve the default GCM token after 5 retries
  </code></pre>