mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Close the app after the user acknowledges the Launch Error alert. (#2711)
* Close the app after the user acknowledges the Launch Error alert.
This commit is contained in:
parent
d7d99c6223
commit
38dd52719b
@ -31,6 +31,9 @@
|
||||
#include "sky/shell/shell.h"
|
||||
#include "sky/shell/shell_view.h"
|
||||
|
||||
@interface FlutterViewController() <UIAlertViewDelegate>
|
||||
@end
|
||||
|
||||
void FlutterInit(int argc, const char* argv[]) {
|
||||
NSBundle* bundle = [NSBundle bundleForClass:[FlutterViewController class]];
|
||||
NSString* icuDataPath = [bundle pathForResource:@"icudtl" ofType:@"dat"];
|
||||
@ -141,6 +144,11 @@ void FlutterInit(int argc, const char* argv[]) {
|
||||
|
||||
#pragma mark - Initializing the engine
|
||||
|
||||
- (void)alertView:(UIAlertView*)alertView
|
||||
clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
- (void)connectToEngineAndLoad {
|
||||
TRACE_EVENT0("flutter", "connectToEngineAndLoad");
|
||||
|
||||
@ -160,7 +168,7 @@ void FlutterInit(int argc, const char* argv[]) {
|
||||
UIAlertView* alert = [[UIAlertView alloc]
|
||||
initWithTitle:@"Launch Error"
|
||||
message:message
|
||||
delegate:nil
|
||||
delegate:self
|
||||
cancelButtonTitle:@"OK"
|
||||
otherButtonTitles:nil];
|
||||
[alert show];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user