Skip to content

[Bug]: 'keyWindow' is deprecated #917

Description

@xunreal75

Platform

iOS >13.0

Plugin

share_plus

Version

4.0.8

Flutter SDK

3.0.0

Steps to reproduce

on compile with Deploymentversion 13.0
.... /flutter/.pub-cache/hosted/pub.dartlang.org/share_plus-4.0.8/ios/Classes/FLTSharePlusPlugin.m:12:44: warning: 'keyWindow' is deprecated: first 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 [-Wdeprecated-declarations]
return [UIApplication sharedApplication].keyWindow.rootViewController;
^
In module 'UIKit' imported from .../ios/Pods/Target Support Files/share_plus/share_plus-prefix.pch:2:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:135:51: note: 'keyWindow' has
been explicitly marked deprecated here
@Property(nullable, nonatomic,readonly) UIWindow *keyWindow API_DEPRECATED("Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes", ios(2.0,
13.0));

Code Sample

No response

Logs

--

Flutter Doctor

[✓] Flutter (Channel stable, 3.0.2, on macOS 12.4 21F79 darwin-x64, locale de-DE)
    • Flutter version 3.0.2 at /Users/lars/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cd41fdd495 (vor 11 Tagen), 2022-06-08 09:52:13 -0700
    • Engine revision f15f824b57
    • Dart version 2.17.3
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/lars/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

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

[✓] Android Studio (version 2021.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 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 68.1.4
    • Dart plugin version 221.5787.37

[✓] Connected device (4 available)
    • TestIphone + TestWatch (mobile) • BAE4E97D-583B-4557-9CF3-25B2D6E6AAA3 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-5 (simulator)
    • TestWatch (mobile)              • 4F71CDF8-1833-4F11-860B-3DB4A74326DC • ios            • com.apple.CoreSimulator.SimRuntime.watchOS-8-5 (simulator)
    • macOS (desktop)                 • macos                                • darwin-x64     • macOS 12.4 21F79 darwin-x64
    • Chrome (web)                    • chrome                               • web-javascript • Google Chrome 102.0.5005.115
   
[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestIssues taking part in HacktoberfestbugSomething isn't workingiosshare_plusFeature, Enhancement, Bug Fixes for Share Plus Plugin

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions