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,就可以自动根据屏幕的横竖状态,自动切换了;

相关推荐
蒿豪郝灬号25 分钟前
UniApp接入鸿蒙版阿里百川
华为·uni-app·harmonyos
风雨_32 分钟前
Mac M3 使用 OrbStack 全新安装运行 EasyConnect 完整教程
ios
Coder_张三20 小时前
iOS 26 适配
前端·ios·swift
用户380341658829721 小时前
崩溃率从 0.3% 到 0.04%:我们做对的不是修 bug,是让每个崩溃只发生一次
ios·swift
2501_915921431 天前
详细教程:使用Perfdog工具测量iOS应用的功耗性能与优化方法
android·macos·ios·小程序·uni-app·cocoa·iphone
风雨_1 天前
RTK (Rust Token Killer) 安装、使用与卸载指南
ios
梦曦i1 天前
uni-app、uni-app x 与 Flutter 深度对比:2026年跨平台开发框架选型指南
flutter·uni-app·uni-app x
茶底世界之下1 天前
夜景暗部要提亮多少?用 Awaking 给雪夜街道留一点层次
ios
黑科技iOS上架1 天前
cocos游戏ios上架前加固流程(小蟹iOS混淆)
ios·审核·ios混淆·执行程序差异化