Alm*_*bek 8 frameworks static-libraries ios flutter dynamic-frameworks
We have built an awesome Flutter project, which has great functionality we want to export as a framework, just like native libraries do, so that the source code is hidden (convert to dynamic framework).
We have followed the instructions: https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps
which allows us to include Flutter project in a Host iOS app, initializing FlutterEngine and use of FlutterViewController.
The question is, how do we create a dynamic framework, let's say SomeProductSDK.framework, which will expose a public methods to create our SomeProductSDK related modal screens?
// In any app
import SomeProductSDK
let controller = TransactionViewController() // SomeProductSDK.framework with partial implementation with flutter
self.present(controller, animated: true)
Run Code Online (Sandbox Code Playgroud)
我已经部分实现了你想要的。所有这些都是非常实验性的,对于生产就绪的 SDK 来说总体上是个坏主意。但是……有可能。
+ (void)launchFrom:(UIViewController *)parent,这应该创建一个 FlutterViewController 并呈现它。xcodebuild archive禁用签名。源代码:https : //github.com/szotp/runner_lib
| 归档时间: |
|
| 查看次数: |
292 次 |
| 最近记录: |