Catalyst app cannot find system components and crashes

Hi 🙂


I have a fairly simply iOS/iPad app that I wanted to make it ready for Catalyst... Just ticked support and compiled without any problems.


But when the app start I can see that didFinishLaunchingWithOptions gets called but then right after:


[AXLoading] Failed to load item AXCodeItem<0x600002625ce0> [Rank:6000] AuthenticationServices [AXBundle name:/System/iOSSupport/System/Library/AccessibilityBundles/AuthenticationServices.axbundle/AuthenticationServices] [Platforms and Targets:{ iOS = AuthenticationServices; tvOS = AuthenticationServices; watchOS = AuthenticationServices; } Framework]. error: Error Domain=AXLoading Code=0 "URL does not exist: file:///System/iOSSupport/System/Library/AccessibilityBundles/AuthenticationServices.axbundle" UserInfo={NSLocalizedDescription=URL does not exist: file:///System/iOSSupport/System/Library/AccessibilityBundles/AuthenticationServices.axbundle}


and then the app crashes...


Then I have checked the path '/System/iOSSupport/System/Library/AccessibilityBundles/' and can see the files are not there!


I have now tried with both Catalina Beta 5/6, Xcode 11 Beta 5/6.


Any known wordarounds/fixes please?


Cheers!

Can anyone please check if you have the file file:///System/iOSSupport/System/Library/AccessibilityBundles/AuthenticationServices.axbundle above or not?


Just puzzled why I should be missing that...


(bims/marchv - I'm the same - just used another develop account sorry :S)

I do not have file:///System/iOSSupport/System/Library/AccessibilityBundles/AuthenticationServices.axbundle


I do see file:///System/iOSSupport/System/Library/AccessibilityBundles/AuthKitUI.axbundle though.

Thanks a lot laskinp 🙂:thumbsup:

I have the latter file too.

I have tried to Google the first file but couldn't really find anything that sorted it out...

I'm wondering if I have to reinstall macOS...

Cheers!

Accepted Answer

Great news!


After updating to Beta 7 of both Xcode and Catalina the app no longer crashed at start. But still the screen was black!


But then I fidled with my app delegate's didFinishLaunchingWithOptions:


Before:

    let window = UIWindow()
 
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
             
        window = UIWindow()
        window.rootViewController = NavigationController(rootViewController: MainViewController())
        window.makeKeyAndVisible()
      
        return true
    }


After:

    var window: UIWindow? // <-- changed from 'let' to 'var' and made it optional
   
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
       
        window = UIWindow() // has to create the UIWindow object here!
        window!.rootViewController = NavigationController(rootViewController: MainViewController())
        window!.makeKeyAndVisible()
       
        return true
    }


I guess the app delegate has to be 100% aligned with the standard way of setting it up otherwise it will fail...


Hmm, that was a weird experience 😀


Cheers!

Catalyst app cannot find system components and crashes
 
 
Q