That must've been a nasty surprise.
I don't know about you but I got way too much code and time invested to just throw it all in the trash and start using SwiftUI anytime soon.
As a workaround you should be able to embed an "AppKit aware" bundle in your Catalyst app? This bundle can call all the public methods an AppKit app can. Load the bundle from the Catalyst app and call whatever public API you want...
Something like this...
NSURL *appKitAwareBundleURL = [[NSBundle.mainBundle.builtInPlugInsURL URLByAppendingPathComponent:@"NameOfBundle"] URLByAppendingPathExtension:@"bundle"];
NSBundle *appKitBundle = [NSBundle bundleWithURL:appKitAwareBundleURL];
NSError *errorLoadingBundle = nil;
if (![appKitBundle loadAndReturnError:&errorLoadingBundle])
{
// whoops check error..
return;
}
Class appKitWorldClass = appKitBundle.principalClass;
id <YourProtocolNameHereWrappingAPIsYouNeed>myAppKitWorld = [[appKitWorldClass alloc]init];
self.appKitWrapper = myAppKitWorld;
Your principalClass conforms to your protocol you define that wraps whatever API calls you need.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: