diff --git a/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h index 1aca63dd55b7feda4156f567244f476082274e56..39d8b507233983cc4ff11637395027ce4e7c2820 100755 --- a/example/ios/Runner/AppDelegate.h +++ b/example/ios/Runner/AppDelegate.h @@ -7,9 +7,9 @@ // #import <UIKit/UIKit.h> -#import <flutter_boost/FlutterBoost.h> +#import <flutter_boost2/FlutterBoost2.h> -@interface AppDelegate : FLBFlutterAppDelegate <UIApplicationDelegate> +@interface AppDelegate : FLB2FlutterAppDelegate <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; diff --git a/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m index ad27c5b668acbb1eea26f9482ee8b609f7fc76ce..7326f9492b7d8dffdc5db28dc3e22a3c199236e8 100755 --- a/example/ios/Runner/AppDelegate.m +++ b/example/ios/Runner/AppDelegate.m @@ -9,7 +9,7 @@ #import "AppDelegate.h" #import "UIViewControllerDemo.h" #import "DemoRouter.h" -#import <flutter_boost/FlutterBoost.h> +#import <flutter_boost2/FlutterBoost2.h> @interface AppDelegate () @@ -20,7 +20,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { DemoRouter *router = [DemoRouter sharedRouter]; - [FlutterBoostPlugin.sharedInstance startFlutterWithPlatform:router + [FlutterBoostPlugin2.sharedInstance startFlutterWithPlatform:router onStart:^(FlutterEngine *fvc) { }]; @@ -35,7 +35,7 @@ vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"hybrid" image:nil tag:0]; - FLBFlutterViewContainer *fvc = FLBFlutterViewContainer.new; + FLB2FlutterViewContainer *fvc = FLB2FlutterViewContainer.new; [fvc setName:@"tab" params:@{}]; fvc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"flutter_tab" image:nil tag:1]; diff --git a/example/ios/Runner/DemoRouter.h b/example/ios/Runner/DemoRouter.h index b826c075814b14b487fc8372f4ae2cf7ba7bc662..bd14ed25986b19dfb108fea236fc49873856863f 100755 --- a/example/ios/Runner/DemoRouter.h +++ b/example/ios/Runner/DemoRouter.h @@ -8,7 +8,7 @@ #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> -#import <flutter_boost/FlutterBoost.h> +#import <flutter_boost2/FlutterBoost2.h> NS_ASSUME_NONNULL_BEGIN diff --git a/example/ios/Runner/DemoRouter.m b/example/ios/Runner/DemoRouter.m index 2232484316a20de158d7967ca2efbb1137fb7860..73d020e28da24c6ea4b794d1a85d82f53e3e2aae 100755 --- a/example/ios/Runner/DemoRouter.m +++ b/example/ios/Runner/DemoRouter.m @@ -7,7 +7,7 @@ // #import "DemoRouter.h" -#import <flutter_boost/FlutterBoost.h> +#import <flutter_boost2/FlutterBoost2.h> @implementation DemoRouter @@ -56,7 +56,7 @@ { BOOL animated = [exts[@"animated"] boolValue]; animated = YES; - FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController; + FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController; if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){ [vc dismissViewControllerAnimated:animated completion:^{}]; }else{ @@ -80,13 +80,13 @@ } if([params[@"present"] boolValue]){ - FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new; + FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new; [vc setName:name params:params]; [self.navigationController presentViewController:vc animated:animated completion:^{ if(completion) completion(YES); }]; }else{ - FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new; + FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new; [vc setName:name params:params]; [self.navigationController pushViewController:vc animated:animated]; if(completion) completion(YES); @@ -103,8 +103,8 @@ return; } - FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController; - if([vc isKindOfClass:FLBFlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){ + FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController; + if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){ [vc dismissViewControllerAnimated:animated completion:^{}]; }else{ [self.navigationController popViewControllerAnimated:animated]; diff --git a/example/ios/Runner/UIViewControllerDemo.m b/example/ios/Runner/UIViewControllerDemo.m index 3df7d3276db4afd2e216ebe23f954ee9ce24c22d..754503b8bd45128de2ed59140108dfe66369b1ab 100755 --- a/example/ios/Runner/UIViewControllerDemo.m +++ b/example/ios/Runner/UIViewControllerDemo.m @@ -9,7 +9,7 @@ #import "UIViewControllerDemo.h" #import <Flutter/Flutter.h> #import "DemoRouter.h" -#import <flutter_boost/FlutterBoostPlugin.h> +#import <flutter_boost2/FlutterBoostPlugin2.h> @interface UIViewControllerDemo () @@ -23,21 +23,20 @@ // Do any additional setup after loading the view from its nib. } - - (IBAction)pushFlutterPage:(id)sender { - [DemoRouter.sharedRouter openPage:@"first" - params:@{} - animated:YES - completion:^(BOOL f){ + [DemoRouter.sharedRouter open:@"first" + urlParams:@{} + exts:@{@"animated":@(YES)} + completion:^(BOOL f){ }]; } - (IBAction)present:(id)sender { - [DemoRouter.sharedRouter openPage:@"second" - params:@{@"present":@(YES)} - animated:YES - completion:^(BOOL f){}]; + [DemoRouter.sharedRouter open:@"second" + urlParams:@{@"present":@(YES)} + exts:@{@"animated":@(YES)} + completion:^(BOOL f){}]; // [self dismissViewControllerAnimated:YES completion:completion]; }