title: Firebase Cloud Messaging - iOS - notregistered or cannot subscribe to topic
body: <p>After struggling with Firebase Cloud Messaging for a few hours I figured out the problem and want to post here since I couldn't find an answer before.</p>
  
  <p>My problem was: I was working with Firebase Cloud Messaging and having a lot of trouble subscribing to topics and receiving messages. I would often get "notregistered" errors when trying to send a message directly to the device and Failed to subscribe to topic Error Domain=com.google.fcm Code=0 "(null)" when subscribing to topics.</p>