iosparse-framework

NSInternalInconsistencyException when registering to a pure channel on parse


I amusing Parse and calling:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken
{
    [PFPush storeDeviceToken:newDeviceToken];
    [PFPush subscribeToChannelInBackground:@"" target:self selector:@selector(subscribeFinished:error:)];
}

Then when lunching the app I a getting this error:

2012-06-30 00:13:23.380 JerusalemBiblicalZoo[607:707] * Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Can't subscribe to a channel when the current installation object is dirty.'

I have disabled this line:

 [PFPush subscribeToChannelInBackground:@"" target:self selector:@selector(subscribeFinished:error:)];

And it works great.

Any ideas hoe too fix that?


Solution

  • I just rolled back to an earlier version and all is well. I'm only getting that error with the newest release.