The Biggest Highlights from Apple WWDC 2019 & What's New?
Project Catalyst
Starting on November we are going to be able to compile iPad apps into Mac. By only clicking a checkbox on XCode developers will be able to transform an iPad app into a Mac app.
Some things will not be able to compile on Mac target like ARKit based code,
Libraries will need to be compiled for MacOS
To avoid code to be compiled for a target, devs can use flags on the code. This way some parts of the code are only compiled for iPad and some others only for MacOS.
Settings of iPad apps are moved to preferences on the Mac automatically
SwiftUI
SwiftUI is the new way for developing apps, with an easy to implement and easy to read structure, makes developing apps much faster. Xcode brings new tools for implementing with swiftUI like a real-time preview screen where the developer can see changes applied to the code on real-time and also can make changes on the preview and those will be reflected on the code as well.
This language is state dependant, views are bound to state values and redraw of a view is made every time a state value is changed. In my opinion, this makes the code easy to understand and debug, every change on the UI depends on a state or source of truth.
Test data can be used to preview views with real content, and a grouping function exists to show several previews at the same time with different phone specifications like the size of the fonts, etc. This will avoid the developer injecting bugs on the UI.
Sign in with Apple
Apple presented “Sign in with apple” a new secure and alternative way to sign in to platforms without sharing your information as Google and Facebook do. Sign in with apple is not only for Apple, it also works for all platforms. When using this feature, Apple will ask if you want to use your real email or an automatically generated one. Automatically generated emails will redirect to your email, giving the platform no information about yourself and letting you manage each automatically generated email.
Apple watch independency
Apple watch is now independent from other devices. With their own app store inside the watch, apps can be developed and targeted only for the watch.
Users can now experience apps without the need for a companion app on the iPhone.
Sign-in with apple is supported.
Adding input text to the Apple watch is now easy, apple watch lets the user add text from the iPhone.
The Watch is now a target for push notifications
Also read: Apple’s Worldwide Developer Conference Maps Out Stronger Cross-platform Development
ARKit3
ARKits comes with a game changer for augmented reality. “People occlusion” is the new impressive feature on ARKit. The framework now supports recognition and position of people in virtual spaces. Separates people into a different layer depending on deepness on the scenario and then adds those layers and the virtual object layer over the camera. This allows the users to move around a scenario and depending on the position, hide objects with their body. What is most amazing about this feature is that is automatically implemented and needs no work for the developer.
Available in devices with A12 or Later ( iPhone XS and above)
ARKit also brings “Motion Capture” allowing tracking of human body in 2d and 3d.
The framework provides a skeleton representation for Motion Capture and allows driving of a virtual body in real time.
“Simultaneous use of front and back camera” is now supported. This allows a developer to do things like interacting with facial expressions of the user while doing something else with the back camera.
Also brings “collaborative sessions”, which allows continuously sharing of mapping information between multiple devices. As an example, 2 devices can scan different sections of a room and when they collide in some section of the room, the whole room is mapped because of the shared data.
A great feature for developers is introduced, “Record and Reply” let the developer record a video of a place and then load the movie to the XCode, when testing a scenario, the simulator will use this video as it is happening at that moment. This lets users prototyping without moving from the desk.
Dark Mode
Dark mode is a new style available for the devices. The user now has the ability to change between light mode and dark mode and the whole SO will adapt to the style selected. Apple encourages apps to support this mode following some guidelines.
Apple brings some new features on Xcode to quickly adapt to the style change, as for example, colors can now be declared as dynamic and will take different values depending on the style of the device.
Core Location
Apps can no longer ask for “Always allow” permission directly to the user. Instead, a new permission was added “While in use” which as the name suggests, it allows location only while in use (this includes background).
Old apps that are using “Always allow” will be changed to “While in Use”.
But is not entirely gone. For location events like geofence events that should work when the app is closed, the prompt for “Always allow” will be shown to the user once the location event is triggered on background.
It’s a must that for asking for “Always in use” authorization, the user needs first to allow “When in use”.
Beacons adapted to “While in use” permissions. Apps that use Beacons should start before entering a region. On background, when the app enters into a region, the app will start Ranging to find beacons, and when moving away from a region app will stop ranging.
This way app will save battery.
NFC
NFC is a technology that is gaining power and we can see it on a daily basis on lots of tech solutions. This technology was already present on Apple devices and services for integration with wallet was available for devs.
This year Apple is releasing full integration with NFC for devs, allowing integration with different NFC brands. Apple is giving to the devs the ability to read and write NFC tags. This opens the door for a million new possibilities for mobile solutions.
HealthKit
Healthkit also has some improvements. Data representation changed, “Quantity Series” was introduced, which are single objects that contain several Quantity samples. This allows sending several records as one, for example, the blood Pressure values taken on a period of time with the apple watch.
A new Kit is now available for Audio health care.
Accessibility
Accessibility also has a new feature. “Voice control” now allows taking full advantage of accessibility features for people with disabilities. By only using your voice you can navigate apps and have full control of the actions that all apps offer. This is a great functionality that brings a lot of value to the app (and therefore the client) and costs too little on the developers side.
If your app already uses accessibility identifiers for your views, then your app already supports accessibility via voice control. If not, adding support to this feature is as easy as setting an accessibility identifier for each view that has an action.
By: Marcelo Restuccia