5***@qq.com
5***@qq.com
  • 发布:2024-06-17 09:42
  • 更新:2024-06-17 09:42
  • 阅读:31

【报Bug】ios17 ipad点击back按钮崩溃

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: window11

HBuilderX类型: 正式

HBuilderX版本号: 3.95

手机系统: iOS

手机系统版本号: iOS 17

手机厂商: 苹果

手机机型: iPad Air(5th generation)

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

onBackPress ({
from
}) {
console.log('init', this.isInit)
if (!this.isInit) {
return false
}
// #ifdef APP-PLUS
const currentWebview = this.$mp.page.$getAppWebview() // 获取当前页面的webview对象
const a = currentWebview.children()[0]
console.log(currentWebview.children())
const x = a.back()
console.log('x: ', x)
console.log(this.isHome, this.canBack)
if (!this.isHome) {
return true
}
// 退出换成弹框提示
// else if (!this.canBack) {
// // uni.showToast({
// // title: '再按一次退出应用程序',
// // icon: 'none'
// // })
// this.canBack = true
// this.timer = setTimeout(() => {
// this.canBack = false
// }, 2000)
// return true
// }
else {
uni.showModal({
// 提醒用户更新
title: '提示',
content: '是否退出应用程序?',
success: (res) => {
if (res.confirm) {
if (plus.os.name.toLowerCase() === 'android') {
plus.runtime.quit()
} else {
// const threadClass = plus.ios.importClass('NSThread')
// const mainThread = plus.ios.invoke(threadClass, 'mainThread')
// plus.ios.invoke(mainThread, 'exit')
// 上面的不行就用下面的
// plus.ios
// .import('UIApplication')
// .sharedApplication()
// .performSelector('exit')
const exitIosAPP = uni.requireNativePlugin('CGF-ExitIosApp');
exitIosAPP.exitIosApp();
}
}
}
})
return true
}
// #endif
},

操作步骤:

app审核反馈 ios17的ipad air,点击back按钮会崩溃

预期结果:

正常后退

实际结果:

崩溃

bug描述:

点击back按钮会闪退,在webview页面对onBackPress做操作

Issue Description

The app crashed during review. Apps that crash negatively impact App Store users.

Steps leading to crash:

  • Tapped on the “back” button

Review device details:

  • Device type: iPad Air (5th generation)
  • OS version: iOS 17.5.1
2024-06-17 09:42 负责人:无 分享
已邀请:

要回复问题请先登录注册