提交 c3dd00a7 authored 作者: JarvanMo's avatar JarvanMo

add some ios code

上级 d41e0298
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
CDDC1203211AD82D0091FA91 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1202211AD82D0091FA91 /* libz.tbd */; }; CDDC1203211AD82D0091FA91 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1202211AD82D0091FA91 /* libz.tbd */; };
CDDC1205211AD83D0091FA91 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1204211AD83D0091FA91 /* libsqlite3.tbd */; }; CDDC1205211AD83D0091FA91 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1204211AD83D0091FA91 /* libsqlite3.tbd */; };
CDDC1207211AD8540091FA91 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1206211AD8540091FA91 /* libc++.tbd */; }; CDDC1207211AD8540091FA91 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC1206211AD8540091FA91 /* libc++.tbd */; };
CDDC120B211ADE9D0091FA91 /* WechatPluginMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDC120A211ADE9D0091FA91 /* WechatPluginMethods.swift */; };
CDDC120D211AE6B90091FA91 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC120C211AE6B90091FA91 /* CoreTelephony.framework */; }; CDDC120D211AE6B90091FA91 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDDC120C211AE6B90091FA91 /* CoreTelephony.framework */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -68,7 +67,6 @@ ...@@ -68,7 +67,6 @@
CDDC1202211AD82D0091FA91 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; CDDC1202211AD82D0091FA91 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
CDDC1204211AD83D0091FA91 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; CDDC1204211AD83D0091FA91 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
CDDC1206211AD8540091FA91 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; CDDC1206211AD8540091FA91 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
CDDC120A211ADE9D0091FA91 /* WechatPluginMethods.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WechatPluginMethods.swift; sourceTree = "<group>"; };
CDDC120C211AE6B90091FA91 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; CDDC120C211AE6B90091FA91 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -148,7 +146,6 @@ ...@@ -148,7 +146,6 @@
97C146F01CF9000F007C117D /* Runner */ = { 97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
CDDC1209211ADE320091FA91 /* Wechat Plugin */,
CD425B48211AD23300BF14A6 /* libWeChatSDK.a */, CD425B48211AD23300BF14A6 /* libWeChatSDK.a */,
CD425B49211AD23300BF14A6 /* WXApi.h */, CD425B49211AD23300BF14A6 /* WXApi.h */,
CD425B47211AD23300BF14A6 /* WXApiObject.h */, CD425B47211AD23300BF14A6 /* WXApiObject.h */,
...@@ -172,14 +169,6 @@ ...@@ -172,14 +169,6 @@
name = "Supporting Files"; name = "Supporting Files";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
CDDC1209211ADE320091FA91 /* Wechat Plugin */ = {
isa = PBXGroup;
children = (
CDDC120A211ADE9D0091FA91 /* WechatPluginMethods.swift */,
);
name = "Wechat Plugin";
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
...@@ -216,6 +205,7 @@ ...@@ -216,6 +205,7 @@
TargetAttributes = { TargetAttributes = {
97C146ED1CF9000F007C117D = { 97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1; CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = 8JJXUFV6F7;
LastSwiftMigration = 0910; LastSwiftMigration = 0910;
}; };
}; };
...@@ -329,7 +319,6 @@ ...@@ -329,7 +319,6 @@
files = ( files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
CDDC120B211ADE9D0091FA91 /* WechatPluginMethods.swift in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -469,6 +458,7 @@ ...@@ -469,6 +458,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8JJXUFV6F7;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -497,6 +487,7 @@ ...@@ -497,6 +487,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8JJXUFV6F7;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
......
...@@ -10,7 +10,7 @@ import Flutter ...@@ -10,7 +10,7 @@ import Flutter
GeneratedPluginRegistrant.register(with: self) GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions) return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }
} }
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import Foundation import Foundation
struct WechatPluginMethods { struct WechatPluginMethods {
public static let SHARE_TEXT = "share_text"; public static let SHARE_TEXT = "share_text";
public static let SHARE_IMAGE = "share_image"; public static let SHARE_IMAGE = "share_image";
......
import Flutter import Flutter
import UIKit import UIKit
public class SwiftWechatPlugin: NSObject, FlutterPlugin { public class SwiftWechatPlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) { public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(name: "wechat_plugin", binaryMessenger: registrar.messenger()) let channel = FlutterMethodChannel(name: "wechat_plugin", binaryMessenger: registrar.messenger())
...@@ -9,6 +10,14 @@ public class SwiftWechatPlugin: NSObject, FlutterPlugin { ...@@ -9,6 +10,14 @@ public class SwiftWechatPlugin: NSObject, FlutterPlugin {
} }
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
result("iOS " + UIDevice.current.systemVersion)
switch call.method {
case WeChatPluginMethods.SHARE_TEXT:
print("hh")
break;
default:
print("hh")
}
} }
} }
public class WeChatHandler {
}
\ No newline at end of file
import Flutter
public class WeChatHandler {
static let instance:WeChatHandler = WeChatHandler()
public func shareText(call:FlutterMethodCall){
}
}
//
// H.swift
// Pods-Runner
//
// Created by mo on 2018/8/10.
//
import Foundation
//
// WeChatPluginMethods.swift
// Pods-Runner
//
// Created by mo on 2018/8/10.
//
import Foundation
public class WeChatPluginMethods {
public static let SHARE_TEXT = "shareText";
public static let SHARE_IMAGE = "shareImage";
public static let SHARE_MUSIC = "shareMusic";
public static let SHARE_VIDEO = "shareVideo";
public static let SHARE_WEBSITE = "shareWebsite";
}
//
// WechatPluginMethods.swift
// Pods-Runner
//
// Created by mo on 2018/8/10.
//
import Foundation
public struct WeChatPluginMethods {
public static let SHARE_TEXT = "shareText";
public static let SHARE_IMAGE = "shareImage";
public static let SHARE_MUSIC = "shareMusic";
public static let SHARE_VIDEO = "shareVideo";
public static let SHARE_WEBSITE = "shareWebsite";
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论