You Can Now Hack Together Your Own Cross-Platform Apple Apps

As we anticipate a broader cross-platform development announcement from Apple at WWDC 2019, one developer has taken it upon himself to release a tool that gets you there faster.

Marzipanify is a clumsily-named (but curiously useful) tool from Steve Troughton-Smith. It takes its name from ‘Marzipan,’ the internal codename Apple has given its cross-platform development project. (With ‘Marizpan,’ Apple has taken a touch of AppKit (the framework powering macOS applications) and a healthy dose of UIKit (the framework for iOS) to bring mobile apps to the desktop that don’t feel as though they’re simply windowed mobile applications.)

We should note Marzipanify is not an IDE or SDK, and isn’t an official Apple service or framework. It’s a tool that takes existing iOS applications and re-packages them for use on macOS without developers having to transcode UIKit to AppKit. As Troughton-Smith notes, many iOS frameworks will crash when in use on macOS (underscoring the difference between UIKit and AppKit), which caused Apple to use private entitlements.

Specifically, one named iosmac provides that ‘Marizpan’ functionality, acting as a bespoke platform within iOS, although iosmac frameworks crash when used with macOS frameworks.

Via its GitHub repo, we see Marzipanify isn’t a porting tool for iOS apps. It’s meant for freshly written apps “to get you up and running quickly” for cross-platform use cases. It also requires some know-how and work on your end:

As an iOS Simulator app links against the iOS Simulator version of UIKit, it won’t contain Marzipan-specific APIs like menu & window toolbar support. It’s up to the user to know how to class-dump UIKitCore from /System/iOSSupport/System/Library/PrivateFrameworks and check for the macOS-specific UIKit APIs at runtime so the app can be a good Mac citizen.

Apple iOS macOS Marzipan Cross-Platform Dice

“It means you can continue working on and building your existing iOS app from its existing project, using the existing iOS SDK, and just run the tool against the Simulator build to create a functioning Mac app,” writes Troughton-Smith.

If you’re interested in building cross-platform apps, give Marzipanify a shot. We don’t know how Apple will “officially” handle these apps, but Marzipanify is a good tool for familiarizing yourself with the future of macOS development. Even if it’s different from whatever tooling Apple officially provides developers, we appreciate that it gets us all thinking about the work necessary for cross-platform apps. We especially like it because WWDC will likely touch heavily on this new branch of app development.