ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.

Home Page:http://sabintsev.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PresentationManager - iOS 13- error

g012 opened this issue · comments

commented

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.

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

commented

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

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.

commented

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

No problem! Thanks for understanding!