mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.2k stars 2.92k forks source link

Fix windows warnings #17187

Closed data-sync-user closed 10 months ago

data-sync-user commented 11 months ago

In HomepageViewController

⚠️  /Users/vagrant/git/Client/Frontend/Home/HomepageViewController.swift:233:43: 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
        let window = UIApplication.shared.windows.first

In PrivacyPolicyViewController

⚠️  /Users/vagrant/git/Client/Frontend/Onboarding/ViewControllers/PrivacyPolicyViewController.swift:18:57: 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
            guard let isPortrait = UIApplication.shared.windows.first?.windowScene?.interfaceOrientation.isPortrait else { return 1 }

In SceneCoordinatorTests and SceneDelegateTests

⚠️  /Users/vagrant/git/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift:27:42: 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
        let scene = UIApplication.shared.windows.first?.windowScene
               ^
⚠️  /Users/vagrant/git/Tests/ClientTests/Coordinators/SceneCoordinatorTests.swift:139:42: 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
        let scene = UIApplication.shared.windows.first?.windowScene
                                         ^
⚠️  /Users/vagrant/git/Tests/ClientTests/Application/SceneDelegateTests.swift:44:42: 'windows' was deprecated in iOS 15.0: Use UIWindowScene.windows on a relevant window scene instead
        let scene = UIApplication.shared.windows.first?.windowScene

┆Issue is synchronized with this Jira Task

data-sync-user commented 11 months ago

➤ Laurie Marceau commented:

For QA it can be tested the homepage wallpaper shows properly with top and bottom URL bar

data-sync-user commented 10 months ago

➤ Alina Moldovan commented:

Verified as fixed using FF v121(36782) and iPhone 14+ (16.0.3)