flutter_statusbarcolor
flutter_statusbarcolor copied to clipboard
iOS build error : Property 'windowScene' not found on object of type 'UIWindow *'
Stacktrace :
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/me/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sta
tusbarcolor-0.2.2/ios/Classes/FlutterStatusbarcolorPlugin.m:15:37: warning:
implicit conversion from 'long long' to 'NSInteger' (aka 'int') changes
value from 38482458385 to -172247279 [-Wconstant-conversion]
static NSInteger statusBarViewTag = 38482458385;
~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
/Users/hugo/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_sta
tusbarcolor-0.2.2/ios/Classes/FlutterStatusbarcolorPlugin.m:71:105: error:
property 'windowScene' not found on object of type 'UIWindow *'
UIView* statusBar = [[UIView alloc]initWithFrame:[UIApplication
sharedApplication].keyWindow.windowScene.statusBarManager.statusB
arFrame];
^
1 warning and 1 error generated.
Flutter doctor, if needed :
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.9.1+hotfix.2, on Mac OS X 10.13.6 17G65, locale
fr-FR)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/setup/#android-setup for detailed
instructions).
If the Android SDK has been installed to a custom location, set
ANDROID_HOME to that location.
You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 10.1)
[!] Android Studio (not installed)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
@onikiri2007 Did you get this compile error?
@Skyost , i got the same problem on version 0.2.2.
It works fine on 0.2.1, try using flutter_statusbarcolor: 0.2.1
Yes, You need to compile with Xcode 11
windowScene is only available in iOS 13 SDK so if don't compile with Xcode 11 it will have a compile error. if using XCode 10 I would suggest downgrade to 0.2.1
Yes, 0.2.2 only works with XCode 11 , otherwise use 0.2.1 but status bar color won't work on iOS13 devices.
Xcode 10 , 0.2.1 is not work too