uniapp移动端横竖屏打包后在IOS上无效

hi!今天给各位记录一下在unapp中,当有界面需要横屏显示的时候,在默认开发模式下,是正常的,但打包API后,就不能横屏或者竖屏了。

很简单的两步配置:

一:打开manifest.json~源码视图,在app-plus下进行配置:

bash 复制代码
		"screenOrientation" : [
		   "portrait-primary",
		   "portrait-secondary",
		   "landscape-primary",
		   "landscape-secondary"
		],

附图:

第二步:,配置distribute(应用发布信息),distribute也是在app-plus下:

bash 复制代码
 /* 横竖屏设置 */
				"screenOrientation" : [ "portrait-primary", "landscape-primary" ],
				"distribute" : {
					"screenOrientation" : [ "portrait-primary", "landscape-primary" ]
				},

附图:

好了,再次运行项目,打包个新的API,就可以自动根据屏幕的横竖状态,自动切换了;

相关推荐
编程范式1 天前
SwiftUI 中图片如何适配可用空间
ios
spmcor2 天前
身份证读卡“无感登录”方案实践:从手动点击到自动检测
uni-app
PedroQue992 天前
uni-router v1.8.0新增冷启动守卫补执行
前端·uni-app
songgeb3 天前
启发式 UI 自动化:从线性剧本到每步读屏决策
ios·测试
PedroQue993 天前
uni-router v1.7.0重磅更新:守卫重定向自由掌控
前端·uni-app
一份执念5 天前
uni-app项目 (vue+vite + uni-UI)中引入umd格式JS文件,微信小程序中导入报错处理方案
前端·uni-app·echarts
PedroQue995 天前
V1.6.1性能优化:高频路径提速与代码精简
前端·uni-app
壹方秘境7 天前
我用Go语言开发了一个跨平台的HTTPS抓包和调试工具
前端·后端·ios
夏碧笔7 天前
uni-app跨端地图实战:用第三方LBS替代微信平台收费服务
uni-app
用户69903048487512 天前
try catch使用场景 处理同步代码错误兼容用的
javascript·uni-app