update flutter 安卓和ios工程
parent
e8da56b290
commit
d47cbbe44c
|
@ -1,11 +1,11 @@
|
||||||
PODS:
|
PODS:
|
||||||
- FinApplet (2.40.1)
|
- FinApplet (2.40.3)
|
||||||
- FinAppletExt (2.40.1):
|
- FinAppletExt (2.40.3):
|
||||||
- FinApplet (= 2.40.1)
|
- FinApplet (= 2.40.3)
|
||||||
- Flutter (1.0.0)
|
- Flutter (1.0.0)
|
||||||
- mop (0.1.1):
|
- mop (0.1.1):
|
||||||
- FinApplet (= 2.40.1)
|
- FinApplet (= 2.40.3)
|
||||||
- FinAppletExt (= 2.40.1)
|
- FinAppletExt (= 2.40.3)
|
||||||
- Flutter
|
- Flutter
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
@ -24,10 +24,10 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/mop/ios"
|
:path: ".symlinks/plugins/mop/ios"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
FinApplet: 053df5db21b766a8705a6fb809731ec19f75578e
|
FinApplet: a76ded99df163388bb4de129df20c0ff44abe37c
|
||||||
FinAppletExt: 45c9fece1524d9eafa25e6bcd0fe492060492e3a
|
FinAppletExt: 5c53d5c3554ce1be014871214a5c7a06f0bf9177
|
||||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||||
mop: 8dffe3317decd528a199f7a8695d74174fded976
|
mop: 4881eb2c1d365d9cf148b5dc7f8eca2b7018121d
|
||||||
|
|
||||||
PODFILE CHECKSUM: 2317ba7584871ae8cd67fd0244fbd5e96fd06167
|
PODFILE CHECKSUM: 2317ba7584871ae8cd67fd0244fbd5e96fd06167
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||||
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */; };
|
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */; };
|
||||||
|
A8C6E1F629E3E71400E3B446 /* FlutterMethodChannelHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = A8C6E1F529E3E71400E3B446 /* FlutterMethodChannelHandler.m */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
|
@ -49,6 +50,8 @@
|
||||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; };
|
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoadingView.h; sourceTree = "<group>"; };
|
||||||
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; };
|
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoadingView.m; sourceTree = "<group>"; };
|
||||||
|
A8C6E1F429E3E71400E3B446 /* FlutterMethodChannelHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FlutterMethodChannelHandler.h; sourceTree = "<group>"; };
|
||||||
|
A8C6E1F529E3E71400E3B446 /* FlutterMethodChannelHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FlutterMethodChannelHandler.m; sourceTree = "<group>"; };
|
||||||
B691CF78BE1464D3451E07AF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
B691CF78BE1464D3451E07AF /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
|
@ -125,6 +128,8 @@
|
||||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||||
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */,
|
A8C6E1F129E2FFEC00E3B446 /* LoadingView.h */,
|
||||||
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */,
|
A8C6E1F229E2FFEC00E3B446 /* LoadingView.m */,
|
||||||
|
A8C6E1F429E3E71400E3B446 /* FlutterMethodChannelHandler.h */,
|
||||||
|
A8C6E1F529E3E71400E3B446 /* FlutterMethodChannelHandler.m */,
|
||||||
);
|
);
|
||||||
path = Runner;
|
path = Runner;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -278,6 +283,7 @@
|
||||||
files = (
|
files = (
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */,
|
A8C6E1F329E2FFEC00E3B446 /* LoadingView.m in Sources */,
|
||||||
|
A8C6E1F629E3E71400E3B446 /* FlutterMethodChannelHandler.m in Sources */,
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
|
|
@ -3,10 +3,16 @@ import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@UIApplicationMain
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
|
|
||||||
|
var channelHander : FlutterMethodChannelHandler?
|
||||||
|
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
|
|
||||||
|
let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
|
||||||
|
channelHander = FlutterMethodChannelHandler(messenger: controller)
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
//
|
||||||
|
// FlutterMethodChannelHandler.h
|
||||||
|
// Runner
|
||||||
|
//
|
||||||
|
// Created by Haley on 2023/4/10.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Flutter/Flutter.h>
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
@interface FlutterMethodChannelHandler : NSObject
|
||||||
|
|
||||||
|
- (instancetype)initWithMessenger:(NSObject *)messenger;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
//
|
||||||
|
// FlutterMethodChannelHandler.m
|
||||||
|
// Runner
|
||||||
|
//
|
||||||
|
// Created by Haley on 2023/4/10.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "FlutterMethodChannelHandler.h"
|
||||||
|
|
||||||
|
#import <FinApplet/UIApplication+FATPublic.h>
|
||||||
|
|
||||||
|
@interface FlutterMethodChannelHandler ()
|
||||||
|
|
||||||
|
@property (nonatomic,strong) FlutterMethodChannel *channel;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation FlutterMethodChannelHandler
|
||||||
|
|
||||||
|
- (instancetype)initWithMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
if (self) {
|
||||||
|
[self setupChannelWithMessenger:messenger];
|
||||||
|
}
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setupChannelWithMessenger:(NSObject<FlutterBinaryMessenger>*)messenger
|
||||||
|
{
|
||||||
|
_channel = [FlutterMethodChannel methodChannelWithName:@"com.message.flutter_to_app" binaryMessenger:messenger];
|
||||||
|
|
||||||
|
[_channel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) {
|
||||||
|
NSLog(@"收到Flutter消息:%@", call.method);
|
||||||
|
if ([call.method isEqualToString:@"showCustomMoreView"]) {
|
||||||
|
NSString *appId = call.arguments[@"appId"];
|
||||||
|
// 弹出自定义的更多视图
|
||||||
|
UIViewController *viewController = [[UIApplication sharedApplication] fat_topViewController];
|
||||||
|
|
||||||
|
UIAlertController *alertViewController = [UIAlertController alertControllerWithTitle:@"更多视图" message:appId preferredStyle:UIAlertControllerStyleActionSheet];
|
||||||
|
[alertViewController addAction:[UIAlertAction actionWithTitle:@"转发" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
|
||||||
|
}]];
|
||||||
|
[alertViewController addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
|
||||||
|
|
||||||
|
}]];
|
||||||
|
[viewController presentViewController:alertViewController animated:YES completion:nil];
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
|
@ -11,9 +11,9 @@
|
||||||
|
|
||||||
- (instancetype)initWithFrame:(CGRect)frame {
|
- (instancetype)initWithFrame:(CGRect)frame {
|
||||||
if ([super initWithFrame:frame]) {
|
if ([super initWithFrame:frame]) {
|
||||||
self.loadingView.padding = 20;
|
self.loadingView.padding = 5;
|
||||||
self.loadingView.dotView.backgroundColor = [UIColor blackColor];
|
self.loadingView.dotView.backgroundColor = [UIColor redColor];
|
||||||
self.loadingView.animation.duration = 5;
|
self.loadingView.animation.duration = 2;
|
||||||
self.titleLabel.textColor = [UIColor redColor];
|
self.titleLabel.textColor = [UIColor redColor];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
|
@ -22,7 +22,6 @@
|
||||||
{
|
{
|
||||||
[super layoutSubviews];
|
[super layoutSubviews];
|
||||||
|
|
||||||
// 如果要改logo,必须在这里修改。
|
|
||||||
// 修改小程序logo应该是从管理后台上传新的小程序图标,因为更多面板、关于页面也会展示小程序logo,只改这里只是loding页面生效
|
// 修改小程序logo应该是从管理后台上传新的小程序图标,因为更多面板、关于页面也会展示小程序logo,只改这里只是loding页面生效
|
||||||
self.bottomImageView.hidden = YES;
|
self.bottomImageView.hidden = YES;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
#import "GeneratedPluginRegistrant.h"
|
#import "GeneratedPluginRegistrant.h"
|
||||||
|
#import "FlutterMethodChannelHandler.h"
|
||||||
|
|
Loading…
Reference in New Issue