Ogni volta che provo a registrare l'abbonamento, viene visualizzato l'errore: CKError 0x19030580: "Service Unavailable" (6/2022); server message = "refused to install an older schema (68f93710-7456-11e4-b13e-008cfac0c800) since we already have 693359e0-7456-11e4-8e42-008cfac03128"; uuid = 42F42F6B-98FB-4774-B735-271C1AEF07F1; container ID = "iCloud.com.*.*"
. E quando provo a ottenere tutte le sottoscrizioni presenti sul server, non ricevo nulla.Impossibile registrare abbonamenti; CKError 0x19030580, "Servizio non disponibile"
Perché sto ricevendo CKError 0x19030580? Perché non riesco a recuperare gli abbonamenti? Come dovrei risolverli?
Codice:
NSPredicate *truePredicate = [NSPredicate predicateWithValue:YES];
CKSubscription *itemSubscription = [[CKSubscription alloc] initWithRecordType:ItemAssetRecordType
predicate:truePredicate
options:CKSubscriptionOptionsFiresOnRecordCreation | CKSubscriptionOptionsFiresOnRecordUpdate];
CKNotificationInfo *notification = [[CKNotificationInfo alloc] init];
notification.shouldSendContentAvailable = YES;
notification.alertLocalizationKey = @"New Item available.";
notification.shouldBadge = NO;
itemSubscription.notificationInfo = notification;
[self.privateDatabase saveSubscription:itemSubscription completionHandler:^(CKSubscription *subscription, NSError *error) {
if (error) {
} else {
self.subscribedItems = subscription.subscriptionID;
}
}];
Quindi la gente è chiara: * "... quando cerco di ottenere tutte le sottoscrizioni presenti sul server, non ricevo nulla" * - significa che ha successo, ma non si ottiene nulla indietro? Oppure fallisce con un errore? – jww