I am using the newest version of the Parse iOS SKD (v1.4.2) and getting my app actually ready for iOS 8...
Now I came across the following problem:
If a user subscribes to a push channel I am using the saveInBackgroundWithBlock method to show an alert after the subscription was successful.
The problem is now that the succeeded block is never been called!
The subscription it self woking without any problem - the new channel is showing up immediately at the Parse.com backend.
So I am really confused! ;)
Does anyone have the same problem and especially have a solution for it?
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation addUniqueObject:channel forKey:@"channels"];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
if (!error) {
// Show success Alert
UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:@"Success" message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[successAlert show];
} else {
// Show error Alert
UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error" message:nil delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[errorAlert show];
}
}];
Update: I played around with it and have noticed that the block is called but my alert is not shown...
NSLogit is been called... But a UIAlertView not showing up :/ Can you help me to dispatch it on the main queue?UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:@"Succeeded" message:@"" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [successAlert show];- Laurenz Glück[self performSelectorOnMainThread:@selector(pushSucces) withObject:nil waitUntilDone:YES];- but the alert is still not displayed :/ - Laurenz Glück