iOS打开本地预置离线包,一直打开失败。
- Ngôn ngữ chính
- C
- Star
- 340
- Fork
- 58
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
参考官网代码链接:https://tech.antfin.com/docs/2/133648
1、初始化容器代码:
```
// 自定义jsapi路径和预置离线包信息
let presetApplistPath = Bundle.main.path(forResource: "BCSCustomPresetApps.bundle/h5_json.json", ofType: nil)
let appPackagePath = Bundle.main.path(forResource: "BCSCustomPresetApps.bundle", ofType: nil)
let pluginsJsapisPath = Bundle.main.path(forResource: "BCSCustomPlugins.bundle/Poseidon-UserDefine-Extra-Config.plist", ofType: nil)
MPNebulaAdapterInterface.initNebula(withCustomPresetApplistPath: presetApplistPath!, customPresetAppPackagePath: appPackagePath!, customPluginsJsapisPath: pluginsJsapisPath!)
// 定制容器
MPNebulaAdapterInterface.shareInstance().nebulaVeiwControllerClass = H5WebViewController.self
MPNebulaAdapterInterface.shareInstance().nebulaUserAgent = "mPaaS/Portal"
MPNebulaAdapterInterface.shareInstance().nebulaNeedVerify = false
// 更新离线包
MPNebulaAdapterInterface.shareInstance().requestAllNebulaApps { (data, error) in
// debugPrint("[mpaas] nebula rpc data : \(data)")
debugPrint(data)
}
```
2、预置离线包配置Bundle信息:

3、打开预置离线包代码:
```
// MARK: 预置离线包i
@objc func openPresetPackage(_ sender: UIButton) {
MPNebulaAdapterInterface.shareInstance().startH5ViewController(withNebulaApp: ["appId": "20190901"])
}
```
4、报错页面

Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.