Daltron / NotificationBanner

The easiest way to display highly customizable in app notification banners in iOS
MIT License
4.79k stars 663 forks source link

UIApplication connectedScenes crash on iOS 13 #270

Closed vburojevic closed 4 years ago

vburojevic commented 4 years ago

In the project I'm working on, we're getting crashes related to connectedScenes on iOS 13 in v3.0.0.

Fatal Exception: NSInvalidArgumentException -[UIApplication connectedScenes]: unrecognized selector sent to instance

Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x1a7d7298c __exceptionPreprocess 1 libobjc.A.dylib 0x1a6f4b9f8 objc_exception_throw 2 CoreFoundation 0x1a7c8f1c8 -[NSOrderedSet initWithSet:copyItems:] 3 UIKitCore 0x1d46a2220 -[UIResponder doesNotRecognizeSelector:] 4 CoreFoundation 0x1a7d781d4 ___forwarding___ 5 CoreFoundation 0x1a7d79e6c _CF_forwarding_prep_0 6 NotificationBanner 0x100815ec8 closure #1 in variable initialization expression of BaseNotificationBanner.appWindow + 154 (BaseNotificationBanner.swift:154) 7 NotificationBanner 0x100819894 specialized BaseNotificationBanner.init(style:colors:) + 152 (BaseNotificationBanner.swift:152) 8 NotificationBanner 0x100807824 specialized NotificationBanner.init(customView:) (<compiler-generated>) 9 NotificationBanner 0x100806ec4 NotificationBanner.init(customView:) (<compiler-generated>)

I can't reproduce this, but we have over 800 crashes from this in the past week.

I've researched this property quite a bit, and researched how other libs handle this and it seems the same. I have no idea though why UIApplication can't find this method signature sometimes but it happens on iOS 13 only so it must be connected to this somehow.

If someone can point me in the right direction I'll be glad to help this get fixed.

Any thoughts?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically closed due to inactivity.

pikacode commented 4 years ago

@vburojevic I got the same problem with you on other libs, did you find out how to resolve this? -[UIWindow windowScene]: unrecognized selector sent to instance -[UIApplication connectedScenes]: unrecognized selector sent to instance