Commit 9604e1ea authored by Jidong Chen's avatar Jidong Chen

delete some useless code.

parent 854b8d32
...@@ -200,6 +200,7 @@ ...@@ -200,6 +200,7 @@
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1; CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = HH6T699A6Z;
}; };
}; };
}; };
...@@ -448,7 +449,7 @@ ...@@ -448,7 +449,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = HH6T699A6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -460,7 +461,7 @@ ...@@ -460,7 +461,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
PRODUCT_BUNDLE_IDENTIFIER = fleamarket.taobao.com.flutterBoostExample; PRODUCT_BUNDLE_IDENTIFIER = fleamarket.taobao3.com.flutterBoostExample;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
REEXPORTED_LIBRARY_PATHS = ""; REEXPORTED_LIBRARY_PATHS = "";
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
...@@ -473,7 +474,7 @@ ...@@ -473,7 +474,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = HH6T699A6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -485,7 +486,7 @@ ...@@ -485,7 +486,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
PRODUCT_BUNDLE_IDENTIFIER = fleamarket.taobao.com.flutterBoostExample; PRODUCT_BUNDLE_IDENTIFIER = fleamarket.taobao3.com.flutterBoostExample;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
REEXPORTED_LIBRARY_PATHS = ""; REEXPORTED_LIBRARY_PATHS = "";
VERSIONING_SYSTEM = "apple-generic"; VERSIONING_SYSTEM = "apple-generic";
......
...@@ -27,11 +27,7 @@ ...@@ -27,11 +27,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
#if RELEASE_1_0
@interface FLBFlutterEngine : NSObject<FLBFlutterProvider> @interface FLBFlutterEngine : NSObject<FLBFlutterProvider>
@end @end
#endif
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#import <Flutter/Flutter.h> #import <Flutter/Flutter.h>
#import "FLBFlutterViewContainer.h" #import "FLBFlutterViewContainer.h"
#if RELEASE_1_0
@interface FLBFlutterEngine() @interface FLBFlutterEngine()
@property (nonatomic,strong) FlutterEngine *engine; @property (nonatomic,strong) FlutterEngine *engine;
...@@ -102,4 +101,3 @@ ...@@ -102,4 +101,3 @@
@end @end
#endif
...@@ -24,9 +24,6 @@ ...@@ -24,9 +24,6 @@
#import "FLBFlutterViewContainer.h" #import "FLBFlutterViewContainer.h"
#import "FLBFlutterApplication.h" #import "FLBFlutterApplication.h"
#import "FLBStackCache.h"
#import "FLBStackCacheObjectImg.h"
#import "FLBMemoryInspector.h"
#import "Service_NavigationService.h" #import "Service_NavigationService.h"
#import "FlutterBoostConfig.h" #import "FlutterBoostConfig.h"
#import "FLBFlutterViewContainerManager.h" #import "FLBFlutterViewContainerManager.h"
...@@ -43,6 +40,25 @@ ...@@ -43,6 +40,25 @@
@implementation FLBFlutterViewContainer @implementation FLBFlutterViewContainer
- (instancetype)init
{
[FLUTTER_APP.flutterProvider prepareEngineIfNeeded];
if(self = [super initWithEngine:FLUTTER_APP.flutterProvider.engine
nibName:nil
bundle:nil]){
[self _setup];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
if (self = [super initWithCoder: aDecoder]) {
NSAssert(NO, @"unsupported init method!");
[self _setup];
}
return self;
}
- (void)setName:(NSString *)name params:(NSDictionary *)params - (void)setName:(NSString *)name params:(NSDictionary *)params
{ {
if(!_name && name){ if(!_name && name){
...@@ -67,7 +83,7 @@ static NSUInteger kInstanceCounter = 0; ...@@ -67,7 +83,7 @@ static NSUInteger kInstanceCounter = 0;
{ {
kInstanceCounter++; kInstanceCounter++;
if(kInstanceCounter == 1){ if(kInstanceCounter == 1){
[FLUTTER_APP resume]; // [FLUTTER_APP resume];
} }
} }
...@@ -75,7 +91,7 @@ static NSUInteger kInstanceCounter = 0; ...@@ -75,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
{ {
kInstanceCounter--; kInstanceCounter--;
if([self.class instanceCounter] == 0){ if([self.class instanceCounter] == 0){
[[FLBFlutterApplication sharedApplication] pause]; // [[FLBFlutterApplication sharedApplication] pause];
} }
} }
...@@ -89,41 +105,6 @@ static NSUInteger kInstanceCounter = 0; ...@@ -89,41 +105,6 @@ static NSUInteger kInstanceCounter = 0;
static long long sCounter = 0; static long long sCounter = 0;
_identifier = sCounter++; _identifier = sCounter++;
[self.class instanceCounterIncrease]; [self.class instanceCounterIncrease];
SEL sel = @selector(flutterViewDidShow:);
NSString *notiName = @"flutter_boost_container_showed";
[NSNotificationCenter.defaultCenter addObserver:self
selector:sel
name:notiName
object:nil];
}
- (instancetype)init
{
[FLUTTER_APP.flutterProvider prepareEngineIfNeeded];
if(self = [super initWithEngine:FLUTTER_APP.flutterProvider.engine
nibName:nil
bundle:nil]){
[self _setup];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder{
if (self = [super initWithCoder: aDecoder]) {
[self _setup];
}
return self;
}
- (void)flutterViewDidAppear:(NSDictionary *)params
{
//Notify flutter view appeared.
}
- (void)flutterViewDidShow:(NSNotification *)notification
{
} }
- (void)dealloc - (void)dealloc
...@@ -138,17 +119,15 @@ static NSUInteger kInstanceCounter = 0; ...@@ -138,17 +119,15 @@ static NSUInteger kInstanceCounter = 0;
pageName:_name params:_params pageName:_name params:_params
uniqueId:[self uniqueIDString]]; uniqueId:[self uniqueIDString]];
[[FLBStackCache sharedInstance] remove:self.uniqueIDString];
[[FLBFlutterApplication sharedApplication] removeViewController:self]; [[FLBFlutterApplication sharedApplication] removeViewController:self];
[self.class instanceCounterDecrease]; [self.class instanceCounterDecrease];
} }
- (void)viewDidLoad { //- (void)viewDidLoad {
[super viewDidLoad]; // [super viewDidLoad];
self.view.backgroundColor = UIColor.whiteColor; // self.view.backgroundColor = UIColor.whiteColor;
//}
}
#pragma mark - ScreenShots #pragma mark - ScreenShots
- (BOOL)isFlutterViewAttatched - (BOOL)isFlutterViewAttatched
...@@ -164,7 +143,6 @@ static NSUInteger kInstanceCounter = 0; ...@@ -164,7 +143,6 @@ static NSUInteger kInstanceCounter = 0;
- (void)detatchFlutterEngine - (void)detatchFlutterEngine
{ {
// [FLUTTER_APP.flutterProvider prepareEngineIfNeeded];
[FLUTTER_APP.flutterProvider detach]; [FLUTTER_APP.flutterProvider detach];
} }
......
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