CloudKit subscriptions are properly configured and triggering, but push notifications are never delivered to devices. After extensive debugging, I've isolated the issue to CloudKit→APNS delivery failure.
- Xcode: 15.x
- iOS Target: 17.0+
- watchOS Target: 10.0+
- CloudKit Database: Both Public and Private
- Testing Devices: iPhone 15 Pro, Apple Watch Series 9
- Environments Tested: Development and Production
- All 6 subscription types successfully created and visible in CloudKit Dashboard
- Subscriptions persist across app launches (verified in dashboard)
- Subscription predicates correctly configured for each record type:
// Example: FriendRequest subscription
NSPredicate(format: "toUser == %@", userRecordID)
// Example: Challenge subscription
NSPredicate(format: "recipientID == %@ AND status == %@",
userRecordID, "pending")
• App successfully requests and receives push notification permissions
• Device token obtained and stored
• Entitlements correctly configured:
<key>aps-environment</key>
<string>development</string>
• Capability added in App ID configuration
• Records creating/updating successfully
• Changes match subscription predicates (verified manually)
• Records visible immediately in CloudKit Dashboard
• Silent notification handling implemented for iOS
• Actionable notifications configured for watchOS
• Badge management working with local testing
• No notifications are ever delivered to devices
• CloudKit Logs show NO "NotificationSend" events
• Subscriptions show "Fire Date: None" in dashboard
• No push notifications appear in device console logs
private func createSubscriptions() async throws {
let subscriptions = [
createFriendRequestSubscription(),
createFriendAcceptedSubscription(),
createChallengeSubscription(),
// ... etc
]
for subscription in subscriptions {
do {
let saved = try await container.publicCloudDatabase
.save(subscription)
print("✅ Created subscription: \(saved.subscriptionID)")
} catch {
print("❌ Subscription error: \(error)")
}
}
}
Result: All subscriptions created successfully
Created standalone test file to isolate issue:
import CloudKit
let subscription = CKQuerySubscription(
recordType: "TestRecord",
predicate: NSPredicate(value: true),
options: [.firesOnRecordCreation]
)
let notification = CKSubscription.NotificationInfo()
notification.shouldSendContentAvailable = true
notification.shouldBadge = true
subscription.notificationInfo = notification
// Save subscription and create test records
Result: Subscription created, records created, but still no notifications
• Opened CloudKit Dashboard → Logs
• Created records that should trigger notifications
• Filtered for "NotificationSend" events
Result: No NotificationSend events ever appear
• ✅ Tried both development and production environments
• ✅ Tested with shouldSendContentAvailable = true (silent)
• ✅ Tested with alertBody set (visible notifications)
• ✅ Tested on multiple devices
• ✅ Tried both public and private database
Result: No configuration produces notifications
• ✅ Devices have active internet connection
• ✅ Push notifications enabled in Settings
• ✅ No Do Not Disturb or Focus modes active
• ✅ Tested on both WiFi and Cellular
• ✅ Different Apple IDs tested
// Verified correct container
let container = CKContainer(identifier: "iCloud.com.strikeforcetechnologies.strikeforce")
• ✅ Container ID matches entitlements
• ✅ Container is active in CloudKit Dashboard
• ✅ Same container used for all operations
public class CloudKitSubscriptionService {
func setupSubscriptions() async throws {
// Check cache to avoid recreating
if let lastCreated = UserDefaults.standard.object(forKey: "lastSubscriptionCreation") as? Date,
Date().timeIntervalSince(lastCreated) < 86400 {
return
}
try await createAllSubscriptions()
UserDefaults.standard.set(Date(), forKey: "lastSubscriptionCreation")
}
}
// iOS App Delegate
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
print("📱 Received remote notification: (userInfo)")
// Never gets called
completionHandler(.newData)
}
• ❌ Not an entitlements issue - Configured correctly
• ❌ Not a provisioning profile issue - Includes push capability
• ❌ Not a device token issue - Token obtained successfully
• ❌ Not a predicate issue - Subscriptions match record changes
• ❌ Not a code issue - Multiple implementations tested
Why are CloudKit subscriptions not triggering push notifications despite being properly configured?
The breakdown appears to be specifically in CloudKit's internal delivery to APNS. There are no "NotificationSend" events in CloudKit logs, suggesting CloudKit isn't even attempting to send notifications to APNS.
• TSI (Technical Support Incident) filed: [Case #PENDING]
• No related issues in Apple System Status
• Issue persists across multiple days of testing
• Same behavior in TestFlight and Development builds
- Has anyone successfully received CloudKit push notifications recently (iOS 17+)?
- Are there any hidden CloudKit configuration requirements not mentioned in documentation?
- Is there a way to debug why CloudKit isn't creating "NotificationSend" events?
- Are there any known issues with CloudKit→APNS delivery?
Any insights would be greatly appreciated. I've exhausted all debugging options I can think of and the issue appears to be on Apple's service side.
I can provide a minimal reproducible example if helpful. The issue reproduces with even the simplest CloudKit subscription setup.
Tags: #CloudKit #PushNotifications #APNS #iOS17 #watchOS10