Written on
·
298
0
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let controller = self.window?.rootViewController as! FlutterViewController
let channel = FlutterMethodChannel.init(name : "example.com/testflutter", binaryMessenger : controller.binaryMessenger)
channel.setMethodCallHendler {(call, result) in
if(call.method == "getValue"){
result("성공")
} else {
result (FlutterMethodNotImplemented)
}
}
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Answer 1
0
영상은 오래되서 문서보고 그대로 하면 되는데
이 참에 해당 영상을 다시 찍어서 올렸습니다.
기존 영상 대신 새로 올라간 네이티브코드 연동 A/S 영상 보시면 됩니다.
문서대로 진행하니 문제 없이 잘 되는 것 확인했습니다.
문서에 대한 내용은 이전 영상인 네이티브코드 연동 첫 번째 영상에서 언급하고 있으니 참고하시면 됩니다.