0

Even if Accessibility is trusted function AXIsProcessTrusted() returns false on TestFlight release

This behaviour can be reproduced ONLY on TestFlight release

(In local debug and release builds all works well)

What can be reason?

upd: tried another way with same results:

fileprivate func checkIsTrusted() -> Bool {
    let prompt = kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String
    let options: NSDictionary = [prompt: true]
    let appHasPermission = AXIsProcessTrustedWithOptions(options)
    
    return AXIsProcessTrusted() || appHasPermission
}

PC restart also din't help

Environment information:

  • Xcode: Version 14.2 (14C18)
  • MacOs: Ventura 13.1 (22C65)
  • Build type: TestFlight release (local debug and release versions works well, issue in TestFlight release only)

enter image description here

enter image description here

Andrew_STOP_RU_WAR_IN_UA
  • 9,318
  • 5
  • 65
  • 101
  • Similar question: [Swift MacOs - Accessibility - AxError: cannot complete](https://stackoverflow.com/questions/75054454/swift-macos-accessibility-axerror-cannot-complete) – Willeke Jan 12 '23 at 17:12

0 Answers0