Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

iOS 13 build failing #27

Closed
daviddomkar opened this issue Jul 8, 2019 · 11 comments
Closed

iOS 13 build failing #27

daviddomkar opened this issue Jul 8, 2019 · 11 comments

Comments

@daviddomkar
Copy link

On iOS 13 there is a change in API which causes this error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.'

@mchome mchome added the help wanted Extra attention is needed label Jul 8, 2019
@CSalaza73
Copy link

Any update for the plugin? My app will not work on IOS 13 beta with the same error message.

@mchome
Copy link
Owner

mchome commented Jul 24, 2019

Will update soon. Because I don't have ios device, you have to test the patch.

mchome pushed a commit that referenced this issue Jul 24, 2019
mchome pushed a commit that referenced this issue Jul 24, 2019
mchome pushed a commit that referenced this issue Jul 24, 2019
@mchome mchome removed the help wanted Extra attention is needed label Jul 24, 2019
@mchome mchome pinned this issue Jul 27, 2019
@armydons
Copy link

@mchome any root cause identified for this issue

@mchome
Copy link
Owner

mchome commented Aug 29, 2019

@armydons Can you test the git version?

@ramamurthyk
Copy link

Same here since this morning after Xcode was upgraded to v11 and iOS13.

I've just commented in the flutter issue #40998 with the error log (for other's benefit).
flutter/flutter#40998

Here is the detailed error log:

2019-09-21 12:51:38.440378+0100 Runner[75876:7237792] flutter: Observatory listening on http://127.0.0.1:51229/1Jai67Gkpnw=/
2019-09-21 12:51:39.294566+0100 Runner[75876:7237145] *** Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3899.13.13/UIApplication.m:5240
2019-09-21 12:51:39.392722+0100 Runner[75876:7237145] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',

reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.'

*** First throw call stack:
(
0 CoreFoundation 0x00007fff23b98bde __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff503b5b20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23b98958 +[NSException raise:format:arguments:] + 88
3 Foundation 0x00007fff255eb6f5 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 UIKitCore 0x00007fff47163f36 -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:] + 255
5 UIKitCore 0x00007fff471643d9 -[UIApplication statusBar] + 24
6 Foundation 0x00007fff256146ef -[NSObject(NSKeyValueCoding) valueForKey:] + 317
7 flutter_statusbarcolor 0x0000000109a430db -[FlutterStatusbarcolorPlugin handleMethodCall:result:] + 955
8 Flutter 0x00000001077a54fd __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke + 104
9 Flutter 0x000000010773eec0 _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166
10 Flutter 0x0000000107742780 _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38
11 Flutter 0x000000010779fdb3 _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_31NS_9allocatorIS8_EEFvvEEclEv + 57
12 Flutter 0x00000001077513f1 _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 123
13 Flutter 0x0000000107756742 ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0 + 26
14 CoreFoundation 0x00007fff23afc1e4 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
15 CoreFoundation 0x00007fff23afbed2 __CFRunLoopDoTimer + 1026
16 CoreFoundation 0x00007fff23afb52a __CFRunLoopDoTimers + 266
17 CoreFoundation 0x00007fff23af629e __CFRunLoopRun + 2238
18 CoreFoundation 0x00007fff23af56b6 CFRunLoopRunSpecific + 438
19 GraphicsServices 0x00007fff3815cbb0 GSEventRunModal + 65
20 UIKitCore 0x00007fff47162a67 UIApplicationMain + 1621
21 Runner 0x0000000104efee38 main + 72
22 libdyld.dylib 0x00007fff5123bcf5 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

It looks like a plugin to set status bar colour is faulting, hence the error. The app with the plugin was working fine in older versions (<iOS13).
Removed the plugin and now I'm able to build and debug the app on Simulator. Haven't tested on physical device yet.

are you updating the package? let me know if you want me to test the patch on iOS 13 simulator?

@mchome
Copy link
Owner

mchome commented Sep 22, 2019

@ramamurthyk Try this:

dependencies:
  flutter_statusbarcolor:
    git:
      url: git://github.com/mchome/flutter_statusbarcolor
      ref: 427800a43c09a83443c44ae9cda9acf961c546a9

@AbdullahAlAsad
Copy link

AbdullahAlAsad commented Sep 22, 2019

@ramamurthyk
After trying this ref , I got the following errors

1 warning generated.
/Users/godslave/development/flutter/.pub-cache/git/flutter_statusbarcolor-427800a43c09
a83443c44ae9cda9acf961c546a9/ios/Classes/FlutterStatusbarcolorPlugin.m:18:52: error:
property 'standardAppearance' not found on object of type 'FlutterStatusbarcolorPlugin
*'
UINavigationBarAppearance *appearance = self.standardAppearance;
^
/Users/godslave/development/flutter/.pub-cache/git/flutter_statusbarcolor-427800a43c09
a83443c44ae9cda9acf961c546a9/ios/Classes/FlutterStatusbarcolorPlugin.m:39:52: error:
property 'standardAppearance' not found on object of type 'FlutterStatusbarcolorPlugin
*'
UINavigationBarAppearance *appearance = self.standardAppearance;
^
/Users/godslave/development/flutter/.pub-cache/git/flutter_statusbarcolor-427800a43c09
a83443c44ae9cda9acf961c546a9/ios/Classes/FlutterStatusbarcolorPlugin.m:42:12: error:
property 'standardAppearance' not found on object of type 'FlutterStatusbarcolorPlugin
*'
self.standardAppearance = appearance;
^
3 errors generated.

@mchome
Copy link
Owner

mchome commented Sep 22, 2019

@godslave05 Use d86bd38b0454dc3c3b9b48637dcb037164db95a3.

@AbdullahAlAsad
Copy link

AbdullahAlAsad commented Sep 22, 2019

So this means it will not change the status bar color on ios 13 or greater ?

@mchome
Copy link
Owner

mchome commented Sep 22, 2019

At the moment I have no idea how to do with. I have to disable it as temporary solution.
Can you confirm this ref can build with ios13?

@AbdullahAlAsad
Copy link

Yes , The build is perfectly working. I build and run on iOS 13

onikiri2007 added a commit to BlueChilli/flutter_statusbarcolor that referenced this issue Sep 23, 2019
@mchome mchome closed this as completed in bb66521 Sep 23, 2019
mchome added a commit that referenced this issue Sep 23, 2019
Statusbar background color change fix for iOS 13  #27
mchome added a commit that referenced this issue Sep 23, 2019
Refactor iOS13 statusbar background fix for #27
@mchome mchome unpinned this issue Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants