You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

iOS16调用SKStoreReview与UIDocumentPicker出现AXRuntime权限错误

iOS16.2下调用评分弹窗与文件浏览器触发AXRuntime权限错误

我用SwiftUI开发了一款iOS应用,在调用SKStoreReviewController.requestReview(in: windowScene)弹出评分窗口,以及在Presenter中打开UIDocumentPickerViewController文件浏览器时,遇到了异常错误。该错误仅在iPhone 13 Pro(iOS16.2)调试时出现,在iPhone X(iOS15.3.1)及模拟器中无此问题。

调用评分弹窗的代码

if let windowScene = UIApplication.shared.windows.first?.windowScene {
    SKStoreReviewController.requestReview(in: windowScene)
}

打开文件浏览器的代码

var documentPicker: UIDocumentPickerViewController
if #available(iOS 14, *) {
    let types: [UTType] = [UTType.text,
                           UTType.vCard,
                           UTType.zip,
                           UTType.gzip]
    documentPicker = UIDocumentPickerViewController(forOpeningContentTypes: types)
} else {
    let types = [String(kUTTypeText),
                 String(kUTTypeVCard),
                 "com.pkware.zip-archive",
                 "org.gnu.gnu-zip-archive",
                 "org.gnu.gnu-zip-tar-archive"]
    documentPicker = UIDocumentPickerViewController(documentTypes: types, in: .import)
}
documentPicker.delegate = self
documentPicker.modalPresentationStyle = .formSheet
if let view = self.view as? UIViewController {
    view.present(documentPicker, animated: true, completion: nil)
}

出现的错误日志

2023-02-25 13:17:50.692899+0100 MyApp[64438:13560256] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:63301 (
    0   AXRuntime                           0x00000001ba7a57fc _AXGetPortFromCache + 932
    1   AXRuntime                           0x00000001ba7a79b0 AXUIElementPerformFencedActionWithValue + 772
    2   UIKit                               0x00000002174491f0 D9354398-E9A6-3296-9512-BF67ADF23501 + 782832
    3   libdispatch.dylib                   0x00000001077f45a8 _dispatch_call_block_and_release + 32
    4   libdispatch.dylib                   0x00000001077f605c _dispatch_client_callout + 20
    5   libdispatch.dylib                   0x00000001077fe10c _dispatch_lane_serial_drain + 988
    6   libdispatch.dylib                   0x00000001077fee34 _dispatch_lane_invoke + 420
    7   libdispatch.dylib                   0x000000010780bcbc _dispatch_workloop_worker_thread + 740
    8   libsystem_pthread.dylib             0x00000001de9d1df8 _pthread_wqthread + 288
    9   libsystem_pthread.dylib             0x00000001de9d1b98 start_wqthread + 8
)
2023-02-25 13:17:50.699031+0100 MyApp[64438:13560256] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:63301 (
    0   AXRuntime                           0x00000001ba7a57fc _AXGetPortFromCache + 932
    1   AXRuntime                           0x00000001ba7a79b0 AXUIElementPerformFencedActionWithValue + 772
    2   UIKit                               0x00000002174491f0 D9354398-E9A6-3296-9512-BF67ADF23501 + 782832
    3   libdispatch.dylib                   0x00000001077f45a8 _dispatch_call_block_and_release + 32
    4   libdispatch.dylib                   0x00000001077f605c _dispatch_client_callout + 20
    5   libdispatch.dylib                   0x00000001077fe10c _dispatch_lane_serial_drain + 988
    6   libdispatch.dylib                   0x00000001077fee34 _dispatch_lane_invoke + 420
    7   libdispatch.dylib                   0x000000010780bcbc _dispatch_workloop_worker_thread + 740
    8   libsystem_pthread.dylib             0x00000001de9d1df8 _pthread_wqthread + 288
    9   libsystem_pthread.dylib             0x00000001de9d1b98 start_wqthread + 8
)
2023-02-25 13:17:50.700365+0100 MyApp[64438:13560256] [AXRuntimeCommon] AX Lookup problem - errorCode:1100 error:Permission denied portName:'com.apple.iphone.axserver' PID:63301 (
    0   AXRuntime                           0x00000001ba7a57fc _AXGetPortFromCache + 932
    1   AXRuntime                           0x00000001ba7a79b0 AXUIElementPerformFencedActionWithValue + 772
    2   UIKit                               0x00000002174491f0 D9354398-E9A6-3296-9512-BF67ADF23501 + 782832
    3   libdispatch.dylib                   0x00000001077f45a8 _dispatch_call_block_and_release + 32
    4   libdispatch.dylib                   0x00000001077f605c _dispatch_client_callout + 20
    5   libdispatch.dylib                   0x00000001077fe10c _dispatch_lane_serial_drain + 988
    6   libdispatch.dylib                   0x00000001077fee34 _dispatch_lane_invoke + 420
    7   libdispatch.dylib                   0x000000010780bcbc _dispatch_workloop_worker_thread + 740
    8   libsystem_pthread.dylib             0x00000001de9d1df8 _pthread_wqthread + 288
    9   libsystem_pthread.dylib             0x00000001de9d1b98 start_wqthread + 8
)

请问这是iOS16的系统bug吗?

内容的提问来源于stack exchange,提问作者Wonton

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 03:47:06