SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.31k stars 743 forks source link

[iOS 13] It doesn't work with SceneDelegate #344

Closed kosicki123 closed 4 years ago

kosicki123 commented 4 years ago

Hey, thanks for this awesome library!

I've been using in all my projects for a while and as I've started migrating to iOS 13, it seems that SceneDelegate has some bug that interrupts the view from being presented in real devices. If I remove SceneDelegate and use AppDelegate, everything runs smoothly.

Any ideas about why that happen?

Thanks a lot! :)

wtmoose commented 4 years ago

Are you on 7.0.1?

kosicki123 commented 4 years ago

Yes! Tried to check out from the latest release and also from master. To reproduce, just create a new project using Xcode 11 and run on your iOS 13 real device and it should happen the same.

wtmoose commented 4 years ago

SwiftMessages 7.0.1 supports SceneManager. Here is the sample project I used for testing:

SceneManagerDemo.zip

Please clean your workspace and make sure you're hitting line 411 in Presenter.swift. If it still doesn't work, I'll need to find out what you're doing with SceneManager. It could be that SwiftMessages doesn't support it comprehensively. But it should definitely work with a basic setup.

kosicki123 commented 4 years ago

I really don't know what happened, but after try your sample, my project simple started working. I'm not sure if my environment was dirty or something. Also, I've removed my Storyboard in the info.plist in the SceneDelegate object. That's the only thing I did. Maybe that was the issue, since I'm using view code only. Thank you so much for you effort in solving my issue, it really helped!