mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This patch changes the default `flutter create` command to generate a HelloServices-style app on iOS. As a consequence, the Atom integration now fully works with HelloServices.
29 lines
1.1 KiB
Objective-C
29 lines
1.1 KiB
Objective-C
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#import "AppDelegate.h"
|
|
|
|
#import <Flutter/Flutter.h>
|
|
#import "LocationProvider.h"
|
|
|
|
@implementation AppDelegate {
|
|
LocationProvider* _locationProvider;
|
|
}
|
|
|
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
|
FlutterDartProject* project = [[FlutterDartProject alloc] initFromDefaultSourceForConfiguration];
|
|
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
|
FlutterViewController* flutterController = [[FlutterViewController alloc] initWithProject:project
|
|
nibName:nil
|
|
bundle:nil];
|
|
_locationProvider = [[LocationProvider alloc] init];
|
|
[flutterController addMessageListener:_locationProvider];
|
|
|
|
self.window.rootViewController = flutterController;
|
|
[self.window makeKeyAndVisible];
|
|
return YES;
|
|
}
|
|
|
|
@end
|