<template> <view> <web-view src="/hybrid/html/local.html"></web-view> </view> </template> 
- 发布:2022-11-06 13:13
 - 更新:2022-11-13 21:49
 - 阅读:717
 
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: mac os 12.5
HBuilderX类型: 正式
HBuilderX版本号: 3.6.4
手机系统: iOS
手机系统版本号: iOS 15
手机厂商: 苹果
手机机型: ipad 和 macbook笔记本
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
                                    
                                    
                                         
                                
                                                                                                操作步骤:
                                    
                                        云端打包,ios正式包,无法显示webview内容
                                     
                                
                                                                                                云端打包,ios正式包,无法显示webview内容
预期结果:
                                    
                                    
                                        期望webview加载本地html
                                     
                                
                                                                                                期望webview加载本地html
实际结果:
                                    
                                    
                                        基座正常,正式包ios,webview内容空白
                                     
                                
                                                            基座正常,正式包ios,webview内容空白
bug描述:
场景:
使用uniapp开发ios应用程序,使用webview组件,打包基座运行&真机调试(ipad和macbook),一切顺利,没有任何问题。  
问题:
正式云端打包ipa,并提交到apple的testflight,使用真机(ipad和macbook)测试,webview组件空白(无法访问webview本地网页)  
前后排出了各种因素,创建一个demo,放一个本地的webview,正式包均空白;
不知是否是Uni的bug
感谢阅读!
FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866
可能路径问题
应用配置,设置资源为释放模式
is子非鱼 (作者)
  
ITMS-90737: Missing Document Configuration - By declaring the CFBundleDocumentTypes key in your app, you've indicated that your app is able to open documents. Please set the UISupportsDocumentBrowser key to 'YES' if your app uses a UIDocumentBrowserViewController. Otherwise, set the LSSupportsOpeningDocumentsInPlace key in the Info.plist to 'YES' (recommended) or 'NO' to specify whether the app can open files in place. All document-based apps must include one of these configurations. For more information, visit https://developer.apple.com/document-based-apps/.
这个配置是uniapp不支持吗?还是我配置的不对?
 "ios" : {  
                "urltypes" : "***",  
                "UIBackgroundModes" : "audio",  
                "LSSupportsOpeningDocumentsInPlace" : true,  
                "idfa" : false,  
                "dSYMs" : false,  
                "capabilities" : {  
                    "plists" : {  
                        "CFBundleDocumentTypes" : [  
                            {  
                                "CFBundleTypeName" : "com.app.****",  
                                "LSHandlerRank" : "Alternate",  
                                "LSItemContentTypes" : [ "public.item" ]  
                            }  
                        ]  
                    }  
                },  
                "plists" : {  
                    "CFBundleDocumentTypes" : [  
                        {  
                            "CFBundleTypeName" : "com.app.****",  
                            "LSHandlerRank" : "Alternate",  
                            "LSItemContentTypes" : [ "public.item" ]  
                        }  
                    ]  
                }  
            },                                        
            
            
            
            
is子非鱼 (作者)
配置【释放模式】;本地基座可以,正是打包后,仍然不行
2022-11-07 11:30
FullStack
回复 is子非鱼: "runmode": "liberate", //可选,字符串类型,应用资源运行模式,可取值normal、liberate
2022-11-07 12:23
is子非鱼 (作者)
回复 FullStack: yeah~感谢,但是我有进行配置liberate,可惜仍然正式包一片空白(webview放本地html或者在线地址均空白);令人奇怪的是,基座没有任何问题。我怀疑是不是UIwebview的原因
2022-11-07 12:32