第一次提交
2.1.0 性能:应用程序完整性
说启动app,拒绝授予相机权限后,app会崩溃
针对这个把代码增加了场景处理,在viewDidLoad会检查权限,如下:
override func viewDidLoad() {
super.viewDidLoad()
checkCameraPermission()
cameraMgr.updateVideoOrientation()
// 监听设备方向变化
NotificationCenter.default.addObserver(
self,
selector: #selector(deviceOrientationDidChange),
name: UIDevice.orientationDidChangeNotification,
object: nil
)
}
@objc func checkCameraPermission() {
let status = AVCaptureDevice.authorizationStatus(for: .video)
switch status {
case .notDetermined:
// 首次请求权限
AVCaptureDevice.requestAccess(for: .video) { granted in
if granted {
print("相机权限已授予")
DispatchQueue.main.async {
self.setupCameraAndAudio()
}
} else {
print("相机权限被拒绝")
DispatchQueue.main.async {
self.showPermissionDeniedLabel()
}
}
}
case .authorized:
print("相机权限已授权")
setupCameraAndAudio()
case .denied, .restricted:
print("相机权限被拒绝或受限制")
// 可以提示用户去设置中手动开启权限
showPermissionDeniedLabel()
@unknown default:
break
}
}
checkCameraPermission,触发请求权限,是在安装后第一次执行时,AVCaptureDevice.requestAccess(for: .video)执行后,在设置里会有相机权限可选::
如果用户不授予,弹出下面页面,引导用户去设置。
func showPermissionDeniedLabel() {
let label = UILabel()
label.text = "app需要相机权限,用来进行人脸测距。\n请打开:设置->App->faceDistancePIP,打开相机权限,则可使用app的完整功能。"
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.textAlignment = .center
label.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(label)
let settingsButton = UIButton(type: .system)
settingsButton.setTitle("去设置", for: .normal)
settingsButton.addTarget(self, action: #selector(openSettings), for: .touchUpInside)
settingsButton.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(settingsButton)
NSLayoutConstraint.activate([
label.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 20),
label.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -20),
label.centerYAnchor.constraint(equalTo: view.centerYAnchor, constant: -20),
settingsButton.topAnchor.constraint(equalTo: label.bottomAnchor, constant: 20),
settingsButton.centerXAnchor.constraint(equalTo: view.centerXAnchor)
])
}
@objc func openSettings() {
guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
return
}
if UIApplication.shared.canOpenURL(settingsUrl) {
UIApplication.shared.open(settingsUrl)
}
}
2.3.8 性能:准确的元数据
说的是app的实际名字与App Store Connect的应用里的名字不一致,导致安装后会找不到app。
如图,名称需要和应用的名字一样。
2.5.4 性能:软件要求
说info里用到了Privacy - Microphone Usage Description权限,实际app没用到。
查了下,是xcode工程配置问题,在工程->Build Settings->Info.plist Values里有audio权限的残余信息,导致提交版本时,会要求在info里添加audio权限,下面已经清理掉了,只保留了camera的key,提交版本不会再提示了。
4.2.0 设计:最低限度的功能
说info里有voip权限,实际app没有用到
这个是因为:app要用到mulitasking camera access功能,xcode上传版本时,要求要在info里带上voip,如果info里不带上voip,不让上传版本,实际app并不需要voip权限。
5.1.1 法律:隐私 - 数据手机和存储
在App Store Connect里选择App隐私,“数据类型”设置为:未从此 App 中收集数据。
第二次提交
因为第一个版本在备案时,发现Bundle ID不对,我写的是--.faceDistancePIP,这种命名是不能备案的。
备案错误:
在xcode修改Bundle ID为:com.dongguanjutong.faceDistancePIP
提交版本时,报错,说是应用名重复,所以我把第一次提交的App改了名字,在提交版本,在App Store Connect里生成了一个新的App。
提交后,苹果返回审核问题:
Guideline 4.3(a)-Design-Spam
说是重复提交了代码相同或类似的应用。
应该就是第二次提交的应用与第一次提交的应用重复了。
解决方法:
删除老的应用,删除方式:先把发布地区去掉,然后选择 App信息->额外信息->移除App
把第二次提交的App重新提交。
第三次提交
2.2.0 Performance: Beta Testing
要补充TestFlight里的测试数据,我习惯用xcode直接测试,苹果要推销他们的工具,那就按照要求来吧。
在App Store Connect的App的TestFlight,内部测试,添加一个测试组test,添加测试员。
然后邮箱会收到邮件指示。
在iphone或ipad上安装testFlight,用对应的Apple ID登录。会有App最新测试版本提示,测试后可直接反馈,使用截图或不用截图。
反馈后,App Store Connect的TestFlight页面如下:
2.3.3 Performance: Accurate Metadata
这个是说截图不对,我偷了个懒,ipad的截图使用的是iphone的截图拉伸了下。
重新截图调整上传。
第四次提交
2.3.8 Performance: Accurate Metadata
年龄分级,先前是4+。
改成17+。
2.5.4 Performance: Software Requirements
还是voip权限问题,直接回复审核团队
到此应该没多大问题了,后面有再补充。