Hello,
We have a simple code for register push notifications with Apple, works with certificate, and we add capabilities too .
When start app some strange happened on push register:
2022-01-20 18:57:35.013896-0300 App[1338:212424] Push Plugin register called
2022-01-20 18:57:35.013960-0300 App[1338:212424] PushPlugin.register: setting badge to true
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIApplication setApplicationIconBadgeNumber:]
PID: 1338, TID: 212424, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4 App 0x0000000104e75638 __19-[PushPlugin init:]_block_invoke.278 + 940
5 libdispatch.dylib 0x000000010595fae8 _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x000000010596132c _dispatch_client_callout + 16
7 libdispatch.dylib 0x0000000105963ac8 _dispatch_queue_override_invoke + 884
8 libdispatch.dylib 0x0000000105972e1c _dispatch_root_queue_drain + 376
9 libdispatch.dylib 0x000000010597373c _dispatch_worker_thread2 + 148
10 libsystem_pthread.dylib 0x00000001cb4b9580 _pthread_wqthread + 212
11 libsystem_pthread.dylib 0x00000001cb4bc86c start_wqthread + 8
2022-01-20 18:57:35.015009-0300 App[1338:212424] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication setApplicationIconBadgeNumber:]
PID: 1338, TID: 212424, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0
Backtrace:
4 App 0x0000000104e75638 __19-[PushPlugin init:]_block_invoke.278 + 940
5 libdispatch.dylib 0x000000010595fae8 _dispatch_call_block_and_release + 24
6 libdispatch.dylib 0x000000010596132c _dispatch_client_callout + 16
7 libdispatch.dylib 0x0000000105963ac8 _dispatch_queue_override_invoke + 884
8 libdispatch.dylib 0x0000000105972e1c _dispatch_root_queue_drain + 376
9 libdispatch.dylib 0x000000010597373c _dispatch_worker_thread2 + 148
10 libsystem_pthread.dylib 0x00000001cb4b9580 _pthread_wqthread + 212
11 libsystem_pthread.dylib 0x00000001cb4bc86c start_wqthread + 8
2022-01-20 18:57:42.636565-0300 App[1338:212424] PushPlugin.register: clear badge is set to 1
2022-01-20 18:57:42.636886-0300 App[1338:212424] PushPlugin.register: better button setup
2022-01-20 18:57:42.638199-0300 App[1338:212424] FCM Sender ID (null)
2022-01-20 18:57:42.638810-0300 App[1338:212424] Using APNS Notification
We don’t know why that happened, other apps (ionic 5<=) not show that problem .
And we receive nothing with register on the handlers for registration or error .
This is output for ionic info :
Ionic:
Ionic CLI : 6.17.0 (/Users/mtoro/.nvm/versions/node/v14.17.5/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.3
@angular-devkit/build-angular : 13.0.4
@angular-devkit/schematics : 12.2.15
@angular/cli : 13.0.4
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.3.3
@capacitor/android : not installed
@capacitor/core : 3.3.0
@capacitor/ios : 3.3.0
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
NodeJS : v14.17.5 (/Users/mtoro/.nvm/versions/node/v14.17.5/bin/node)
npm : 6.14.14
OS : macOS Monterey