iPhone fails to receive CloudKit notifications

Running the latest iOS 11.0.3 and xCode 9.0.1, I am no longer getting CloudKit notifications


Registration Code:

    UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
    center.delegate = self;
    [center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge) completionHandler:^(BOOL granted, NSError * _Nullable error)
     {
         if( !error && granted)
         {
             [[UIApplication sharedApplication] registerForRemoteNotifications]; /
             NSLog( @"Push registration success." );
         }
         else
         {
             NSLog( @"Push registration FAILED" );
             NSLog( @"ERROR: %@ - %@", error.localizedFailureReason, error.localizedDescription );
             NSLog( @"SUGGESTIONS: %@ - %@", error.localizedRecoveryOptions, error.localizedRecoverySuggestion );
         }
     }];


- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
    NSLog(@"%@ with token = %@", NSStringFromSelector(_cmd), deviceToken);
}


- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

is never called now. I have checked the Notifications settings for the app and it is turned on.


the log shows this:

application:didRegisterForRemoteNotificationsWithDeviceToken: with token = <eef9d4f5 14aae88d e82ac080 42c62f0b bf75af18 218f94b7 ebd66abc 565eee25>

so it looks like we successfully registered.


I am running the app on an iPhone and the companion app on the Mac. The Mac receives notifications fine, but the iPhone never gets one.


I remove the app from the iPhone, then rerun it from xcode and am prompted to accept notifications, which I accept.