CloudKit Subscriptions Not Triggering Push Notifications - No NotificationSend Events

ISSUE: CloudKit subscriptions are not triggering push notifications despite correct configuration. CloudKit logs show RecordSave events but NO NotificationSend events, indicating CloudKit is not attempting to send to APNS.

CONTAINER: iCloud.Wunderkind.StrikeForceApp

ENVIRONMENT:

  • Tested in both Development and Production
  • iOS 18.6.x
  • Xcode 15.x (update with your version)
  • Device: iPhone (not simulator)

EVIDENCE:

  1. Subscriptions exist and are visible in CloudKit Dashboard
  2. Records are being created successfully (verified in logs)
  3. Device token is registered: 60eb962ff189dc5c2c0ef3e9d6643d72b4442a831bae224d2a553588b2e29139
  4. Local notifications work correctly
  5. CloudKit logs show RecordSave but NO NotificationSend events

STEPS TAKEN:

  • Regenerated push certificates
  • Disabled and re-enabled Push Notifications capability
  • Deleted and recreated subscriptions
  • Tested in both Development and Production environments
  • Verified aps-environment entitlement matches environment
  • Confirmed notification permissions granted

SPECIFIC TEST: Creating a Challenge record with recipientRef matching my user triggers:

  • ✅ RecordSave event in CloudKit logs
  • ❌ No NotificationSend event
  • ❌ No push notification received

EXPECTED: CloudKit should send NotificationSend events and deliver push notifications when subscriptions match.

ACTUAL: No NotificationSend events appear in CloudKit logs, no notifications delivered.

CloudKit Push Notifications Not Delivering - Extensive Debugging Completed

Issue Summary

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.

Environment

  • 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

What's Working ✅

1. CloudKit Subscriptions

  • 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")
    
    

2. Device Registration

• 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

3. CloudKit Records

• Records creating/updating successfully • Changes match subscription predicates (verified manually) • Records visible immediately in CloudKit Dashboard

4. App Implementation

• Silent notification handling implemented for iOS • Actionable notifications configured for watchOS • Badge management working with local testing

What's Not Working ❌

The Critical Issue: CloudKit→APNS Delivery

• 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

Debugging Steps Performed

1. Verified Subscription Creation

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

2. Tested with Minimal Example

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

3. Monitored CloudKit Logs

• Opened CloudKit Dashboard → Logs • Created records that should trigger notifications • Filtered for "NotificationSend" events Result: No NotificationSend events ever appear

4. Tested Different Configurations

• ✅ 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

5. Verified Network & Device Settings

• ✅ 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

6. Checked Container Configuration

// 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

Code That Should Be Working

Subscription Setup

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")
}

}

Notification Reception

// 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) }

What I've Ruled Out

• ❌ 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

The Question

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.

Additional Information

• 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

What I Need Help With

  1. Has anyone successfully received CloudKit push notifications recently (iOS 17+)?
  2. Are there any hidden CloudKit configuration requirements not mentioned in documentation?
  3. Is there a way to debug why CloudKit isn't creating "NotificationSend" events?
  4. 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.

Sample Project

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

CloudKit Subscriptions Not Triggering Push Notifications - No NotificationSend Events
 
 
Q