dart_pdf icon indicating copy to clipboard operation
dart_pdf copied to clipboard

'keyWindow' was deprecated in iOS 13.0

Open Giovanny-DS opened this issue 1 year ago • 0 comments

Describe the bug ⚠️ /printing-5.10.4/ios/Classes/PrintJob.swift:243:70: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes

        let controller: UIViewController? = UIApplication.shared.keyWindow?.rootViewController
                                                                 ^

⚠️ /printing-5.10.4/ios/Classes/PrintJob.swift:247:30: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes

    UIApplication.shared.keyWindow?.rootViewController?.present(activityViewController, animated: true)
                         ^

⚠️ /printing-5.10.4/ios/Classes/PrintJob.swift:327:74: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes

        let viewController: UIViewController? = UIApplication.shared.keyWindow?.rootViewController

To Reproduce Install printing in a flutter app. install pods run xcodebuild -sdk iphoneos -configuration Release -workspace ios/Runner.xcworkspace -scheme Runner build | xcpretty -r junit --no-color

Expected behavior should not display te warning

Screenshots image

Flutter Doctor

[!] Flutter (Channel stable, 3.10.6, on macOS 14.0 23A344 darwin-arm64, locale en-CO)
    • Flutter version 3.10.6 on channel stable at /Users/giovanny/fvm/versions/3.10.6
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.0.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/giovanny/fvm/versions/3.10.6. Consider adding /Users/giovanny/fvm/versions/3.10.6/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (3 months ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/giovanny/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.12.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)

[✓] VS Code (version 1.83.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.0 23A344 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 118.0.5993.88

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Desktop (please complete the following information):

  • [ X ] iOS
  • [ ] Android
  • [ ] Browser
  • [ ] Windows
  • [ ] Linux

Additional context Building IPA via xcode command

Giovanny-DS avatar Oct 19 '23 17:10 Giovanny-DS