# Conflicts: # assets/image/2x/icon_vip.png # assets/image/3x/icon_vip.png # assets/image/icon_vip.png # lib/generated/intl/messages_en.dart # lib/generated/intl/messages_zh_CN.dart # lib/generated/intl/messages_zh_TW.dart # lib/generated/l10n.dart # lib/l10n/intl_en.arb # lib/login/login_page.dart # lib/main.dart # lib/mine/mine_card_page.dart # lib/mine/roll_center_page.dart # pubspec.lock # pubspec.yamlnull_safety
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 169 KiB |
After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,33 @@
|
||||
*.mode1v3 |
||||
*.mode2v3 |
||||
*.moved-aside |
||||
*.pbxuser |
||||
*.perspectivev3 |
||||
**/*sync/ |
||||
.sconsign.dblite |
||||
.tags* |
||||
**/.vagrant/ |
||||
**/DerivedData/ |
||||
Icon? |
||||
**/Pods/ |
||||
**/.symlinks/ |
||||
profile |
||||
xcuserdata |
||||
**/.generated/ |
||||
Flutter/App.framework |
||||
Flutter/Flutter.framework |
||||
Flutter/Flutter.podspec |
||||
Flutter/Generated.xcconfig |
||||
Flutter/ephemeral/ |
||||
Flutter/app.flx |
||||
Flutter/app.zip |
||||
Flutter/flutter_assets/ |
||||
Flutter/flutter_export_environment.sh |
||||
ServiceDefinitions.json |
||||
Runner/GeneratedPluginRegistrant.* |
||||
|
||||
# Exceptions to above rules. |
||||
!default.mode1v3 |
||||
!default.mode2v3 |
||||
!default.pbxuser |
||||
!default.perspectivev3 |
@ -0,0 +1,24 @@
|
||||
//
|
||||
// UniappPlugin.h
|
||||
// Runner
|
||||
//
|
||||
// Created by tangziyang on 2021/7/6.
|
||||
//
|
||||
|
||||
#ifndef UniappPlugin_h |
||||
#define UniappPlugin_h |
||||
|
||||
#import "DCUniMP.h" |
||||
#import <Flutter/Flutter.h> |
||||
//#import "AFNetworking.h"
|
||||
|
||||
#endif /* UniappPlugin_h */ |
||||
|
||||
@interface UniappPlugin:NSObject <DCUniMPSDKEngineDelegate> |
||||
|
||||
-(void)open:(NSString*)appid url:(NSString*)wgtUrl param:(NSDictionary*)dict block:(void (^)(void))block; |
||||
|
||||
-(void)openUniApp:(NSString *)name dict:(NSDictionary *)dict; |
||||
|
||||
//-(void)downloadWgt:(NSString *)url appid:(NSString*)appid block:(void (^)(NSString * tips))block success:(void (^)(void))success;
|
||||
@end |
@ -0,0 +1,78 @@
|
||||
// |
||||
// UniappPlugin.m |
||||
// Runner |
||||
// |
||||
// Created by tangziyang on 2021/7/6. |
||||
// |
||||
|
||||
#import "UniappPlugin.h" |
||||
#import <Foundation/Foundation.h> |
||||
|
||||
@implementation UniappPlugin |
||||
|
||||
-(void)open:(NSString *)appid url:(NSString *)wgtUrl param:(NSDictionary *)dict block:(void (^)(void))block{ |
||||
if (![DCUniMPSDKEngine isExistsApp:appid]) { |
||||
//不存在准备下载 |
||||
// [self downloadWgt:wgtUrl appid:appid block:nil success:^{ |
||||
// [self openUniApp:appid dict:dict]; |
||||
// }]; |
||||
}else{ |
||||
[self openUniApp:appid dict:dict]; |
||||
} |
||||
} |
||||
|
||||
|
||||
-(void)openUniApp:(NSString *)name dict:(NSDictionary *)dict{ |
||||
DCUniMPConfiguration *configuration = [[DCUniMPConfiguration alloc] init]; |
||||
[configuration setShowAnimated:YES]; |
||||
[configuration setHideAnimated:YES]; |
||||
[configuration setOpenMode:DCUniMPOpenModePresent]; |
||||
[configuration setEnableGestureClose:YES]; |
||||
[configuration setArguments:dict]; |
||||
[DCUniMPSDKEngine openUniMP:name configuration:configuration completed:^(DCUniMPInstance * _Nullable uniMPInstance, NSError * _Nullable error) { |
||||
if (uniMPInstance) { |
||||
NSLog(@"打开成功"); |
||||
}else{ |
||||
NSLog(@"打开失败:%@",error); |
||||
} |
||||
}]; |
||||
} |
||||
|
||||
|
||||
//-(void)downloadWgt:(NSString *)url appid:(NSString *)appid block:(void (^)(NSString *))block success:(void (^)(void))success{ |
||||
// NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration defaultSessionConfiguration]; |
||||
// AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:configuration]; |
||||
// NSLog(@"url:%@",url); |
||||
// NSURL *URL = [NSURL URLWithString:url]; |
||||
// NSURLRequest *request = [NSURLRequest requestWithURL:URL]; |
||||
// |
||||
// NSURLSessionDownloadTask *downloadTask = [manager downloadTaskWithRequest:request progress:^(NSProgress * _Nonnull downloadProgress) { |
||||
// // |
||||
// NSLog(@"downloadProgress:%f",downloadProgress.fractionCompleted); |
||||
// //block([NSString stringWithFormat:@"loading...%f",downloadProgress.fractionCompleted]); |
||||
// } destination:^NSURL * _Nonnull(NSURL * _Nonnull targetPath, NSURLResponse * _Nonnull response) { |
||||
// NSURL *documentsDirectoryURL = [[NSFileManager defaultManager] URLForDirectory:NSDocumentDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:NO error:nil]; |
||||
// return [documentsDirectoryURL URLByAppendingPathComponent:[response suggestedFilename]]; |
||||
// } completionHandler:^(NSURLResponse * _Nonnull response, NSURL * _Nullable filePath, NSError * _Nullable error) { |
||||
// NSLog(@"File downloaded to: %@", filePath); |
||||
// if ([DCUniMPSDKEngine releaseAppResourceToRunPathWithAppid:appid resourceFilePath:filePath.path]) { |
||||
// NSLog(@"应用资源文件部署成功"); |
||||
// //直接打开 |
||||
// success(); |
||||
// } |
||||
// }]; |
||||
// [downloadTask resume]; |
||||
//} |
||||
|
||||
|
||||
-(void)uniMPOnClose:(NSString *)appid{ |
||||
NSLog(@"小程序关闭"); |
||||
} |
||||
|
||||
-(void)defaultMenuItemClicked:(NSString *)identifier{ |
||||
NSLog(@"胶囊点击"); |
||||
} |
||||
|
||||
|
||||
@end |
||||
|
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>CFBundleDevelopmentRegion</key> |
||||
<string>en</string> |
||||
<key>CFBundleExecutable</key> |
||||
<string>App</string> |
||||
<key>CFBundleIdentifier</key> |
||||
<string>io.flutter.flutter.app</string> |
||||
<key>CFBundleInfoDictionaryVersion</key> |
||||
<string>6.0</string> |
||||
<key>CFBundleName</key> |
||||
<string>App</string> |
||||
<key>CFBundlePackageType</key> |
||||
<string>FMWK</string> |
||||
<key>CFBundleShortVersionString</key> |
||||
<string>1.0</string> |
||||
<key>CFBundleSignature</key> |
||||
<string>????</string> |
||||
<key>CFBundleVersion</key> |
||||
<string>1.0</string> |
||||
<key>MinimumOSVersion</key> |
||||
<string>8.0</string> |
||||
</dict> |
||||
</plist> |
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" |
||||
#include "Generated.xcconfig" |
@ -0,0 +1,2 @@
|
||||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" |
||||
#include "Generated.xcconfig" |
@ -0,0 +1,39 @@
|
||||
# Uncomment this line to define a global platform for your project |
||||
# platform :ios, '9.0' |
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. |
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' |
||||
|
||||
project 'Runner', { |
||||
'Debug' => :debug, |
||||
'Profile' => :release, |
||||
'Release' => :release, |
||||
} |
||||
|
||||
def flutter_root |
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) |
||||
unless File.exist?(generated_xcode_build_settings_path) |
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" |
||||
end |
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line| |
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/) |
||||
return matches[1].strip if matches |
||||
end |
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" |
||||
end |
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) |
||||
|
||||
flutter_ios_podfile_setup |
||||
|
||||
target 'Runner' do |
||||
# pod 'AFNetworking', '~> 4.0' |
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) |
||||
end |
||||
|
||||
post_install do |installer| |
||||
installer.pods_project.targets.each do |target| |
||||
flutter_additional_ios_build_settings(target) |
||||
end |
||||
end |
@ -0,0 +1,118 @@
|
||||
PODS: |
||||
- AMap3DMap (7.9.0): |
||||
- AMapFoundation (~> 1.6.6) |
||||
- amap_flutter_location (0.0.1): |
||||
- AMapLocation (~> 2.6.7) |
||||
- Flutter |
||||
- amap_flutter_map (0.0.1): |
||||
- AMap3DMap |
||||
- Flutter |
||||
- AMapFoundation (1.6.7) |
||||
- AMapLocation (2.6.8): |
||||
- AMapFoundation (~> 1.6.4) |
||||
- Flutter (1.0.0) |
||||
- fluttertoast (0.0.2): |
||||
- Flutter |
||||
- Toast |
||||
- FMDB (2.7.5): |
||||
- FMDB/standard (= 2.7.5) |
||||
- FMDB/standard (2.7.5) |
||||
- image_cropper (0.0.4): |
||||
- Flutter |
||||
- TOCropViewController (~> 2.6.0) |
||||
- image_picker (0.0.1): |
||||
- Flutter |
||||
- path_provider (0.0.1): |
||||
- Flutter |
||||
- "permission_handler (5.1.0+2)": |
||||
- Flutter |
||||
- shared_preferences (0.0.1): |
||||
- Flutter |
||||
- sqflite (0.0.2): |
||||
- Flutter |
||||
- FMDB (>= 2.7.5) |
||||
- Toast (4.0.0) |
||||
- TOCropViewController (2.6.0) |
||||
- video_player (0.0.1): |
||||
- Flutter |
||||
- wakelock (0.0.1): |
||||
- Flutter |
||||
- webview_flutter (0.0.1): |
||||
- Flutter |
||||
|
||||
DEPENDENCIES: |
||||
- amap_flutter_location (from `.symlinks/plugins/amap_flutter_location/ios`) |
||||
- amap_flutter_map (from `.symlinks/plugins/amap_flutter_map/ios`) |
||||
- Flutter (from `Flutter`) |
||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) |
||||
- image_cropper (from `.symlinks/plugins/image_cropper/ios`) |
||||
- image_picker (from `.symlinks/plugins/image_picker/ios`) |
||||
- path_provider (from `.symlinks/plugins/path_provider/ios`) |
||||
- permission_handler (from `.symlinks/plugins/permission_handler/ios`) |
||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) |
||||
- sqflite (from `.symlinks/plugins/sqflite/ios`) |
||||
- video_player (from `.symlinks/plugins/video_player/ios`) |
||||
- wakelock (from `.symlinks/plugins/wakelock/ios`) |
||||
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`) |
||||
|
||||
SPEC REPOS: |
||||
trunk: |
||||
- AMap3DMap |
||||
- AMapFoundation |
||||
- AMapLocation |
||||
- FMDB |
||||
- Toast |
||||
- TOCropViewController |
||||
|
||||
EXTERNAL SOURCES: |
||||
amap_flutter_location: |
||||
:path: ".symlinks/plugins/amap_flutter_location/ios" |
||||
amap_flutter_map: |
||||
:path: ".symlinks/plugins/amap_flutter_map/ios" |
||||
Flutter: |
||||
:path: Flutter |
||||
fluttertoast: |
||||
:path: ".symlinks/plugins/fluttertoast/ios" |
||||
image_cropper: |
||||
:path: ".symlinks/plugins/image_cropper/ios" |
||||
image_picker: |
||||
:path: ".symlinks/plugins/image_picker/ios" |
||||
path_provider: |
||||
:path: ".symlinks/plugins/path_provider/ios" |
||||
permission_handler: |
||||
:path: ".symlinks/plugins/permission_handler/ios" |
||||
shared_preferences: |
||||
:path: ".symlinks/plugins/shared_preferences/ios" |
||||
sqflite: |
||||
:path: ".symlinks/plugins/sqflite/ios" |
||||
video_player: |
||||
:path: ".symlinks/plugins/video_player/ios" |
||||
wakelock: |
||||
:path: ".symlinks/plugins/wakelock/ios" |
||||
webview_flutter: |
||||
:path: ".symlinks/plugins/webview_flutter/ios" |
||||
|
||||
SPEC CHECKSUMS: |
||||
AMap3DMap: 4ff760f011b89aec85edd8b5fcf90d384aae1202 |
||||
amap_flutter_location: 3e33b57f1aad80b0dfb4b399de857a1a9f071e62 |
||||
amap_flutter_map: 979e54d227cedac6c7504a2151bfbf3bcf96760a |
||||
AMapFoundation: c7da72b42a713f1429c88af1858d623dde88934b |
||||
AMapLocation: dad27669c4ca68e395ce7532ff614b7d4d45f7b7 |
||||
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c |
||||
fluttertoast: 6122fa75143e992b1d3470f61000f591a798cc58 |
||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a |
||||
image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb |
||||
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09 |
||||
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259 |
||||
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0 |
||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d |
||||
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 |
||||
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 |
||||
TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38 |
||||
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e |
||||
wakelock: bfc7955c418d0db797614075aabbc58a39ab5107 |
||||
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96 |
||||
|
||||
PODFILE CHECKSUM: 3dec887221b0cf3fccf2bbd3f50f36c0ad0bcbeb |
||||
|
||||
COCOAPODS: 1.10.1 |
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Workspace |
||||
version = "1.0"> |
||||
<FileRef |
||||
location = "self:"> |
||||
</FileRef> |
||||
</Workspace> |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>IDEDidComputeMac32BitWarning</key> |
||||
<true/> |
||||
</dict> |
||||
</plist> |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>PreviewsEnabled</key> |
||||
<false/> |
||||
</dict> |
||||
</plist> |
@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Scheme |
||||
LastUpgradeVersion = "1020" |
||||
version = "1.3"> |
||||
<BuildAction |
||||
parallelizeBuildables = "YES" |
||||
buildImplicitDependencies = "YES"> |
||||
<BuildActionEntries> |
||||
<BuildActionEntry |
||||
buildForTesting = "YES" |
||||
buildForRunning = "YES" |
||||
buildForProfiling = "YES" |
||||
buildForArchiving = "YES" |
||||
buildForAnalyzing = "YES"> |
||||
<BuildableReference |
||||
BuildableIdentifier = "primary" |
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||
BuildableName = "Runner.app" |
||||
BlueprintName = "Runner" |
||||
ReferencedContainer = "container:Runner.xcodeproj"> |
||||
</BuildableReference> |
||||
</BuildActionEntry> |
||||
</BuildActionEntries> |
||||
</BuildAction> |
||||
<TestAction |
||||
buildConfiguration = "Debug" |
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
||||
shouldUseLaunchSchemeArgsEnv = "YES"> |
||||
<MacroExpansion> |
||||
<BuildableReference |
||||
BuildableIdentifier = "primary" |
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||
BuildableName = "Runner.app" |
||||
BlueprintName = "Runner" |
||||
ReferencedContainer = "container:Runner.xcodeproj"> |
||||
</BuildableReference> |
||||
</MacroExpansion> |
||||
<Testables> |
||||
</Testables> |
||||
</TestAction> |
||||
<LaunchAction |
||||
buildConfiguration = "Release" |
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" |
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" |
||||
launchStyle = "0" |
||||
useCustomWorkingDirectory = "NO" |
||||
ignoresPersistentStateOnLaunch = "NO" |
||||
debugDocumentVersioning = "YES" |
||||
debugServiceExtension = "internal" |
||||
allowLocationSimulation = "YES"> |
||||
<BuildableProductRunnable |
||||
runnableDebuggingMode = "0"> |
||||
<BuildableReference |
||||
BuildableIdentifier = "primary" |
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||
BuildableName = "Runner.app" |
||||
BlueprintName = "Runner" |
||||
ReferencedContainer = "container:Runner.xcodeproj"> |
||||
</BuildableReference> |
||||
</BuildableProductRunnable> |
||||
</LaunchAction> |
||||
<ProfileAction |
||||
buildConfiguration = "Profile" |
||||
shouldUseLaunchSchemeArgsEnv = "YES" |
||||
savedToolIdentifier = "" |
||||
useCustomWorkingDirectory = "NO" |
||||
debugDocumentVersioning = "YES"> |
||||
<BuildableProductRunnable |
||||
runnableDebuggingMode = "0"> |
||||
<BuildableReference |
||||
BuildableIdentifier = "primary" |
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D" |
||||
BuildableName = "Runner.app" |
||||
BlueprintName = "Runner" |
||||
ReferencedContainer = "container:Runner.xcodeproj"> |
||||
</BuildableReference> |
||||
</BuildableProductRunnable> |
||||
</ProfileAction> |
||||
<AnalyzeAction |
||||
buildConfiguration = "Debug"> |
||||
</AnalyzeAction> |
||||
<ArchiveAction |
||||
buildConfiguration = "Release" |
||||
revealArchiveInOrganizer = "YES"> |
||||
</ArchiveAction> |
||||
</Scheme> |
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<Workspace |
||||
version = "1.0"> |
||||
<FileRef |
||||
location = "group:Runner.xcodeproj"> |
||||
</FileRef> |
||||
<FileRef |
||||
location = "group:Pods/Pods.xcodeproj"> |
||||
</FileRef> |
||||
</Workspace> |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>IDEDidComputeMac32BitWarning</key> |
||||
<true/> |
||||
</dict> |
||||
</plist> |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>PreviewsEnabled</key> |
||||
<false/> |
||||
</dict> |
||||
</plist> |
@ -0,0 +1,6 @@
|
||||
#import <Flutter/Flutter.h> |
||||
#import <UIKit/UIKit.h> |
||||
|
||||
@interface AppDelegate : FlutterAppDelegate |
||||
|
||||
@end |
@ -0,0 +1,75 @@
|
||||
#import "AppDelegate.h" |
||||
#import "GeneratedPluginRegistrant.h" |
||||
#import "DCUniMP.h" |
||||
#import "UniappPlugin.h" |
||||
|
||||
@implementation AppDelegate |
||||
|
||||
- (BOOL)application:(UIApplication *)application |
||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
||||
[GeneratedPluginRegistrant registerWithRegistry:self]; |
||||
// Override point for customization after application launch. |
||||
|
||||
|
||||
// 配置参数 |
||||
NSMutableDictionary *options = [NSMutableDictionary dictionaryWithDictionary:launchOptions]; |
||||
// 设置 debug YES 会在控制台输出 js log,默认不输出 log,注:需要引入 liblibLog.a 库 |
||||
[options setObject:[NSNumber numberWithBool:YES] forKey:@"debug"]; |
||||
[DCUniMPSDKEngine initSDKEnvironmentWithLaunchOptions:options ]; |
||||
|
||||
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController; |
||||
FlutterMethodChannel* uniAppChannel = [FlutterMethodChannel methodChannelWithName:@"min" binaryMessenger:controller]; |
||||
UniappPlugin * plugin = [[UniappPlugin alloc] init]; |
||||
[DCUniMPSDKEngine setDelegate:plugin]; |
||||
[uniAppChannel setMethodCallHandler:^(FlutterMethodCall * _Nonnull call, FlutterResult _Nonnull result) { |
||||
NSString * method = call.method; |
||||
if ([method isEqual:@"initialize"] || [method isEqual:@"isInitialize"]) { |
||||
result([NSNumber numberWithBool:YES]); |
||||
} |
||||
//是否已经解压过了 |
||||
if ([method isEqual:@"isExistsApp"]) { |
||||
NSString * appid = [call.arguments valueForKey:@"appid"]; |
||||
[DCUniMPSDKEngine isExistsApp:appid] ? result([NSNumber numberWithBool:YES]): result([NSNumber numberWithBool:NO]); |
||||
} |
||||
if ([method isEqual:@"closeCurrentApp"]) { |
||||
[DCUniMPSDKEngine closeUniMP]; |
||||
} |
||||
if ([method isEqual:@"getAppBasePath"]) { |
||||
result([DCUniMPSDKEngine getActiveUniMPAppid]); |
||||
} |
||||
if ([method isEqual:@"runingAppid"]) { |
||||
result([DCUniMPSDKEngine getActiveUniMPAppid]); |
||||
} |
||||
if ([method isEqual:@"currentPageUrl"]) { |
||||
result([DCUniMPSDKEngine getCurrentPageUrl]); |
||||
} |
||||
if ([method isEqual:@"startMin"]) { |
||||
NSLog(@"call.arguments:%@",call.arguments); |
||||
NSString * appid = [call.arguments valueForKey:@"appid"]; |
||||
NSDictionary* dict = [call.arguments objectForKey:@"json"]; |
||||
[plugin openUniApp:appid dict:dict]; |
||||
result(@""); |
||||
} |
||||
if ([method isEqual:@"getAppVersionInfo"]) { |
||||
NSString * appid = [call.arguments valueForKey:@"appid"]; |
||||
result([[DCUniMPSDKEngine getUniMPVersionInfoWithAppid:appid] valueForKey:@"name"]); |
||||
} |
||||
if ([method isEqual:@"reloadWgt"]) { |
||||
NSString * appid = [call.arguments valueForKey:@"appid"]; |
||||
NSString * wgtPath = [call.arguments valueForKey:@"wgtPath"]; |
||||
BOOL r = [DCUniMPSDKEngine releaseAppResourceToRunPathWithAppid:appid resourceFilePath:wgtPath]; |
||||
r ? result([NSNumber numberWithBool:YES]) : result([NSNumber numberWithBool:NO]); |
||||
} |
||||
//这是原来的下载 |
||||
if ([call.method isEqual:@"openUniApp"]) { |
||||
result(@"这是原来的下载。"); |
||||
} |
||||
//result(FlutterMethodNotImplemented); |
||||
}]; |
||||
|
||||
|
||||
|
||||
return [super application:application didFinishLaunchingWithOptions:launchOptions]; |
||||
} |
||||
|
||||
@end |
@ -0,0 +1,122 @@
|
||||
{ |
||||
"images": [ |
||||
{ |
||||
"size": "20x20", |
||||
"idiom": "iphone", |
||||
"filename": "icon-20@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "20x20", |
||||
"idiom": "iphone", |
||||
"filename": "icon-20@3x.png", |
||||
"scale": "3x" |
||||
}, |
||||
{ |
||||
"size": "29x29", |
||||
"idiom": "iphone", |
||||
"filename": "icon-29.png", |
||||
"scale": "1x" |
||||
}, |
||||
{ |
||||
"size": "29x29", |
||||
"idiom": "iphone", |
||||
"filename": "icon-29@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "29x29", |
||||
"idiom": "iphone", |
||||
"filename": "icon-29@3x.png", |
||||
"scale": "3x" |
||||
}, |
||||
{ |
||||
"size": "40x40", |
||||
"idiom": "iphone", |
||||
"filename": "icon-40@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "40x40", |
||||
"idiom": "iphone", |
||||
"filename": "icon-40@3x.png", |
||||
"scale": "3x" |
||||
}, |
||||
{ |
||||
"size": "60x60", |
||||
"idiom": "iphone", |
||||
"filename": "icon-60@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "60x60", |
||||
"idiom": "iphone", |
||||
"filename": "icon-60@3x.png", |
||||
"scale": "3x" |
||||
}, |
||||
{ |
||||
"size": "20x20", |
||||
"idiom": "ipad", |
||||
"filename": "icon-20-ipad.png", |
||||
"scale": "1x" |
||||
}, |
||||
{ |
||||
"size": "20x20", |
||||
"idiom": "ipad", |
||||
"filename": "icon-20@2x-ipad.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "29x29", |
||||
"idiom": "ipad", |
||||
"filename": "icon-29-ipad.png", |
||||
"scale": "1x" |
||||
}, |
||||
{ |
||||
"size": "29x29", |
||||
"idiom": "ipad", |
||||
"filename": "icon-29@2x-ipad.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "40x40", |
||||
"idiom": "ipad", |
||||
"filename": "icon-40.png", |
||||
"scale": "1x" |
||||
}, |
||||
{ |
||||
"size": "40x40", |
||||
"idiom": "ipad", |
||||
"filename": "icon-40@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "76x76", |
||||
"idiom": "ipad", |
||||
"filename": "icon-76.png", |
||||
"scale": "1x" |
||||
}, |
||||
{ |
||||
"size": "76x76", |
||||
"idiom": "ipad", |
||||
"filename": "icon-76@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "83.5x83.5", |
||||
"idiom": "ipad", |
||||
"filename": "icon-83.5@2x.png", |
||||
"scale": "2x" |
||||
}, |
||||
{ |
||||
"size": "1024x1024", |
||||
"idiom": "ios-marketing", |
||||
"filename": "icon-1024.png", |
||||
"scale": "1x" |
||||
} |
||||
], |
||||
"info": { |
||||
"version": 1, |
||||
"author": "icon.wuruihong.com" |
||||
} |
||||
} |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 962 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,23 @@
|
||||
{ |
||||
"images" : [ |
||||
{ |
||||
"filename" : "引导页备份.png", |
||||
"idiom" : "universal", |
||||
"scale" : "1x" |
||||
}, |
||||
{ |
||||
"filename" : "引导页备份@2x.png", |
||||
"idiom" : "universal", |
||||
"scale" : "2x" |
||||
}, |
||||
{ |
||||
"filename" : "引导页备份@3x.png", |
||||
"idiom" : "universal", |
||||
"scale" : "3x" |
||||
} |
||||
], |
||||
"info" : { |
||||
"author" : "xcode", |
||||
"version" : 1 |
||||
} |
||||
} |
@ -0,0 +1,5 @@
|
||||
# Launch Screen Assets |
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory. |
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 118 KiB |
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> |
||||
<dependencies> |
||||
<deployment identifier="iOS"/> |
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/> |
||||
</dependencies> |
||||
<scenes> |
||||
<!--View Controller--> |
||||
<scene sceneID="EHf-IW-A2E"> |
||||
<objects> |
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController"> |
||||
<layoutGuides> |
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/> |
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/> |
||||
</layoutGuides> |
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<subviews> |
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"> |
||||
</imageView> |
||||
</subviews> |
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> |
||||
<constraints> |
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/> |
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/> |
||||
</constraints> |
||||
</view> |
||||
</viewController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
<point key="canvasLocation" x="53" y="375"/> |
||||
</scene> |
||||
</scenes> |
||||
<resources> |
||||
<image name="LaunchImage" width="168" height="185"/> |
||||
</resources> |
||||
</document> |
@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r"> |
||||
<dependencies> |
||||
<deployment identifier="iOS"/> |
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/> |
||||
</dependencies> |
||||
<scenes> |
||||
<!--Flutter View Controller--> |
||||
<scene sceneID="tne-QT-ifu"> |
||||
<objects> |
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController"> |
||||
<layoutGuides> |
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/> |
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/> |
||||
</layoutGuides> |
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> |
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/> |
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> |
||||
</view> |
||||
</viewController> |
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> |
||||
</objects> |
||||
</scene> |
||||
</scenes> |
||||
</document> |
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
||||
<plist version="1.0"> |
||||
<dict> |
||||
<key>CFBundleDevelopmentRegion</key> |
||||
<string>$(DEVELOPMENT_LANGUAGE)</string> |
||||
<key>CFBundleDisplayName</key> |
||||
<string>回乡</string> |
||||
<key>CFBundleExecutable</key> |
||||
<string>$(EXECUTABLE_NAME)</string> |
||||
<key>CFBundleIdentifier</key> |
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
||||
<key>CFBundleInfoDictionaryVersion</key> |
||||
<string>6.0</string> |
||||
<key>CFBundleLocalizations</key> |
||||
<array> |
||||
<string>en</string> |
||||
<string>zh</string> |
||||
<string>zh_TW</string> |
||||
</array> |
||||
<key>CFBundleName</key> |
||||
<string>flutter_app</string> |
||||
<key>CFBundlePackageType</key> |
||||
<string>APPL</string> |
||||
<key>CFBundleShortVersionString</key> |
||||
<string>$(MARKETING_VERSION)</string> |
||||
<key>CFBundleSignature</key> |
||||
<string>????</string> |
||||
<key>CFBundleVersion</key> |
||||
<string>$(CURRENT_PROJECT_VERSION)</string> |
||||
<key>LSRequiresIPhoneOS</key> |
||||
<true/> |
||||
<key>NSAppleMusicUsageDescription</key> |
||||
<string>是否允许访问媒体</string> |
||||
<key>NSCalendarsUsageDescription</key> |
||||
<string>是否允许访问日历</string> |
||||
<key>NSCameraUsageDescription</key> |
||||
<string>打开相机拍照</string> |
||||
<key>NSContactsUsageDescription</key> |
||||
<string>是否允许访问联系人信息</string> |
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key> |
||||
<string>定位</string> |
||||
<key>NSLocationAlwaysUsageDescription</key> |
||||
<string>是否允许访问位置信息</string> |
||||
<key>NSLocationWhenInUseUsageDescription</key> |
||||
<string>定位</string> |
||||
<key>NSMicrophoneUsageDescription</key> |
||||
<string>拍视频需要录音权限</string> |
||||
<key>NSMotionUsageDescription</key> |
||||
<string>是否允许访问运行</string> |
||||
<key>NSPhotoLibraryUsageDescription</key> |
||||
<string>打开相册</string> |
||||
<key>NSSpeechRecognitionUsageDescription</key> |
||||
<string>是否允许语音识别</string> |
||||
<key>UILaunchStoryboardName</key> |
||||
<string>LaunchScreen</string> |
||||
<key>UIMainStoryboardFile</key> |
||||
<string>Main</string> |
||||
<key>UISupportedInterfaceOrientations</key> |
||||
<array> |
||||
<string>UIInterfaceOrientationPortrait</string> |
||||
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||
<string>UIInterfaceOrientationLandscapeRight</string> |
||||
</array> |
||||
<key>UISupportedInterfaceOrientations~ipad</key> |
||||
<array> |
||||
<string>UIInterfaceOrientationPortrait</string> |
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string> |
||||
<string>UIInterfaceOrientationLandscapeLeft</string> |
||||
<string>UIInterfaceOrientationLandscapeRight</string> |
||||
</array> |
||||
<key>UIViewControllerBasedStatusBarAppearance</key> |
||||
<false/> |
||||
<key>io.flutter.embedded_views_preview</key> |
||||
<string>YES</string> |
||||
</dict> |
||||
</plist> |
@ -1,10 +0,0 @@
|
||||
//
|
||||
// MinPlugin.h
|
||||
// Runner
|
||||
//
|
||||
// Created by 冯美坎 on 2021/6/18.
|
||||
//
|
||||
#import <Flutter/Flutter.h> |
||||
|
||||
@interface MinPlugin : NSObject<FlutterPlugin> |
||||
@end |
@ -1,17 +0,0 @@
|
||||
// |
||||
// MinPlugin.m |
||||
// Runner |
||||
// |
||||
// Created by 冯美坎 on 2021/6/18. |
||||
// |
||||
|
||||
#import "MinPlugin.h" |
||||
#import <Foundation/Foundation.h> |
||||
#import <min-Swift.h> |
||||
|
||||
|
||||
@implementation MinPlugin |
||||
+ (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar { |
||||
[SwiftMinPlugin registerWithRegistrar:registrar]; |
||||
} |
||||
@end |
@ -0,0 +1,9 @@
|
||||
#import <Flutter/Flutter.h> |
||||
#import <UIKit/UIKit.h> |
||||
#import "AppDelegate.h" |
||||
|
||||
int main(int argc, char* argv[]) { |
||||
@autoreleasepool { |
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); |
||||
} |
||||
} |