Daltron / NotificationBanner

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

Crashes while screen mirroring with Airplay v1 [BaseNotificationBanner.swift:380] #350

Closed majid701 closed 3 years ago

majid701 commented 3 years ago

I found an issue with the library it crashes when a notification banner is shown while the phone is casting the screen via Airplay. It seems to happen only with Airplay version 1. I experienced the crash while using Reflector 3 which uses the older version of Airplay. It works completely fine with Reflector 4 which uses the newer version of Airplay.

stack trace:

Crashed: com.apple.main-thread
0  NotificationBannerSwift        0x103b5bb30 BaseNotificationBanner.show(placeOnQueue:queuePosition:bannerPosition:) + 380 (BaseNotificationBanner.swift:380)
1  NotificationBannerSwift        0x103b65a74 NotificationBannerQueue.addBanner(_:bannerPosition:queuePosition:) + 78 (NotificationBannerQueue.swift:78)
2  NotificationBannerSwift        0x103b5b234 BaseNotificationBanner.show(placeOnQueue:queuePosition:bannerPosition:) + 374 (BaseNotificationBanner.swift:374)
3  NotificationBannerSwift        0x103b5af34 BaseNotificationBanner.show(queuePosition:bannerPosition:queue:on:) + 337 (BaseNotificationBanner.swift:337)

Is this something that can be fixed in the library or the problem is with Airplay? Looks like the frame of the screen is changed while screen mirroring is active. Any suggestions? I am to open to contribute with a PR.

NotificationBannerSwift version: 3.0.6 It worked completely fine with older version 1.6.3 Tested on iPhone 11, iOS: 14.4.2

stale[bot] commented 3 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 3 years ago

This issue has been automatically closed due to inactivity.

MRiOSRohit commented 3 years ago

@majid701 Do You find the solution for this issue?

majid701 commented 3 years ago

@MRiOSRohit I downgraded the library version back to 1.6.3.

prachi-simformsolutions commented 2 years ago

anyone find the solution?