You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling PushNotifications.register() on an iOS device, neither the registration nor registrationError listeners are triggered. No token or error feedback is returned, despite APNs being configured in the Apple Developer Portal, necessary permissions enabled in Xcode, and no apparent errors in the console log.
Expected Behavior
After invoking PushNotifications.register(), we expect either the registration listener to provide the device token or the registrationError listener to handle errors, allowing us to proceed with or debug APNs registration.
Code Reproduction
The following setup was used to reproduce the issue.
AppDelegate.swift:
import UIKit
import Capacitor
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
// default functions
• Device: iPhone 14 Pro Max
• iOS Version: 18.1
• Xcode Version: 16.1
Additional Context
Testing has been conducted over USB with Xcode’s console. APNs and Push capabilities are active, and necessary permissions granted. No errors appear in the logs, but we have not observed any registration response.
Logs
⚡️ To Native -> PushNotifications addListener 62681458
⚡️ To Native -> PushNotifications addListener 62681459
⚡️ To Native -> PushNotifications addListener 62681460
⚡️ To Native -> PushNotifications addListener 62681461
⚡️ To Native -> PushNotifications requestPermissions 62681462
⚡️ TO JS {"receive":"granted"}
⚡️ To Native -> PushNotifications register 62681463
⚡️ [log] - RESULTS: {"receive":"granted"}
⚡️ [log] - Permission granted, registering for push notifications
The text was updated successfully, but these errors were encountered:
Plugin(s)
@capacitor/push-notifications: ^6.0.2
Capacitor Version
@capacitor/cli: ^6.1.2
@capacitor/core: ^6.1.2
@capacitor/ios: ^6.1.2
@capacitor/push-notifications: ^6.0.2
Platform(s)
iOS only
Current Behavior
When calling PushNotifications.register() on an iOS device, neither the registration nor registrationError listeners are triggered. No token or error feedback is returned, despite APNs being configured in the Apple Developer Portal, necessary permissions enabled in Xcode, and no apparent errors in the console log.
Expected Behavior
After invoking PushNotifications.register(), we expect either the registration listener to provide the device token or the registrationError listener to handle errors, allowing us to proceed with or debug APNs registration.
Code Reproduction
The following setup was used to reproduce the issue.
AppDelegate.swift:
import UIKit
import Capacitor
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
// default functions
}
PushNotificationService.ts:
import { Capacitor } from “@capacitor/core”;
import { PushNotifications } from “@capacitor/push-notifications”;
import axios from “axios”;
class PushNotificationService {
private client = axios;
private apiRoot = ‘/apns’;
}
export default new PushNotificationService();
Other Technical Details
Additional Context
Testing has been conducted over USB with Xcode’s console. APNs and Push capabilities are active, and necessary permissions granted. No errors appear in the logs, but we have not observed any registration response.
Logs
⚡️ To Native -> PushNotifications addListener 62681458
⚡️ To Native -> PushNotifications addListener 62681459
⚡️ To Native -> PushNotifications addListener 62681460
⚡️ To Native -> PushNotifications addListener 62681461
⚡️ To Native -> PushNotifications requestPermissions 62681462
⚡️ TO JS {"receive":"granted"}
⚡️ To Native -> PushNotifications register 62681463
⚡️ [log] - RESULTS: {"receive":"granted"}
⚡️ [log] - Permission granted, registering for push notifications
The text was updated successfully, but these errors were encountered: