wizpanda / cordova-plugin-firebase-lib

This repository is moving & merging to https://github.com/wizpanda/cordova-plugin-firebase-lib to avoid confusion to developers.
https://www.wizpanda.com/
MIT License
68 stars 38 forks source link

setBadgeNumber blocks the app on startup since iOs 12 #37

Open ColDrekken opened 5 years ago

ColDrekken commented 5 years ago

Hi ! I have a problem on iOS since iOS 12. The plugin causes an abnormal loading time when startup.

To Reproduce

run the app on ios 12+

run on ios 12 or ios 12.+ Expected behavior I wish there was no blocking for several seconds

Console Logs

Main Thread Checker: UI API called on a background thread: -[UIApplication setApplicationIconBadgeNumber:] PID: 17006, TID: 3973410, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0 Backtrace: 4 BaseChat 0x0000000100e09f04 33-[FirebasePlugin setBadgeNumber:]_block_invoke + 104 5 libdispatch.dylib 0x00000001023df1f8 _dispatch_call_block_and_release + 32 6 libdispatch.dylib 0x00000001023e0778 _dispatch_client_callout + 20 7 libdispatch.dylib 0x00000001023e3720 _dispatch_queue_override_invoke + 912 8 libdispatch.dylib 0x00000001023f1a34 _dispatch_root_queue_drain + 352 9 libdispatch.dylib 0x00000001023f243c _dispatch_worker_thread2 + 144 10 libsystem_pthread.dylib 0x00000001fc078b38 _pthread_wqthread + 468 11 libsystem_pthread.dylib 0x00000001fc07edc4 start_wqthread + 4 2019-07-04 12:56:24.587723+0200 BaseChat[17006:3973410] [reports] Main Thread Checker: UI API called on a background thread: -[UIApplication setApplicationIconBadgeNumber:] PID: 17006, TID: 3973410, Thread name: (none), Queue name: com.apple.root.default-qos, QoS: 0 Backtrace: 4 BaseChat 0x0000000100e09f04 33-[FirebasePlugin setBadgeNumber:]_block_invoke + 104 5 libdispatch.dylib 0x00000001023df1f8 _dispatch_call_block_and_release + 32 6 libdispatch.dylib 0x00000001023e0778 _dispatch_client_callout + 20 7 libdispatch.dylib 0x00000001023e3720 _dispatch_queue_override_invoke + 912 8 libdispatch.dylib 0x00000001023f1a34 _dispatch_root_queue_drain + 352 9 libdispatch.dylib 0x00000001023f243c _dispatch_worker_thread2 + 144 10 libsystem_pthread.dylib 0x00000001fc078b38 _pthread_wqthread + 468 11 libsystem_pthread.dylib 0x00000001fc07edc4 start_wqthread + 4

Plugin Version cordova-plugin-firebase-lib 3.3.0

Smartphone (please complete the following information):

Device: iPhone SE | iPhone6 | iPhone6+ IphoneX/XS OS: iOS 12 | iOS 12.x Additional context

sagrawal31 commented 4 years ago

Will take a look.