alipay / alipay/mPaaS

iOS打开本地预置离线包,一直打开失败。

Đang mở
#21 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
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信息:
屏幕快照 2019-09-10 上午11 29 52

3、打开预置离线包代码:

```
// MARK: 预置离线包i
@objc func openPresetPackage(_ sender: UIButton) {
MPNebulaAdapterInterface.shareInstance().startH5ViewController(withNebulaApp: ["appId": "20190901"])
}
```

4、报错页面
![IMG_0151](https://user-images.githubusercontent.com/13348128/64581960-a3fca000-d3be-11e9-9399-fe0da34d7160.PNG)

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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.