Problema no registrado de GCM IOS

He estado usando GCM bien por mucho tiempo ya. Un día de repente se rompió. El problema es que el primer envío que envío recupero el estado de éxito, pero la aplicación no recibe ningún envío. El segundo envío que envío recibe un error con un error NotRegistered. Reinstalé la aplicación: éxito (no se recibió notificación), falla (No registrado) -> Bucle. No se que ha cambiado. El soporte de Google está siendo muy poco útil y lleva mucho tiempo responder preguntas simples sobre si se trata de un problema de GCM, de APN o de un cliente. Si alguien tuvo ese problema antes, avíseme qué buscar. Así es como se ve:

Sospecho que sucedió después de actualizar a iOS 9. Sin embargo, no estoy seguro. Si hay cosas en el nuevo iOS que podrían estar bloqueando GCM, agradecería que alguien lo señalara.

ACTUALIZAR:

La inserción de GCM falla con NotRegistered

Ese tipo tenía un problema similar. El problema fue con algún archivo de manifiesto. ¿Podría haber algunas entradas en la lista de información que necesito agregar para iOS 9 para permitir GCM?

ACTUALIZAR:

onTokenRefresh se llama cada vez que se inicia la aplicación. Sin embargo, estoy recuperando el mismo token. Por lo tanto, sospecho que hay un problema con un token en un servidor GCM.

CÓDIGO DELEGADO GCM EN APDELEGATE:

var connectedToGCM = false


private var deviceToken: NSData?

var gcmSenderID: String!
let authorizedEntity = "my GCM Sender_ID"


public func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    var configureError:NSError?
    GGLContext.sharedInstance().configureWithError(&configureError)
    assert(configureError == nil, "Error configuring Google services: \(configureError)")
    gcmSenderID = GGLContext.sharedInstance().configuration.gcmSenderID
    // [END_EXCLUDE]
    // Register for remote notifications
    if #available(iOS 8.0, *) {
        let settings: UIUserNotificationSettings =
        UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
        application.registerUserNotificationSettings(settings)
        application.registerForRemoteNotifications()
    } else {
        // Fallback
        let types: UIRemoteNotificationType = [.Alert, .Badge, .Sound]
        application.registerForRemoteNotificationTypes(types)
    }

    // [END register_for_remote_notifications]
    // [START start_gcm_service]
    let gcmConfig = GCMConfig.defaultConfig()
    GCMService.sharedInstance().startWithConfig(gcmConfig)

    return true
}

public func onTokenRefresh() {
    print("Token needs to be refreshed!")
    let options = [
        kGGLInstanceIDRegisterAPNSOption : deviceToken!,
        kGGLInstanceIDAPNSServerTypeSandboxOption : true
    ]
           GGLInstanceID.sharedInstance().tokenWithAuthorizedEntity(authorizedEntity, scope: kGGLInstanceIDScopeGCM, options: options) { (token, error) -> Void in
        if error != nil {
            print("Error: \(error.localizedDescription)")
        } else {
            print("Token: \(token)")
        }
    }
}


public func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
    return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
}

public func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
    let instanceIDConfig = GGLInstanceIDConfig.defaultConfig()
    instanceIDConfig.delegate = self
    // Start the GGLInstanceID shared instance with that config and request a registration
    // token to enable reception of notifications
    GGLInstanceID.sharedInstance().startWithConfig(instanceIDConfig)
    self.deviceToken = deviceToken
}

public func applicationDidEnterBackground(application: UIApplication) {
    GCMService.sharedInstance().disconnect()
    connectedToGCM = false
}

public func applicationDidBecomeActive( application: UIApplication) {
    print("App became active")
    UIApplication.sharedApplication().applicationIconBadgeNumber = 0
    // Connect to the GCM server to receive non-APNS notifications
    GCMService.sharedInstance().connectWithHandler({
        (NSError error) -> Void in
        if error != nil {
            print("Could not connect to GCM: \(error.localizedDescription)")
        } else {
            self.connectedToGCM = true
            print("Connected to GCM")
            // ...
        }
    })
}

public func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
    print("Notification received: \(userInfo)")
    GCMService.sharedInstance().appDidReceiveMessage(userInfo)
}

public func application(application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: NSError) {
    print("Error registering")
}

public func application( application: UIApplication,
    didReceiveRemoteNotification userInfo: [NSObject : AnyObject],
    fetchCompletionHandler handler: (UIBackgroundFetchResult) -> Void) {

        print("Notification received(background): \(userInfo)")

        NotificationManager.sharedInsteance().parseNotification(userInfo)

        // This works only if the app started the GCM service
        GCMService.sharedInstance().appDidReceiveMessage(userInfo);

        // Handle the received message
        // Invoke the completion handler passing the appropriate UIBackgroundFetchResult value
        // [START_EXCLUDE]
        handler(UIBackgroundFetchResult.NewData);
        // [END_EXCLUDE]
}

ACTUALIZAR

De acuerdo, creo que me equivoqué con la ubicación .plist (por alguna razón no estaba en la raíz). Me mudé a la raíz y ahora recibo esta advertencia / error al iniciar GCM:

UPD Bien, en realidad sucedió solo una vez y se detuvo. Entonces no creo que el problema esté aquí.

Después de mover .plist al directorio raíz enTokenRefresh (), las llamadas se detuvieron, pero todavía recibo NotRegistered.

Respuestas a la pregunta(1)

Su respuesta a la pregunta