ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.
http://sabintsev.com/
MIT License
4.25k stars 407 forks source link

PresentationManager - iOS 13- error #370

Closed g012 closed 3 years ago

g012 commented 3 years ago

Hello,

I have a build error with the latest version in PresentationManager.swift, as the function getFirstForegroundScene() requires iOS 13.

Why was this backward compatible code removed ?

private extension PresentationManager {
    private func createWindow() -> UIWindow? {
        var window = UIWindow()
        if #available(iOS 13.0, tvOS 13.0, *) {
            guard let windowScene = getFirstForegroundScene() else { return nil }
            window = UIWindow(windowScene: windowScene)
        } else {
            window = UIWindow(frame: UIScreen.main.bounds)
        }
        guard let windowScene = getFirstForegroundScene() else { return nil }

        let window = UIWindow(windowScene: windowScene)

Thank you.

ArtSabintsev commented 3 years ago

Hey, can you show me the error, and you're 100% using the latest version?

g012 commented 3 years ago

I don't have any version specified in the Podfile, so I guess yes. It happened right after I updated, the code is in HEAD at least : https://github.com/ArtSabintsev/Siren/blob/master/Sources/Managers/PresentationManager.swift

Here's the shot of XCode showing the error : Shot

ArtSabintsev commented 3 years ago

Ah yes. I made it such that the repo requires a minimum of iOS 13 at this point. I did this a few months ago. At the time I had plans to introduce combine, but I got busy at work. That's the reason this is happening.

g012 commented 3 years ago

Roger. Well, we were planning on moving to iOS 13 too, so I guess that's the signal ! Thank you.

ArtSabintsev commented 3 years ago

No problem! Thanks for understanding!