如题,我们的uni-app工程,之前是发布了h5和微信小程序版本,现在想搞一个iOS APP,根据文档,我们用HBuilderX 3.8.4版本通过【生成本地打包APP资源】得到了资源包,然后下载了3.8.4的iOS 离线SDK,把资源包按要求放到了离线SDK的HBuilder-Hello模板工程里,配置了appId、appkey、bundleId这些配置,可以运行成功,界面上已经无弹窗等报错,但只展示出了tabbar,界面是白屏的,控制台如下图,有一些weex的报错:
请问下各位大佬,我们的都是vue文件,没有nvue文件,根据 章节的相关文档,我理解我们的资源包应该被用WebView渲染,"renderer"配置的值是"auto",也不是weex,为什么会有weex的报错呢?请问下可以从哪些方面排查?
我们的manifest.json文件配置如下:
{
"@platforms": [
"android",
"iPhone",
"iPad"
],
"id": "__UNI__AE8FCCC",
"name": "demo",
"version": {
"name": "1.0.0",
"code": "100"
},
"description": "",
"developer": {
"name": "",
"email": "",
"url": ""
},
"permissions": {
"UniNView": {
"description": "UniNView原生渲染"
}
},
"plus": {
"useragent": {
"value": "uni-app",
"concatenate": true
},
"splashscreen": {
"target": "id:1",
"autoclose": true,
"waiting": true,
"delay": 0
},
"popGesture": "close",
"launchwebview": {
"id": "1",
"kernel": "WKWebview"
},
"usingComponents": true,
"nvueCompiler": "uni-app",
"useWebview": true,
"nvueStyleCompiler": "uni-app",
"distribute": {
"google": {
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"apple": {
"idfa": false
},
"plugins": {
"audio": {
"mp3": {
"description": "Android平台录音支持MP3格式文件"
}
}
}
},
"statusbar": {
"immersed": "supportedDevice",
"style": "dark",
"background": "#FFFFFF"
},
"arguments": "{\"name\":\"index\",\"path\":\"pages/orderList/index\",\"query\":\"interval=4000&autoplay=false\"}",
"allowsInlineMediaPlayback": true,
"safearea": {
"background": "#FFFFFF",
"bottom": {
"offset": "auto"
}
},
"uni-app": {
"control": "uni-v3",
"vueVersion": "3",
"compilerVersion": "3.8.4",
"nvueCompiler": "uni-app",
"renderer": "auto",
"nvue": {
"flex-direction": "column"
},
"nvueLaunchMode": "normal",
"webView": {
"minUserAgentVersion": "49.0"
}
},
"tabBar": {
"position": "bottom",
"color": "#141416",
"selectedColor": "#007aff",
"borderStyle": "rgba(0,0,0,0.4)",
"blurEffect": "none",
"fontSize": "10px",
"iconWidth": "24px",
"spacing": "3px",
"height": "50px",
"navigationBarBackgroundColor": "#FFFFFF",
"list": [
{
"pagePath": "pages/orderList/index",
"iconPath": "/static/icons/pick_tabbar_icon.png",
"selectedIconPath": "/static/icons/pick_tabbar_icon_select.png",
"text": "接车单"
},
{
"pagePath": "pages/additionList/index",
"iconPath": "/static/icons/addlist_tabbar_icon.png",
"selectedIconPath": "/static/icons/addlist_tabbar_icon_select.png",
"text": "增项单"
},
{
"pagePath": "pages/me/index",
"iconPath": "/static/icons/me_icon.png",
"selectedIconPath": "/static/icons/me_icon_select.png",
"text": "我的"
}
],
"selectedIndex": 0,
"shown": true,
"child": [
"lauchwebview"
],
"selected": 0
}
},
"launch_path": "__uniappview.html"
}
2 个回复
DCloud_App_Array
SDK中包含了weex的代码,这些日志并不是表示vue页面是通过weex渲染,而是页面的驱动引擎(js)和weex都是在他同一个v8中运行的。
建议先在iOS端真机运行看是否可正常运行,注意看是否存在js错误导致页面没有正常渲染。
4***@qq.com (作者)
自己回答一下,是Pinia相关,注释掉Pinia的调用是可以的
我们有个页面入口index.vue,index.vue会引用utils,index.vue和utils都会依赖Pinia的defineStore
目前我们在utils里调用了Pinia的defineStore,就会触发白屏,在index.vue里调用是可以的
请教了一个uni-app的开发老哥,他判断:看起来是一个 bug,需要再看看了,但是目前没有很多的时间排查,只能先排期了
我们打算自己搞个简单的壳,用webView直接跑h5链接了