Apps MacOS to iPadOS

During WWDC it was mentioned Apple was providing the ability for developers to port iPadOS apps to MacOS (i.e. project Catalyst formally Marzipan with UIkit). Is this a one way process or would it be possible to port apps from MacOS to iPadOS?

Essentially, they're making most of UIKit available to compile for mac, so most of the fundamentals of apps written for iOS "just work". But they are not providing an AppKit to run on iOS.


I'm about to release a native AppKit Mac app, and am beginning to re-write it from scratch to run with UIKit. However, I'd always had the intention of releasing across as many Apple platforms as I could, and knowing they were goign to do this because of their announcement at 2018 WWDC, I had already written the vast majority of my code with cross-platform frameworks like, CoreGraphics, CoreAnimation, AVFoundation, CoreData, FilePresenters, (a previous version used SpriteKit, which is also cross-platform) etc... so only my top-level view controller code needs to be modified. Only 7.7k of my 34.7k lines of code in that app need to be re-written, and I'm discovering that mere type transformations, like NSButton -> UIButton, NSTextField -> UILabel / UITextField, NSImageView -> UIImageView, NSViewController->UIViewController, NSSlider->UISlider, etc... go a very long way to making a huge amount of that code reusable. (For fortunately, I had already made a cross-platform color data model with custom Codable support!) Even my NSDocument subclass methods are very similar to my UIDocument subclass methods. And in about 5 days, I've already moved over 3.5k of those lines. But UIKit is, in my experience, much easier to work with than AppKit, (and I was doing AppKit before the iPhone came out). With UIImagePickerViewController, a ton of junky AppKit & Photos code was just deleted! And for some of my core behaviors, like my very-custom drag & drop NSCollectionView code, I'm taking the time to re-write with the iOS 12 drag & drop behaviors, (which make more sense anyway). Combined with ios 13 compositional collection view layout, I won't need to insert horizontal collection views in vertical table view cells!


The only thing that's driving me nuts is multiple-window-scene support. I just want a flow chart with sample code. They diffracted the tutorial across 4 hours of WWDC lectures, and don't have a sample multi-window-supporting document-based ios app yet.

Apps MacOS to iPadOS
 
 
Q