Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
b5ef7160
Commit
b5ef7160
authored
Jun 11, 2019
by
Jidong Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
almost done
parent
5173dd21
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
141 additions
and
127 deletions
+141
-127
ios/Classes/1.0/FLBFlutterApplication.m
ios/Classes/1.0/FLBFlutterApplication.m
+0
-5
ios/Classes/1.0/FLBFlutterEngineOld.m
ios/Classes/1.0/FLBFlutterEngineOld.m
+1
-6
ios/Classes/1.0/FLBFlutterProvider.h
ios/Classes/1.0/FLBFlutterProvider.h
+7
-8
ios/Classes/1.0/FLBFlutterViewContainer.m
ios/Classes/1.0/FLBFlutterViewContainer.m
+16
-14
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
+0
-1
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
+0
-6
ios/Classes/1.0/FLBFlutterViewProvider.h
ios/Classes/1.0/FLBFlutterViewProvider.h
+0
-2
ios/Classes/1.0/FLBViewProviderFactory.m
ios/Classes/1.0/FLBViewProviderFactory.m
+0
-1
ios/Classes/1.5/FLB2Factory.h
ios/Classes/1.5/FLB2Factory.h
+2
-1
ios/Classes/1.5/FLB2Factory.m
ios/Classes/1.5/FLB2Factory.m
+35
-6
ios/Classes/1.5/FLB2FlutterApplication.h
ios/Classes/1.5/FLB2FlutterApplication.h
+0
-21
ios/Classes/1.5/FLB2FlutterApplication.m
ios/Classes/1.5/FLB2FlutterApplication.m
+4
-6
ios/Classes/1.5/FLB2FlutterViewContainer.m
ios/Classes/1.5/FLB2FlutterViewContainer.m
+7
-7
ios/Classes/Boost/FLB2FlutterProvider.h
ios/Classes/Boost/FLB2FlutterProvider.h
+2
-6
ios/Classes/Boost/FLB2Platform.h
ios/Classes/Boost/FLB2Platform.h
+1
-2
ios/Classes/Boost/FLBFlutterContainer.h
ios/Classes/Boost/FLBFlutterContainer.h
+24
-6
ios/Classes/Boost/FLBPlatform.h
ios/Classes/Boost/FLBPlatform.h
+0
-4
ios/Classes/Boost/FlutterBoostPlugin.m
ios/Classes/Boost/FlutterBoostPlugin.m
+14
-3
ios/Classes/Boost/FlutterBoostPlugin_private.h
ios/Classes/Boost/FlutterBoostPlugin_private.h
+7
-4
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
...NavigationService/handlers/NavigationService_closePage.mm
+10
-8
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
.../NavigationService/handlers/NavigationService_openPage.mm
+11
-10
No files found.
ios/Classes/1.0/FLBFlutterApplication.m
View file @
b5ef7160
...
@@ -126,10 +126,5 @@
...
@@ -126,10 +126,5 @@
[
self
.
viewProvider
inactive
];
[
self
.
viewProvider
inactive
];
}
}
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
{
[
self
.
viewProvider
setAccessibilityEnable
:
enable
];
}
@end
@end
ios/Classes/1.0/FLBFlutterEngineOld.m
View file @
b5ef7160
...
@@ -47,12 +47,7 @@
...
@@ -47,12 +47,7 @@
method_exchangeImplementations
(
originalMethod
,
swizzledMethod
);
method_exchangeImplementations
(
originalMethod
,
swizzledMethod
);
_viewController
=
[
FLBFlutterViewControllerAdaptor
new
];
_viewController
=
[
FLBFlutterViewControllerAdaptor
new
];
if
([
platform
respondsToSelector
:
@selector
(
accessibilityEnable
)]){
_viewController
.
accessibilityEnable
=
[
platform
accessibilityEnable
];
}
else
{
_viewController
.
accessibilityEnable
=
YES
;
}
[
_viewController
view
];
[
_viewController
view
];
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
Class
clazz
=
NSClassFromString
(
@"GeneratedPluginRegistrant"
);
if
(
clazz
)
{
if
(
clazz
)
{
...
...
ios/Classes/1.0/FLBFlutterProvider.h
View file @
b5ef7160
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2019 Alibaba Group
* Copyright (c) 2019 Alibaba Group
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...
@@ -25,21 +25,20 @@
...
@@ -25,21 +25,20 @@
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
@class
FlutterViewController
;
@class
FlutterViewController
;
@class
FlutterEngine
;
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0
1
#define RELEASE_1_0
0
@protocol
FLBFlutterProvider
<
NSObject
>
@protocol
FLBFlutter
View
Provider
<
NSObject
>
@required
@required
-
(
FlutterViewController
*
)
viewController
;
-
(
void
)
pause
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
void
)
inactive
;
-
(
void
)
prepareEngineIfNeeded
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
ios/Classes/1.0/FLBFlutterViewContainer.m
View file @
b5ef7160
...
@@ -29,10 +29,12 @@
...
@@ -29,10 +29,12 @@
#import "FLBMemoryInspector.h"
#import "FLBMemoryInspector.h"
#import "Service_NavigationService.h"
#import "Service_NavigationService.h"
#import "FlutterBoostConfig.h"
#import "FlutterBoostConfig.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
#define FLUTTER_VIEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_VC FLUTTER_APP.flutterViewController
#define FLUTTER_VIEW [FLBFlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_VC [FLBFlutterApplication sharedApplication].flutterViewController
#define FLUTTER_APP [FLBFlutterApplication sharedApplication]
@interface
FLBFlutterViewContainer
()
@interface
FLBFlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
...
@@ -77,7 +79,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -77,7 +79,7 @@ static NSUInteger kInstanceCounter = 0;
kInstanceCounter
--
;
kInstanceCounter
--
;
if
([
self
.
class
instanceCounter
]
==
0
){
if
([
self
.
class
instanceCounter
]
==
0
){
[[
FLBStackCache
sharedInstance
]
clear
];
[[
FLBStackCache
sharedInstance
]
clear
];
[
[
FLBFlutterApplication
sharedApplication
]
pause
];
[
FLUTTER_APP
pause
];
}
}
}
}
...
@@ -143,7 +145,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -143,7 +145,7 @@ static NSUInteger kInstanceCounter = 0;
uniqueId:
[
self
uniqueIDString
]];
uniqueId:
[
self
uniqueIDString
]];
[[
FLBStackCache
sharedInstance
]
remove
:
self
.
uniqueIDString
];
[[
FLBStackCache
sharedInstance
]
remove
:
self
.
uniqueIDString
];
[
[
FLBFlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
FLUTTER_APP
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
[
self
.
class
instanceCounterDecrease
];
}
}
...
@@ -290,7 +292,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -290,7 +292,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
-
(
void
)
viewDidLayoutSubviews
{
{
[
super
viewDidLayoutSubviews
];
[
super
viewDidLayoutSubviews
];
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
}
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
@@ -299,10 +301,10 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -299,10 +301,10 @@ static NSUInteger kInstanceCounter = 0;
self
.
interactiveGestureActive
=
true
;
self
.
interactiveGestureActive
=
true
;
}
}
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
//For new page we should attach flutter view in view will appear
//For new page we should attach flutter view in view will appear
//for better performance.
//for better performance.
if
(
!
[
[
FLBFlutterApplication
sharedApplication
]
contains
:
self
]){
if
(
!
[
FLUTTER_APP
contains
:
self
]){
[
self
attatchFlutterView
];
[
self
attatchFlutterView
];
}
}
...
@@ -313,10 +315,10 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -313,10 +315,10 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
//Save some first time page info.
//Save some first time page info.
if
(
!
[
FlutterBoost
Config
sharedInstance
].
fPagename
){
if
(
!
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
){
[
FlutterBoost
Config
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Plugin
sharedInstance
].
fPagename
=
_name
;
[
FlutterBoost
Config
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Plugin
sharedInstance
].
fPageId
=
self
.
uniqueIDString
;
[
FlutterBoost
Config
sharedInstance
].
fParams
=
_params
;
[
FlutterBoost
Plugin
sharedInstance
].
fParams
=
_params
;
}
}
[
super
viewWillAppear
:
animated
];
[
super
viewWillAppear
:
animated
];
...
@@ -324,7 +326,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -324,7 +326,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
-
(
void
)
viewDidAppear
:(
BOOL
)
animated
{
{
[
[
FLBFlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
//Ensure flutter view is attached.
//Ensure flutter view is attached.
[
self
attatchFlutterView
];
[
self
attatchFlutterView
];
...
@@ -334,7 +336,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -334,7 +336,7 @@ static NSUInteger kInstanceCounter = 0;
params:
_params
params:
_params
uniqueId:
self
.
uniqueIDString
];
uniqueId:
self
.
uniqueIDString
];
[
[
FLBFlutterApplication
sharedApplication
]
addUniqueViewController
:
self
];
[
FLUTTER_APP
addUniqueViewController
:
self
];
[
super
viewDidAppear
:
animated
];
[
super
viewDidAppear
:
animated
];
...
...
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.h
View file @
b5ef7160
...
@@ -32,7 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -32,7 +32,6 @@ NS_ASSUME_NONNULL_BEGIN
-
(
void
)
boost_viewWillDisappear
:(
BOOL
)
animated
;
-
(
void
)
boost_viewWillDisappear
:(
BOOL
)
animated
;
-
(
void
)
boost_viewDidDisappear
:(
BOOL
)
animated
;
-
(
void
)
boost_viewDidDisappear
:(
BOOL
)
animated
;
@property
(
nonatomic
,
assign
)
BOOL
accessibilityEnable
;
@end
@end
...
...
ios/Classes/1.0/FLBFlutterViewControllerAdaptor.m
View file @
b5ef7160
...
@@ -95,11 +95,5 @@
...
@@ -95,11 +95,5 @@
//Override this to avoid unnecessary splash Screen.
//Override this to avoid unnecessary splash Screen.
}
}
-
(
void
)
fixed_onAccessibilityStatusChanged
:(
NSNotification
*
)
notification
{
if
(
self
.
accessibilityEnable
){
[
self
fixed_onAccessibilityStatusChanged
:
notification
];
}
}
@end
@end
ios/Classes/1.0/FLBFlutterViewProvider.h
View file @
b5ef7160
...
@@ -33,8 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -33,8 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLBFlutterViewProvider
<
NSObject
>
@protocol
FLBFlutterViewProvider
<
NSObject
>
@required
@required
-
(
void
)
setAccessibilityEnable
:(
BOOL
)
enable
;
-
(
BOOL
)
accessibilityEnable
;
-
(
FlutterViewController
*
)
viewController
;
-
(
FlutterViewController
*
)
viewController
;
-
(
void
)
pause
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
resume
;
...
...
ios/Classes/1.0/FLBViewProviderFactory.m
View file @
b5ef7160
...
@@ -23,7 +23,6 @@
...
@@ -23,7 +23,6 @@
*/
*/
#import "FLBViewProviderFactory.h"
#import "FLBViewProviderFactory.h"
#import "FLBFlutterEngine.h"
#import "FLBFlutterEngineOld.h"
#import "FLBFlutterEngineOld.h"
#import "FLBPlatform.h"
#import "FLBPlatform.h"
...
...
ios/Classes/1.5/FLB2Factory.h
View file @
b5ef7160
...
@@ -23,10 +23,11 @@
...
@@ -23,10 +23,11 @@
*/
*/
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBAbstractFactory.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLB2Factory
:
NSObject
@interface
FLB2Factory
:
NSObject
<
FLBAbstractFactory
>
@end
@end
...
...
ios/Classes/1.5/FLB2Factory.m
View file @
b5ef7160
//
/*
// FLBFactory.m
* The MIT License (MIT)
// flutter_boost
*
//
* Copyright (c) 2019 Alibaba Group
// Created by Jidong Chen on 2019/6/11.
*
//
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import "FLB2Factory.h"
#import "FLB2Factory.h"
#import "FLB2FlutterApplication.h"
#import "FLB2FlutterViewContainer.h"
@implementation
FLB2Factory
@implementation
FLB2Factory
-
(
id
<
FLBFlutterApplicationInterface
>
)
createApplication
:(
id
<
FLB2Platform
>
)
platform
{
return
FLB2FlutterApplication
.
new
;
}
-
(
id
<
FLBFlutterContainer
>
)
createFlutterContainer
{
return
FLB2FlutterViewContainer
.
new
;
}
@end
@end
ios/Classes/1.5/FLB2FlutterApplication.h
View file @
b5ef7160
...
@@ -32,27 +32,6 @@
...
@@ -32,27 +32,6 @@
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
FLB2FlutterApplication
:
NSObject
<
FLBFlutterApplicationInterface
>
@interface
FLB2FlutterApplication
:
NSObject
<
FLBFlutterApplicationInterface
>
@property
(
nonatomic
,
strong
)
id
<
FLB2Platform
>
platform
;
-
(
id
<
FLB2FlutterProvider
>
)
flutterProvider
;
#pragma mark - Getters
+
(
FLB2FlutterApplication
*
)
sharedApplication
;
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
;
-
(
FlutterViewController
*
)
flutterViewController
;
#pragma mark - Container Management
-
(
BOOL
)
contains
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
void
)
addUniqueViewController
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
void
)
removeViewController
:(
FLB2FlutterViewContainer
*
)
vc
;
-
(
BOOL
)
isTop
:(
NSString
*
)
pageId
;
#pragma mark - App Control
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
BOOL
)
isRunning
;
@end
@end
NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_END
ios/Classes/1.5/FLB2FlutterApplication.m
View file @
b5ef7160
...
@@ -30,7 +30,6 @@
...
@@ -30,7 +30,6 @@
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
FLBFlutterContainerManager
*
manager
;
@property
(
nonatomic
,
strong
)
id
<
FLB2FlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
id
<
FLB2FlutterProvider
>
viewProvider
;
@property
(
nonatomic
,
strong
)
NSMutableDictionary
*
pageBuilders
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@property
(
nonatomic
,
assign
)
BOOL
isRunning
;
@end
@end
...
@@ -58,7 +57,7 @@
...
@@ -58,7 +57,7 @@
}
}
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
-
(
void
)
startFlutterWithPlatform
:(
id
<
FLB2Platform
>
)
platform
onStart
:(
void
(
^
)(
FlutterEngine
*
_Nonnull
))
callback
onStart
:(
void
(
^
)(
id
<
FlutterBinaryMessenger
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
_Nonnull
))
callback
{
{
static
dispatch_once_t
onceToken
;
static
dispatch_once_t
onceToken
;
dispatch_once
(
&
onceToken
,
^
{
dispatch_once
(
&
onceToken
,
^
{
...
@@ -73,7 +72,6 @@
...
@@ -73,7 +72,6 @@
{
{
if
(
self
=
[
super
init
])
{
if
(
self
=
[
super
init
])
{
_manager
=
[
FLBFlutterContainerManager
new
];
_manager
=
[
FLBFlutterContainerManager
new
];
_pageBuilders
=
[
NSMutableDictionary
new
];
}
}
return
self
;
return
self
;
}
}
...
@@ -89,17 +87,17 @@
...
@@ -89,17 +87,17 @@
}
}
-
(
BOOL
)
contains
:(
FLB2FlutterViewContainer
*
)
vc
-
(
BOOL
)
contains
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
return
[
_manager
contains
:
vc
];
return
[
_manager
contains
:
vc
];
}
}
-
(
void
)
addUniqueViewController
:(
FLB2FlutterViewContainer
*
)
vc
-
(
void
)
addUniqueViewController
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
return
[
_manager
addUnique
:
vc
];
return
[
_manager
addUnique
:
vc
];
}
}
-
(
void
)
removeViewController
:(
FLB2FlutterViewContainer
*
)
vc
-
(
void
)
removeViewController
:(
id
<
FLBFlutterContainer
>
)
vc
{
{
return
[
_manager
remove
:
vc
];
return
[
_manager
remove
:
vc
];
}
}
...
...
ios/Classes/1.5/FLB2FlutterViewContainer.m
View file @
b5ef7160
...
@@ -28,9 +28,9 @@
...
@@ -28,9 +28,9 @@
#import "FLBFlutterContainerManager.h"
#import "FLBFlutterContainerManager.h"
#import "FlutterBoostPlugin_private.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_
VIEW [FLB2FlutterApplication sharedApplication].flutterViewController.view
#define FLUTTER_
APP [FlutterBoostPlugin sharedInstance].application
#define FLUTTER_V
C [FLB2FlutterApplication sharedApplication].flutterViewController
#define FLUTTER_V
IEW FLUTTER_APP.flutterViewController.view
#define FLUTTER_
APP [FLB2FlutterApplication sharedApplication]
#define FLUTTER_
VC FLUTTER_APP.flutterViewController
@interface
FLB2FlutterViewContainer
()
@interface
FLB2FlutterViewContainer
()
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
@property
(
nonatomic
,
copy
,
readwrite
)
NSString
*
name
;
...
@@ -91,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -91,7 +91,7 @@ static NSUInteger kInstanceCounter = 0;
{
{
kInstanceCounter
--
;
kInstanceCounter
--
;
if
([
self
.
class
instanceCounter
]
==
0
){
if
([
self
.
class
instanceCounter
]
==
0
){
// [
[FLBFlutterApplication sharedApplication]
pause];
// [
FLUTTER_APP
pause];
}
}
}
}
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -119,7 +119,7 @@ static NSUInteger kInstanceCounter = 0;
pageName:
_name
params
:
_params
pageName:
_name
params
:
_params
uniqueId:
[
self
uniqueIDString
]];
uniqueId:
[
self
uniqueIDString
]];
[
[
FLB2FlutterApplication
sharedApplication
]
removeViewController
:
self
];
[
FLUTTER_APP
removeViewController
:
self
];
[
self
.
class
instanceCounterDecrease
];
[
self
.
class
instanceCounterDecrease
];
}
}
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -152,7 +152,7 @@ static NSUInteger kInstanceCounter = 0;
-
(
void
)
viewDidLayoutSubviews
-
(
void
)
viewDidLayoutSubviews
{
{
[
super
viewDidLayoutSubviews
];
[
super
viewDidLayoutSubviews
];
[
[
FLB2FlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
}
}
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
-
(
void
)
viewWillAppear
:(
BOOL
)
animated
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
...
@@ -163,7 +163,7 @@ static NSUInteger kInstanceCounter = 0;
[
self
attatchFlutterEngine
];
[
self
attatchFlutterEngine
];
}
}
[
[
FLB2FlutterApplication
sharedApplication
]
resume
];
[
FLUTTER_APP
resume
];
[
self
surfaceUpdated
:
YES
];
[
self
surfaceUpdated
:
YES
];
//For new page we should attach flutter view in view will appear
//For new page we should attach flutter view in view will appear
...
...
ios/Classes/Boost/FLB2FlutterProvider.h
View file @
b5ef7160
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
*/
*/
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FLBFlutterProvider.h"
#import "FLBFlutter
View
Provider.h"
@class
FlutterViewController
;
@class
FlutterViewController
;
@class
FlutterEngine
;
@class
FlutterEngine
;
...
@@ -32,16 +32,12 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -32,16 +32,12 @@ NS_ASSUME_NONNULL_BEGIN
#define RELEASE_1_0 1
#define RELEASE_1_0 1
@protocol
FLB2FlutterProvider
<
FLBFlutterProvider
>
@protocol
FLB2FlutterProvider
<
FLBFlutter
View
Provider
>
@required
@required
-
(
FlutterEngine
*
)
engine
;
-
(
FlutterEngine
*
)
engine
;
-
(
void
)
atacheToViewController
:(
FlutterViewController
*
)
vc
;
-
(
void
)
atacheToViewController
:(
FlutterViewController
*
)
vc
;
-
(
void
)
detach
;
-
(
void
)
detach
;
-
(
void
)
pause
;
-
(
void
)
resume
;
-
(
void
)
inactive
;
-
(
void
)
prepareEngineIfNeeded
;
-
(
void
)
prepareEngineIfNeeded
;
@end
@end
...
...
ios/Classes/Boost/FLB2Platform.h
View file @
b5ef7160
...
@@ -30,8 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -30,8 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLB2Platform
<
FLBPlatform
>
@protocol
FLB2Platform
<
FLBPlatform
>
@optional
@optional
//Whether to enable accessibility support. Default value is Yes.
-
(
BOOL
)
userBoost2
;
-
(
BOOL
)
accessibilityEnable
;
@required
@required
-
(
void
)
openPage
:(
NSString
*
)
name
-
(
void
)
openPage
:(
NSString
*
)
name
...
...
ios/Classes/Boost/FLBFlutterContainer.h
View file @
b5ef7160
//
/*
// FLBFlutterContainer.h
* The MIT License (MIT)
// flutter_boost
*
//
* Copyright (c) 2019 Alibaba Group
// Created by Jidong Chen on 2019/6/11.
*
//
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
...
...
ios/Classes/Boost/FLBPlatform.h
View file @
b5ef7160
...
@@ -28,10 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -28,10 +28,6 @@ NS_ASSUME_NONNULL_BEGIN
@protocol
FLBPlatform
<
NSObject
>
@protocol
FLBPlatform
<
NSObject
>
@optional
//Whether to enable accessibility support. Default value is Yes.
-
(
BOOL
)
accessibilityEnable
;
@required
@required
-
(
void
)
openPage
:(
NSString
*
)
name
-
(
void
)
openPage
:(
NSString
*
)
name
params
:(
NSDictionary
*
)
params
params
:(
NSDictionary
*
)
params
...
...
ios/Classes/Boost/FlutterBoostPlugin.m
View file @
b5ef7160
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#import "FlutterBoostPlugin.h"
#import "FlutterBoostPlugin.h"
#import "FLBResultMediator.h"
#import "FLBResultMediator.h"
#import "FlutterBoostPlugin_private.h"
#import "FlutterBoostPlugin_private.h"
#import "FLBFactory.h"
#import "FLB2Factory.h"
@implementation
FlutterBoostPlugin
@implementation
FlutterBoostPlugin
...
@@ -70,9 +72,18 @@
...
@@ -70,9 +72,18 @@
FlutterTextureRegistry
,
FlutterTextureRegistry
,
FlutterPluginRegistry
>
engine
))
callback
;
FlutterPluginRegistry
>
engine
))
callback
;
{
{
//TODO:
static
dispatch_once_t
onceToken
;
[
self
.
application
startFlutterWithPlatform
:
platform
dispatch_once
(
&
onceToken
,
^
{
onStart:
callback
];
if
([
platform
respondsToSelector
:
@selector
(
userBoost2
)]
&&
platform
.
userBoost2
){
_factory
=
FLB2Factory
.
new
;
}
else
{
_factory
=
FLBFactory
.
new
;
}
_application
=
[
_factory
createApplication
:
platform
];
[
_application
startFlutterWithPlatform
:
platform
onStart
:
callback
];
});
}
}
-
(
BOOL
)
isRunning
-
(
BOOL
)
isRunning
...
...
ios/Classes/Boost/FlutterBoostPlugin_private.h
View file @
b5ef7160
...
@@ -27,12 +27,15 @@
...
@@ -27,12 +27,15 @@
#import "FLBResultMediator.h"
#import "FLBResultMediator.h"
#import "FLBAbstractFactory.h"
#import "FLBAbstractFactory.h"
@interface
FlutterBoostPlugin
()
@interface
FlutterBoostPlugin
(){
id
<
FLBFlutterApplicationInterface
>
_application
;
FLBResultMediator
*
_resultMediator
;
id
<
FLBAbstractFactory
>
_factory
;
}
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
;
-
(
id
<
FLBFlutterApplicationInterface
>
)
application
;
-
(
FLBResultMediator
*
)
resultMediator
;
@property
(
nonatomic
,
strong
)
FLBResultMediator
*
resultMediator
;
-
(
id
<
FLBAbstractFactory
>
)
factory
;
@property
(
nonatomic
,
strong
)
id
<
FLBAbstractFactory
>
factory
;
@property
(
nonatomic
,
copy
)
NSString
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPageId
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
@property
(
nonatomic
,
copy
)
NSString
*
fPagename
;
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_closePage.mm
View file @
b5ef7160
...
@@ -24,9 +24,11 @@
...
@@ -24,9 +24,11 @@
//Generated by AIOCodeGen.
//Generated by AIOCodeGen.
#import "ServiceGateway.h"
#import "ServiceGateway.h"
#import "NavigationService_closePage.h"
#import "NavigationService_closePage.h"
#import "FLB2FlutterApplication.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
@implementation
NavigationService_closePage
@implementation
NavigationService_closePage
...
@@ -37,11 +39,11 @@
...
@@ -37,11 +39,11 @@
animated
:(
NSNumber
*
)
animated
animated
:(
NSNumber
*
)
animated
{
{
//Add your handler code here!
//Add your handler code here!
[
[
FLB2FlutterApplication
sharedApplication
]
.
platform
closePage
:
uniqueId
[
FLUTTER_APP
.
platform
closePage
:
uniqueId
animated:
animated
.
boolValue
animated:
animated
.
boolValue
params:
params
params:
params
completion:
^
(
BOOL
finished
)
{
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
finished
);
if
(
result
)
result
(
finished
);
}];
}];
}
}
...
...
ios/Classes/Messaging/Generated/NavigationService/handlers/NavigationService_openPage.mm
View file @
b5ef7160
...
@@ -24,22 +24,23 @@
...
@@ -24,22 +24,23 @@
//Generated by AIOCodeGen.
//Generated by AIOCodeGen.
#import "ServiceGateway.h"
#import "ServiceGateway.h"
#import "NavigationService_openPage.h"
#import "NavigationService_openPage.h"
#import "FLB2FlutterApplication.h"
#import "FlutterBoost.h"
#import "Service_NavigationService.h"
#import "Service_NavigationService.h"
#import "FlutterBoostPlugin_private.h"
#define FLUTTER_APP [FlutterBoostPlugin sharedInstance].application
@implementation
NavigationService_openPage
@implementation
NavigationService_openPage
-
(
void
)
onCall
:(
void
(
^
)(
BOOL
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
animated
:(
NSNumber
*
)
animated
-
(
void
)
onCall
:(
void
(
^
)(
BOOL
))
result
pageName
:(
NSString
*
)
pageName
params
:(
NSDictionary
*
)
params
animated
:(
NSNumber
*
)
animated
{
{
[
[
FLB2FlutterApplication
sharedApplication
]
.
platform
openPage
:
pageName
[
FLUTTER_APP
.
platform
openPage
:
pageName
params:
params
params:
params
animated:
animated
.
boolValue
animated:
animated
.
boolValue
completion:
^
(
BOOL
finished
)
{
completion:
^
(
BOOL
finished
)
{
if
(
result
)
result
(
YES
);
if
(
result
)
result
(
YES
);
}];
}];
}
}
#pragma mark - Do not edit these method.
#pragma mark - Do not edit these method.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment