قالب وردپرس درنا توس
Home / IOS Development / Widgets get an upgrade with the new macOS

Widgets get an upgrade with the new macOS



This is a little different than the creative code's exercises that we usually do on The Things in Swift but here goes:


All this talk about MacOS had me thinking about what we would look at WWDC this year, and when I read Brent's reminder of the staggering threat of bringing UIKit to Mac, these ideas began to unite in unexpected ways.

Brent and I have different opinions about how UIKit could be brought to the Mac. His vision is a little more vanilla: shoehorn menus and AppleScript and everything else to UIKit for OS X because it can bring some new developers from iOS to Mac. The mine is a bit more of a shakeup – obviously not an unheard of flow for Apple – and it also solves the boring parts that Brent brings about Mac development.

First Back History: UIKit is the framework we use on IOS to develop UI concepts that feel at home on iPhone and iPad. You can create a fully customized UI if you want to (think full-screen game in Unity), but as soon as you have to accept user access or choose a photo from the library, talk to UIKit. AppKit is the predecessor of UIKit who lives on Mac. AppKit is significantly different (menu bar! Keyboard Shortcuts!) And has much more flexibility due to the platform it's living on. Developers have long waited unanimously by AppKit and UIKit, but we have not heard an official Peep about it yet.

Convergence in simplicity and design

OS X has always danced around a simpler form of desktop applications. Dashboard / Configurator and Today View widgets were created with the idea that there are some apps that just do not need a full desktop app experience to be useful. You can almost think of dashboard widgets like the original iPhone apps: no file pickers, no menus, they only do one thing very well. They have never been very popular on the desktop, but they have also been hamstrung of second hand processing: Dashboard widgets were written in javascript with mediocre OS integration, and Today View is both visually and functionally inflexible. It feels like there is some space between shitty-only widgets and full desktop apps that have not been explored on Mac.

If we see this first approach for easy Apple has worked this issue from the opposite side too: creating iOS apps that are more complex. Apple truly pioneered the idea of ​​non-bit size content creation of iPhone and iPad with Pages, Keynote, iMovie, etc. These apps really push the limits of what an app is expected to do and how much real work you can do on an iPad. Although Apple certainly does not own all the best productivity apps in the iOS platform, multitasking and Smart Keyboards show that they are 1

00% behind the idea that iPad is a productivity device.

These two approaches have not been given similar efforts until now. The iPad has made far more progress towards productivity than the Mac has done towards simplicity, but if you look at a distance, you can begin to see the convergence between the two approaches.

MacOS We're Looking At WWDC

Let's paint a photo of what you want to watch WWDC, starting with a desktop Mac with a screen that looks like multitasking on iPad. You can do this today with El Capitan's split view, but it feels strange with apps that make custom things with the title bar (I look at you Chrome) and it feels better on an iPad than it ever does (even with share apps) on a Mac . Your apps are always fullscreen and can be shared if you want more apps on the same screen. macOS will introduce more flexible window sharing that allows you to create different configurations of programs and windows that are particularly suitable for your task (Sherlocking Moom and a number of other useful tools). Perhaps this is governed by something similar to Editor > Open in ... dialog in Xcode.

Using this dialog, you can share your view in multiple places, as well as add new tabs.

If you are working on web development, you can share your screen to include Safari and a short terminal window on the left, with a large HTML editor (Atom, maybe?) To the right. These configurations are easily saved and recalled, and start any programs needed to fill in the configuration of the window. Congratulations, Apple just killed the concept of launching and quitting programs on the desktop Something it's been itching to transfer from iOS for many ages. To see a preview of how this looks, restart your computer with a bunch of open windows. Disabled previews of what the windows last viewed appear before the app completes the launch. Of course, everyone will complain that Apple stole the window splits from Emacs. Apple, as usual, puts a really slim coat of paint on something that already existed and gave it a marketing name (although that name is not Split View).

Expanding the existing Split View mechanism to many clever, productive configurations can be built from many "full-screen" apps

I've been waiting for this next section for years: There's no desktop that shows through cracks because it's no desk. Your files are stored and sorted in an iCloud-like system where the search rules and navigation folders are one thing from the past. The apps running in this new macOS are written exclusively for the new UIKit framework and can not be run outside of it as a current OS X desktop application.

Currently, Finder is still replaceable in the background because there are no macOS apps yet (except for the launchers released with beta release), but I'm not sure about the future of a Finder-based OS X. Apple is never tough to share a platform in those who regularly update and those who fall behind and this is another of these times for developers. The last time we saw this on Mac, was the 64-bit transition (2012?), And before it became the PowerPC transition (announced in 2006, removed support in 2009). IOS sees these transitions far more often with screen sizes and support for newer specialized hardware, but it seems good for Apple to expand this paradigm to new macOS apps if they can.

To be very clear, MacOS apps are not stupid as dashboard widgets, think of them as bigger, better versions of iPad productivity programs. They only lose the strange things that have driven people against mail PCs in recent years. Refining the experience down to basics has long been the core of the Apple experience and the one that best serves its customers. These new apps refine the idea of ​​a desktop app down to the basics, giving it an iOS-y simplicity without losing productivity. AppKit developers will be encouraged to rewrite their programs for the new UIKit (which really want to tense Brent and other AppKit developers), IOS developers are encouraged to bring all their iOS apps to macOS, and new macOS- Apps will only be available through the Mac App Store .

I originally tried to Make this point under 140 characters on Twitter, but it ballooned into this post. The idea is not to stumble down the Mac experience, that is to bring the simplicity and familiarity of the iOS apps to Mac.

What this means for the developer

The new macOS is being announced on WWDC for one reason: developers are the only way this transition can work. New macOS apps are written using the new, unified UIKIT framework, and Apple wants the legions of iOS developers they've created to start putting their content on Mac. For all of Brent's reasons mentioned above, AppKit development is perceived as more difficult than UIKIT development, and the giant box of unknowns prevents people from developing for Mac. Sharing a lot of code between your iOS app and its macOS counterpart will make it significantly easier and you will be able to distribute to watchOS, iOS, tvOS and macOS with a (strong) unified framework.

For some of the most current iOS apps (especially those designed for iPad screen sizes and multitasking), your app already works on macOS . Hopefully, you have enabled bitcode on your newest project because the Mac is not going to ARM yet. For most, the name of the game is to get your app on macOS Size classes and you will want to support a bunch of them if you want to be able to resizable in the many different orientations your App may appear in the new MacOS split views. With this, significantly better support for previewing and modifying autolayout limitations for size classes in Xcode.

Swift is of course the language you choose for this transition, but Objective-C does not go away anytime soon and you can continue to create new Objective-C projects or use it in parts of your mainly Swift app. UIKIT Association is not exactly news for the Swift team, they have planned it:

  • swift 2 s @available lets us develop classes that work across iOS and macOS and solve minor differences between operating systems With built-in OS control
  • As mentioned above, size classes are a great advantage for those who work across devices. They are minimally useful for iPhones alone, but they begin to show multitasking strength on iPad. They really want to shine over shared iPhone, iPad, and MacOS setup
  • UITraitCollection is a UIKit class that provides more information about supported sizes and features of the devices we drive on, including power support, now on Mac also

And the best part about the developer's announcements? The new macOS comes with unified Xcode for iPad and MacOS. It's Apple's way of saying that this new macOS paradigm is not just for simple widget-style apps from iOS. We will create something that actually helps you get the job and feel faster than your current workflow.

A History of Widgetization

Apple is rarely the first company to try out new interface concepts and a widgitized post-file system desktop is not particularly novel for operating systems. The most obvious example is probably the Window's short toay for a widget-heavy home screen with Windows 8 Metro UI. This approach was too far on the widgets side of the spectrum and optimized for bit size information that does not fit well with the goals of a desktop user (and a part of why Windows Phone UI stuck to the concept). [19659029] Windows 8 & # 39; Metro & # 39; home screen with widgets galore

Even Google ChromeOS can be considered a transition to another type of operating system. An icon-less desktop with a very fuzzy concept of the file system and essentially a single app to run. Why they still let you resize and drag windows around is beyond me, it seems almost useless on the device where a decent shared viewer could simplify the entire experience. The difference here is that Chrome is the only "widget" you get, and you can fill it with anything from the web. Especially different from Windows 8, people (OK, school district) seem to be like ChromeOS because they are cheap, and for most, the internet is really just the web.

There's no way to predict that people will not be happy with the new macOS at the beginning, least of them developers with closed workflows, typical of users when presented with something new. But I think that core concepts actually have the ability to be better than what we have now (we really have not come up with anything better than the menu bar?) And it is possible that Apple is the only company that has experience in building a framework for radically simpler applications that maintain user productivity.

Final thoughts

Why do I think we'll see a version of macOS and UIKit on WWDC this year? No internal sources here, but we are late for some things that can point to some new coming.

  • UIKit is not on Mac. Perhaps the best argument that UIKit will not be used to develop standard OS X apps is that it has not happened yet, it's a bit deeper to think about how it should be done.
  • iTunes does not get a new design because it's redesigned like MacOS Music and iTunes Store apps similar to iOS

This is Apple, so it's always hard to tell if something is planned tomorrow or for four years, but hype is based on WWDC this year and yet Another "quality-focused" The release of OS X would be powerful boring.

Andrew Ambrosino has written the second best with MacOS speculation, his ideas about convergence of the two platforms and leaving the old navigable file system behind is spot on. I do not think he has put much emphasis on UIKit on Mac though; AppKit vs. the UIKit label is not what keeps Google Inbox and Netflix from creating native apps to Mac, it's the fact that you need to review the entire app to follow menu bars and hotkey conventions on another platform. Taking an iOS-based approach to macOS apps means that you need to add a few features to fit in, not converting the entire structure. Pretty mockups though. Remove the window checker and go full screen and that's about the same I expect.


Questions or comments? Find us at twitter or send a problem on github


Source link