|
- //
- // Dsbridge.swift
- // im-client-ios
- //
- // Created by 北京居家科技有限公司 on 2022/1/5.
- //
-
- import Foundation
- typealias JSCallback = (String, Bool)->Void
-
- class Dsbridge: NSObject {
-
- //MUST use "_" to ignore the first argument name explicitly。
- @objc func testSyn( _ arg:String) -> String {
- return String(format:"%@[Swift sync call:%@]", arg, "test")
- }
-
- @objc func testAsyn( _ arg:String, handler: JSCallback) {
- handler(String(format:"%@[Swift async call:%@]", arg, "test"), true)
- }
- @objc func takePhoto( _ arg:String) -> String {
- return String(format:"%@[Swift sync call:%@]", arg, "test")
- }
-
- }
|