Commit a761a6e2 authored by 余玠's avatar 余玠

remove the FlutterBoost "2" things which used to mark the new version temporaily

parent c9ebf0bb
PODS:
- Flutter (1.0.0)
- flutter_boost (0.0.1):
- flutter_boost (0.0.2):
- Flutter
DEPENDENCIES:
- Flutter (from `.symlinks/flutter/ios`)
- flutter_boost (from `/Users/wubian/flutter_boost2/ios`)
- flutter_boost (from `/Users/yujie/Desktop/flutter/flutter_boost/ios`)
EXTERNAL SOURCES:
Flutter:
:path: ".symlinks/flutter/ios"
flutter_boost:
:path: "/Users/wubian/flutter_boost2/ios"
:path: "/Users/yujie/Desktop/flutter/flutter_boost/ios"
SPEC CHECKSUMS:
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
flutter_boost: 584b569d153b3c3f3bfe48e043088af7ab9b1834
flutter_boost: 70a3494f98330364190073821d59dc5f9daf934c
PODFILE CHECKSUM: 2a757a7bdc03b37a2814666652fdff1cf694243f
COCOAPODS: 1.6.0
COCOAPODS: 1.2.0
......@@ -180,6 +180,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
3FC74F80EA9D039C70D1F681 /* [CP] Embed Pods Frameworks */,
6CD183C8DCF5E8247072E2F6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -269,7 +270,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6CD183C8DCF5E8247072E2F6 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
......@@ -301,7 +317,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
......
......@@ -7,9 +7,9 @@
//
#import <UIKit/UIKit.h>
#import <flutter_boost/FlutterBoost2.h>
#import <flutter_boost/FlutterBoost.h>
@interface AppDelegate : FLB2FlutterAppDelegate <UIApplicationDelegate>
@interface AppDelegate : FLBFlutterAppDelegate <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
......
......@@ -9,7 +9,7 @@
#import "AppDelegate.h"
#import "UIViewControllerDemo.h"
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoost2.h>
#import <flutter_boost/FlutterBoost.h>
@interface AppDelegate ()
......@@ -20,7 +20,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
DemoRouter *router = [DemoRouter sharedRouter];
[FlutterBoostPlugin2.sharedInstance startFlutterWithPlatform:router
[FlutterBoostPlugin.sharedInstance startFlutterWithPlatform:router
onStart:^(FlutterEngine *fvc) {
}];
......@@ -35,7 +35,7 @@
vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"hybrid" image:nil tag:0];
FLB2FlutterViewContainer *fvc = FLB2FlutterViewContainer.new;
FLBFlutterViewContainer *fvc = FLBFlutterViewContainer.new;
[fvc setName:@"tab" params:@{}];
fvc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"flutter_tab" image:nil tag:1];
......
......@@ -8,12 +8,13 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <flutter_boost/FlutterBoost2.h>
#import <flutter_boost/FlutterBoost.h>
NS_ASSUME_NONNULL_BEGIN
@protocol FLBPlatform;
@interface DemoRouter : NSObject<FLB2Platform>
@interface DemoRouter : NSObject<FLBPlatform>
@property (nonatomic,strong) UINavigationController *navigationController;
......
......@@ -7,7 +7,7 @@
//
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoost2.h>
#import <flutter_boost/FlutterBoost.h>
@implementation DemoRouter
......@@ -21,12 +21,6 @@
return instance;
}
//AB Boost 2 switch
- (BOOL)useBoost2
{
return YES;
}
#pragma mark - Boost 2
- (void)open:(NSString *)name
urlParams:(NSDictionary *)params
......@@ -36,13 +30,13 @@
BOOL animated = [exts[@"animated"] boolValue];
animated = YES;
if([params[@"present"] boolValue]){
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController presentViewController:vc animated:animated completion:^{
if(completion) completion(YES);
}];
}else{
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController pushViewController:vc animated:animated];
if(completion) completion(YES);
......@@ -56,8 +50,8 @@
{
BOOL animated = [exts[@"animated"] boolValue];
animated = YES;
FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLBFlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}];
}else{
[self.navigationController popViewControllerAnimated:animated];
......@@ -70,44 +64,20 @@
animated:(BOOL)animated
completion:(void (^)(BOOL))completion
{
if([self useBoost2]){
NSMutableDictionary *exts = NSMutableDictionary.new;
exts[@"url"] = name;
exts[@"params"] = params;
exts[@"animated"] = @(animated);
[self open:name urlParams:params exts:exts completion:completion];
return;
}
if([params[@"present"] boolValue]){
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController presentViewController:vc animated:animated completion:^{
if(completion) completion(YES);
}];
}else{
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController pushViewController:vc animated:animated];
if(completion) completion(YES);
}
NSMutableDictionary *exts = NSMutableDictionary.new;
exts[@"url"] = name;
exts[@"params"] = params;
exts[@"animated"] = @(animated);
[self open:name urlParams:params exts:exts completion:completion];
return;
}
- (void)closePage:(NSString *)uid animated:(BOOL)animated params:(NSDictionary *)params completion:(void (^)(BOOL))completion
{
if([self useBoost2]){
NSMutableDictionary *exts = NSMutableDictionary.new;
exts[@"params"] = params;
exts[@"animated"] = @(animated);
[self close:uid result:@{} exts:exts completion:completion];
return;
}
FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}];
}else{
[self.navigationController popViewControllerAnimated:animated];
}
NSMutableDictionary *exts = NSMutableDictionary.new;
exts[@"params"] = params;
exts[@"animated"] = @(animated);
[self close:uid result:@{} exts:exts completion:completion];
return;
}
@end
......@@ -9,7 +9,7 @@
#import "UIViewControllerDemo.h"
#import <Flutter/Flutter.h>
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoostPlugin2.h>
#import <flutter_boost/FlutterBoostPlugin.h>
@interface UIViewControllerDemo ()
......
......@@ -27,7 +27,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface FLB2Factory : NSObject<FLBAbstractFactory>
@interface FLBFactory : NSObject<FLBAbstractFactory>
@end
NS_ASSUME_NONNULL_END
......@@ -22,20 +22,20 @@
* THE SOFTWARE.
*/
#import "FLB2Factory.h"
#import "FLB2FlutterApplication.h"
#import "FLB2FlutterViewContainer.h"
#import "FLBFactory.h"
#import "FLBFlutterApplication.h"
#import "FLBFlutterViewContainer.h"
@implementation FLB2Factory
@implementation FLBFactory
- (id<FLBFlutterApplicationInterface>)createApplication:(id<FLB2Platform>)platform
- (id<FLBFlutterApplicationInterface>)createApplication:(id<FLBPlatform>)platform
{
return FLB2FlutterApplication.new;
return FLBFlutterApplication.new;
}
- (id<FLBFlutterContainer>)createFlutterContainer
{
return FLB2FlutterViewContainer.new;
return FLBFlutterViewContainer.new;
}
@end
......@@ -24,12 +24,12 @@
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import "FLB2Platform.h"
#import "FLB2FlutterProvider.h"
#import "FLBPlatform.h"
#import "FLBFlutterProvider.h"
#import "FLBFlutterApplicationInterface.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterApplication : NSObject<FLBFlutterApplicationInterface>
@property (nonatomic,strong) id<FLB2Platform> platform;
@interface FLBFlutterApplication : NSObject<FLBFlutterApplicationInterface>
@property (nonatomic,strong) id<FLBPlatform> platform;
@end
NS_ASSUME_NONNULL_END
......@@ -22,25 +22,25 @@
* THE SOFTWARE.
*/
#import "FLB2FlutterApplication.h"
#import "FlutterBoost2.h"
#import "FLB2FlutterContainerManager.h"
#import "FLB2FlutterEngine.h"
@interface FLB2FlutterApplication()
@property (nonatomic,strong) FLB2FlutterContainerManager *manager;
@property (nonatomic,strong) id<FLB2FlutterProvider> viewProvider;
#import "FLBFlutterApplication.h"
#import "FlutterBoost.h"
#import "FLBFlutterContainerManager.h"
#import "FLBFlutterEngine.h"
@interface FLBFlutterApplication()
@property (nonatomic,strong) FLBFlutterContainerManager *manager;
@property (nonatomic,strong) id<FLBFlutterProvider> viewProvider;
@property (nonatomic,assign) BOOL isRunning;
@property (nonatomic,strong) NSMutableDictionary *pageResultCallbacks;
@property (nonatomic,strong) NSMutableDictionary *callbackCache;
@end
@implementation FLB2FlutterApplication
@implementation FLBFlutterApplication
+ (FLB2FlutterApplication *)sharedApplication
+ (FLBFlutterApplication *)sharedApplication
{
static FLB2FlutterApplication *instance = nil;
static FLBFlutterApplication *instance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [self new];
......@@ -58,13 +58,13 @@
return _viewProvider;
}
- (void)startFlutterWithPlatform:(id<FLB2Platform>)platform
- (void)startFlutterWithPlatform:(id<FLBPlatform>)platform
onStart:(void (^)(id<FlutterBinaryMessenger,FlutterTextureRegistry,FlutterPluginRegistry> _Nonnull))callback
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
self.platform = platform;
self.viewProvider = [[FLB2FlutterEngine alloc] initWithPlatform:platform];
self.viewProvider = [[FLBFlutterEngine alloc] initWithPlatform:platform];
self.isRunning = YES;
if(callback) callback(self.viewProvider.engine);
});
......@@ -73,7 +73,7 @@
- (instancetype)init
{
if (self = [super init]) {
_manager = [FLB2FlutterContainerManager new];
_manager = [FLBFlutterContainerManager new];
_pageResultCallbacks = NSMutableDictionary.new;
_callbackCache = NSMutableDictionary.new;
......
......@@ -23,11 +23,11 @@
*/
#import <Foundation/Foundation.h>
#import "FLB2FlutterProvider.h"
#import "FLB2Platform.h"
#import "FLBFlutterProvider.h"
#import "FLBPlatform.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterEngine : NSObject<FLB2FlutterProvider>
- (instancetype)initWithPlatform:(id<FLB2Platform>)platform;
@interface FLBFlutterEngine : NSObject<FLBFlutterProvider>
- (instancetype)initWithPlatform:(id<FLBPlatform>)platform;
@end
NS_ASSUME_NONNULL_END
......@@ -22,20 +22,20 @@
* THE SOFTWARE.
*/
#import "FLB2FlutterEngine.h"
#import "FLBFlutterEngine.h"
#import <Flutter/Flutter.h>
#import "FLB2FlutterViewContainer.h"
#import "FLBFlutterViewContainer.h"
#import "BoostMessageChannel.h"
@interface FLB2FlutterEngine()
@interface FLBFlutterEngine()
@property (nonatomic,strong) FlutterEngine *engine;
@property (nonatomic,strong) FLB2FlutterViewContainer *dummy;
@property (nonatomic,strong) FLBFlutterViewContainer *dummy;
@end
@implementation FLB2FlutterEngine
@implementation FLBFlutterEngine
- (instancetype)initWithPlatform:(id<FLB2Platform>)platform
- (instancetype)initWithPlatform:(id<FLBPlatform>)platform
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
......@@ -49,7 +49,7 @@
}else{
[_engine runWithEntrypoint:nil];
}
_dummy = [[FLB2FlutterViewContainer alloc] initWithEngine:_engine
_dummy = [[FLBFlutterViewContainer alloc] initWithEngine:_engine
nibName:nil
bundle:nil];
Class clazz = NSClassFromString(@"GeneratedPluginRegistrant");
......@@ -79,7 +79,7 @@
- (void)resume
{
[[_engine lifecycleChannel] sendMessage:@"AppLifecycleState.resumed"];
[(FLB2FlutterViewContainer *)_engine.viewController surfaceUpdated:YES];
[(FLBFlutterViewContainer *)_engine.viewController surfaceUpdated:YES];
}
- (void)inactive
......
......@@ -27,7 +27,7 @@
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterViewContainer : FlutterViewController<FLBFlutterContainer>
@interface FLBFlutterViewContainer : FlutterViewController<FLBFlutterContainer>
- (void)surfaceUpdated:(BOOL)appeared;
@end
NS_ASSUME_NONNULL_END
......@@ -22,23 +22,23 @@
* THE SOFTWARE.
*/
#import "FLB2FlutterViewContainer.h"
#import "FLB2FlutterApplication.h"
#import "FLBFlutterViewContainer.h"
#import "FLBFlutterApplication.h"
#import "BoostMessageChannel.h"
#import "FLB2FlutterContainerManager.h"
#import "FlutterBoostPlugin2_private.h"
#import "FLBFlutterContainerManager.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin2 sharedInstance].application
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VC FLUTTER_APP.flutterViewController
@interface FLB2FlutterViewContainer ()
@interface FLBFlutterViewContainer ()
@property (nonatomic,copy,readwrite) NSString *name;
@property (nonatomic,strong,readwrite) NSDictionary *params;
@property (nonatomic,assign) long long identifier;
@end
@implementation FLB2FlutterViewContainer
@implementation FLBFlutterViewContainer
- (instancetype)init
{
......@@ -173,10 +173,10 @@ static NSUInteger kInstanceCounter = 0;
params:_params
uniqueId:self.uniqueIDString];
//Save some first time page info.
if(![FlutterBoostPlugin2 sharedInstance].fPagename){
[FlutterBoostPlugin2 sharedInstance].fPagename = _name;
[FlutterBoostPlugin2 sharedInstance].fPageId = self.uniqueIDString;
[FlutterBoostPlugin2 sharedInstance].fParams = _params;
if(![FlutterBoostPlugin sharedInstance].fPagename){
[FlutterBoostPlugin sharedInstance].fPagename = _name;
[FlutterBoostPlugin sharedInstance].fPageId = self.uniqueIDString;
[FlutterBoostPlugin sharedInstance].fParams = _params;
}
[super viewWillAppear:animated];
......
......@@ -22,14 +22,14 @@
* THE SOFTWARE.
*/
#import "BoostChannel.h"
#import "FlutterBoost2.h"
#import "FlutterBoost.h"
@implementation BoostChannel
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
[FlutterBoostPlugin2 registerWithRegistrar:registrar];
[FlutterBoostPlugin registerWithRegistrar:registrar];
}
- (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
[FlutterBoostPlugin2.sharedInstance handleMethodCall:call result:result];
[FlutterBoostPlugin.sharedInstance handleMethodCall:call result:result];
}
@end
......@@ -25,14 +25,14 @@
#import <Foundation/Foundation.h>
#import "FLBFlutterApplicationInterface.h"
#import "FLB2FlutterProvider.h"
#import "FLB2Platform.h"
#import "FLBFlutterProvider.h"
#import "FLBPlatform.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol FLBAbstractFactory <NSObject>
@required
- (id<FLBFlutterApplicationInterface>)createApplication:(id<FLB2Platform>)platform;
- (id<FLBFlutterApplicationInterface>)createApplication:(id<FLBPlatform>)platform;
- (id<FLBFlutterContainer>)createFlutterContainer;
@end
NS_ASSUME_NONNULL_END
......@@ -25,7 +25,7 @@
#import <Flutter/Flutter.h>
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterAppDelegate : FlutterAppDelegate
@interface FLBFlutterAppDelegate : FlutterAppDelegate
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Otherwise, returns nil.
- (FlutterViewController*)rootFlutterViewController;
......
......@@ -22,13 +22,13 @@
* THE SOFTWARE.
*/
#import "FLB2FlutterAppDelegate.h"
#import "FlutterBoostPlugin2_private.h"
#import "FLBFlutterAppDelegate.h"
#import "FlutterBoostPlugin_private.h"
@implementation FLB2FlutterAppDelegate
@implementation FLBFlutterAppDelegate
// Returns the key window's rootViewController, if it's a FlutterViewController.
// Otherwise, returns nil.
- (FlutterViewController*)rootFlutterViewController {
return FlutterBoostPlugin2.sharedInstance.application.flutterViewController;
return FlutterBoostPlugin.sharedInstance.application.flutterViewController;
}
@end
......@@ -23,18 +23,18 @@
*/
#import <Foundation/Foundation.h>
#import <Flutter/Flutter.h>
#import "FLB2Platform.h"
#import "FlutterBoost2.h"
#import "FLB2FlutterProvider.h"
#import "FLBPlatform.h"
#import "FlutterBoost.h"
#import "FLBFlutterProvider.h"
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@protocol FLBFlutterApplicationInterface <NSObject>
@property (nonatomic,strong) id<FLB2Platform> platform;
@property (nonatomic,strong) id<FLBPlatform> platform;
- (id<FLB2FlutterProvider>)flutterProvider;
- (id<FLBFlutterProvider>)flutterProvider;
- (void)startFlutterWithPlatform:(id<FLB2Platform>)platform
- (void)startFlutterWithPlatform:(id<FLBPlatform>)platform
onStart:(void (^)(id<FlutterBinaryMessenger,
FlutterTextureRegistry,
FlutterPluginRegistry> engine))callback;
......
......@@ -26,7 +26,7 @@
#import "FLBFlutterContainer.h"
NS_ASSUME_NONNULL_BEGIN
@interface FLB2FlutterContainerManager : NSObject
@interface FLBFlutterContainerManager : NSObject
- (NSString *)peak;
- (void)addUnique:(id<FLBFlutterContainer>)vc;
......
......@@ -22,14 +22,14 @@
* THE SOFTWARE.
*/
#import "FLB2FlutterContainerManager.h"
#import "FLBFlutterContainerManager.h"
@interface FLB2FlutterContainerManager()
@interface FLBFlutterContainerManager()
@property (nonatomic,strong) NSMutableArray *idStk;
@property (nonatomic,strong) NSMutableDictionary *existedID;
@end
@implementation FLB2FlutterContainerManager
@implementation FLBFlutterContainerManager
- (instancetype)init
{
......
......@@ -28,7 +28,7 @@
@class FlutterEngine;
NS_ASSUME_NONNULL_BEGIN
@protocol FLB2FlutterProvider <NSObject>
@protocol FLBFlutterProvider <NSObject>
@required
- (FlutterEngine *)engine;
- (void)atacheToViewController:(FlutterViewController *)vc;
......
......@@ -25,7 +25,7 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol FLB2Platform <NSObject>
@protocol FLBPlatform <NSObject>
@optional
- (NSString *)entryForDart;
......
......@@ -25,9 +25,9 @@
#ifndef FlutterBoost_h
#define FlutterBoost_h
#import "FlutterBoostPlugin2.h"
#import "FLB2FlutterAppDelegate.h"
#import "FLB2FlutterViewContainer.h"
#import "FlutterBoostPlugin.h"
#import "FLBFlutterAppDelegate.h"
#import "FLBFlutterViewContainer.h"
#import "FLBTypes.h"
#endif /* FlutterBoost_h */
......@@ -23,14 +23,14 @@
*/
#import <Flutter/Flutter.h>
#import "FLB2Platform.h"
#import "FLBPlatform.h"
#import "FLBTypes.h"
@interface FlutterBoostPlugin2 : NSObject<FlutterPlugin>
@interface FlutterBoostPlugin : NSObject<FlutterPlugin>
#pragma mark - Initializer
+ (instancetype)sharedInstance;
- (void)startFlutterWithPlatform:(id<FLB2Platform>)platform
- (void)startFlutterWithPlatform:(id<FLBPlatform>)platform
onStart:(void (^)(id<FlutterBinaryMessenger,
FlutterTextureRegistry,
FlutterPluginRegistry> engine))callback;
......
......@@ -22,24 +22,24 @@
* THE SOFTWARE.
*/
#import "FlutterBoostPlugin2.h"
#import "FlutterBoostPlugin2_private.h"
#import "FLB2Factory.h"
#import "FlutterBoostPlugin.h"
#import "FlutterBoostPlugin_private.h"
#import "FLBFactory.h"
#import "BoostMessageChannel.h"
#import "FLBCollectionHelper.h"
#define NSNull2Nil(_x_) if([_x_ isKindOfClass: NSNull.class]) _x_ = nil;
@interface FlutterBoostPlugin2()
@interface FlutterBoostPlugin()
@end
@implementation FlutterBoostPlugin2
@implementation FlutterBoostPlugin
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
FlutterMethodChannel* channel = [FlutterMethodChannel
methodChannelWithName:@"flutter_boost"
binaryMessenger:[registrar messenger]];
FlutterBoostPlugin2* instance = [self.class sharedInstance];
FlutterBoostPlugin* instance = [self.class sharedInstance];
instance.methodChannel = channel;
[registrar addMethodCallDelegate:instance channel:channel];
}
......@@ -60,7 +60,7 @@
NSNull2Nil(exts);
NSNull2Nil(resultData);
NSNull2Nil(uid);
[[FlutterBoostPlugin2 sharedInstance].application close:uid
[[FlutterBoostPlugin sharedInstance].application close:uid
result:resultData
exts:exts
completion:^(BOOL r){
......@@ -83,16 +83,16 @@
NSNull2Nil(url);
NSNull2Nil(urlParams);
NSNull2Nil(exts);
[[FlutterBoostPlugin2 sharedInstance].application open:url
[[FlutterBoostPlugin sharedInstance].application open:url
urlParams:urlParams
exts:exts
reult:result
completion:^(BOOL r) {}];
}else if([@"pageOnStart" isEqualToString:call.method]){
NSMutableDictionary *pageInfo = [NSMutableDictionary new];
pageInfo[@"name"] =[FlutterBoostPlugin2 sharedInstance].fPagename;
pageInfo[@"params"] = [FlutterBoostPlugin2 sharedInstance].fParams;
pageInfo[@"uniqueId"] = [FlutterBoostPlugin2 sharedInstance].fPageId;
pageInfo[@"name"] =[FlutterBoostPlugin sharedInstance].fPagename;
pageInfo[@"params"] = [FlutterBoostPlugin sharedInstance].fParams;
pageInfo[@"uniqueId"] = [FlutterBoostPlugin sharedInstance].fPageId;
if(result) result(pageInfo);
}else{
result(FlutterMethodNotImplemented);
......@@ -123,14 +123,14 @@
return _factory;
}
- (void)startFlutterWithPlatform:(id<FLB2Platform>)platform
- (void)startFlutterWithPlatform:(id<FLBPlatform>)platform
onStart:(void (^)(id<FlutterBinaryMessenger,
FlutterTextureRegistry,
FlutterPluginRegistry> engine))callback;
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
self->_factory = FLB2Factory.new;
self->_factory = FLBFactory.new;
self->_application = [self->_factory createApplication:platform];
[self->_application startFlutterWithPlatform:platform
onStart:callback];
......
......@@ -25,8 +25,8 @@
#import "FLBFlutterApplicationInterface.h"
#import "FLBAbstractFactory.h"
#import "FlutterBoostPlugin2.h"
@interface FlutterBoostPlugin2(){
#import "FlutterBoostPlugin.h"
@interface FlutterBoostPlugin(){
id<FLBFlutterApplicationInterface> _application;
id<FLBAbstractFactory> _factory;
}
......
......@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
#import "BoostMessageChannel.h"
#import "FlutterBoostPlugin2_private.h"
#import "FlutterBoostPlugin_private.h"
@implementation BoostMessageChannel
......@@ -37,7 +37,7 @@
+ (FlutterMethodChannel *)methodChannel
{
return FlutterBoostPlugin2.sharedInstance.methodChannel;
return FlutterBoostPlugin.sharedInstance.methodChannel;
}
+ (void)sendEvent:(NSString *)eventName
......@@ -162,7 +162,7 @@
}
}];
[FlutterBoostPlugin2.sharedInstance.application didInitPageContainer:pageName
[FlutterBoostPlugin.sharedInstance.application didInitPageContainer:pageName
params:params
uniqueId:uniqueId];
}
......@@ -179,7 +179,7 @@
}
}];
[FlutterBoostPlugin2.sharedInstance.application willDeallocPageContainer:pageName
[FlutterBoostPlugin.sharedInstance.application willDeallocPageContainer:pageName
params:params
uniqueId:uniqueId];
}
......
......@@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'flutter_boost'
s.version = '0.0.1'
s.version = '0.0.2'
s.summary = 'A new Flutter plugin make flutter better to use!'
s.description = <<-DESC
A new Flutter plugin make flutter better to use!
......@@ -15,14 +15,14 @@ A new Flutter plugin make flutter better to use!
s.source_files = 'Classes/**/*.{h,m,mm}'
s.public_header_files =
'Classes/Boost/FlutterBoostPlugin2.h',
'Classes/Boost/FLB2Platform.h',
'Classes/Boost/FlutterBoostPlugin.h',
'Classes/Boost/FLBPlatform.h',
'Classes/Boost/FLBFlutterContainer.h',
'Classes/Boost/FLB2FlutterAppDelegate.h',
'Classes/Boost/FLBFlutterAppDelegate.h',
'Classes/Boost/FLBTypes.h',
'Classes/Boost/FlutterBoost2.h',
'Classes/Boost/FlutterBoost.h',
'Classes/Boost/BoostChannel.h',
'Classes/1.5/FLB2FlutterViewContainer.h'
'Classes/1.5/FLBFlutterViewContainer.h'
s.dependency 'Flutter'
s.libraries = 'c++'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment