Apple’s sneak peek of its long-rumored, super-secret cross-platform project at WWDC 2018 had us salivating over what the near future potentially holds for iOS developers.
Spoiler alert: The Mac is not dead!
The project, codenamed Marzipan, is a framework that will allow UIKit-based iOS apps to run native on MacOS, expanding your user base and cutting down on redundant coding.
Amazing, right? Not so fast.
As Jan Kaltoun explained during our recent VIP iOS Meetup, the project is “beta, beta, beta, beta, beta.” (Official beta should be released sometime next year.) We, however, have already started fooling around with the new framework.
Here’s what we can confirm: It crashes. A lot. Not everything is supported. (Sadly, this includes Storyboards and Nibs.)
Your UI needs to be written in code, and you’ll need to lift a Mac UIKit framework from another app. You must add entitlements that your app should not have.
More concerning, you’ll have to disable your Mac’s security to run a UIKit app.
But it is still awesome.
“This is amazing not only because it lets you create Mac apps, but it lets you create Mac apps using a codebase almost entirely shared with iOS version,” Jan said. “We’ll see how this develops, but I believe that when this is released officially we might be able to ‘convert’ our iOS apps into full-fledged Mac apps with little effort.”
Jan is predicting a huge number of Mac apps will be flooding the market in 2019 and 2020.
“Before we could only share certain parts of the code. With Marzipan, we might also be able to share the UI layer,” Jan added. “All iOS devs know UIKit. We can leverage this knowledge with Marzipan and make Mac apps using UIKit, which up until now had to be made using a completely different framework.”
Following a live demo of Marzipan in action, we switched gears to talk about natural language processing. Apple introduced its Natural Language Framework in iOS 12 as “a one-stop shop for doing all things NLP on devices across all Apple platforms” in a bid to make your apps smarter, Apple developers explained at this year’s WWDC.
“It contains everything that was in the NSLinguisticTagger but now we have nice Swift APIs, plus the new framework supports more languages — around 50 to NSLinguisticTagger’s 15,” explained Jan Schwarz at our VIP Meetup. “Natural Language integrates with Core ML and Create ML to unlock the wonders of NLP in your apps.”
As an example, Jan showed how we can use the NL Framework to classify text and create a hate blocker in an effort to make the Internet a happier, less-profane place. (We can dream, can’t we?)
“NLP deals with the interaction between computers and human languages. It provides computers with tools to analyze and understand languages,” Jan said. “For instance, the NL Framework is able to analyze messages posted online and detect hateful words that are on your blacklist.”
Of course, this approach is far from perfect and issues will always arise over ambiguity, context and indirect speech, Jan cautioned. Take the word “git.” If you were to place it on your blacklist, because it can be taken to mean “moron” (a hateful word), then what happens when you want to write about GitHub?
“We can leverage the strength of Create ML and build a machine-learning model that will assess a message as a whole," Jan pointed out. “Such a model can be used by the NL Framework, and in theory, it can classify a message based on manually labeled texts that the model analyzed during a training process.” In a live demo, Jan presented a few examples of sentences that were classified as offensive even though they were completely harmless.
Still, Apple’s NLP tools have come a long way in a short while and will no doubt continue to evolve. We will keep you posted!
You might also like...
How We Hire Engineers
The recruitment process at STRV is designed to identify the best, and to create value for every candidate. How? Our senior developers offer detailed feedback that has helped many candidates improve their skills. If you are considering apply...
STRV Academy – An Inside Look
Looking to master the latest frameworks, like React, Node.js or Swift? In just a few weeks, STRV Academy’s practical courses teach what would otherwise take months of self-study to learn.You will receive tailor-made lessons, code reviews, h...
MVI — another member of the MV* band
Every Android developer has heard about MVP and MVVM presentation patterns. Therefore, without even trying, we can easily explain the meaning of the “V,” “P” and “VM” in these acronyms. “V,” as in View, represents everything visible on the ...