liblinphone_flutter/ios/Classes/Views/LocalViewFactory.swift
Andrew G 0375fe4d1a feat: implement Linphone SDK integration with video call support
Complete rewrite from stub plugin to (probably) functional liblinphone integration featuring:
- Core SDK bridge with registration, calls, and media controls
- Platform views for remote and local video rendering
- Event channels for registration and call state updates
2026-01-22 16:15:28 +07:00

32 lines
962 B
Swift

import Flutter
import UIKit
class LocalViewFactory: NSObject, FlutterPlatformViewFactory {
private var messenger: FlutterBinaryMessenger
private var cacher: (UIView) -> Void
init(messenger: FlutterBinaryMessenger, cacher: @escaping (UIView) -> Void) {
self.messenger = messenger
self.cacher = cacher
super.init()
}
func create(
withFrame frame: CGRect,
viewIdentifier viewId: Int64,
arguments args: Any?
) -> FlutterPlatformView {
return LocalView(
frame: frame,
viewIdentifier: viewId,
arguments: args,
binaryMessenger: messenger,
cacher: cacher
)
}
/// Implementing this method is only necessary when the `arguments` in `createWithFrame` is not `nil`.
public func createArgsCodec() -> FlutterMessageCodec & NSObjectProtocol {
return FlutterStandardMessageCodec.sharedInstance()
}
}