Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

This Week in Mobile: Swift 4's Best Features and Persistence Decisions on Android

DZone's Guide to

This Week in Mobile: Swift 4's Best Features and Persistence Decisions on Android

Check out the best features, custom collections, and network layers in Swift, and how to choose between all the persistence options available on Android.

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

I think it's safe to say that most of us are over the whole notch thing now, although you'll find projects for Swift that hide it, and projects for Android that add it in. Luckily, this weeks articles go far beyond this!

iOS 

The Best New Features in Swift 4 puts together the main headlines in the latest version of the language. Even if you think you know everything about it, it’s still worth having a review 

John Sundell explains how you can go about Creating Custom Collections in Swift to make your code more predictable, rather than using general data structures such as Array, Dictionary or set.

Network Layers in Swift shows you how to make a solid and testable network layer for your app.

Jesse Squires has been Measuring Swift Compile Times in Xcode 9, and hows how you can improve build performance by applying some additional flags.

LLDB can be really powerful, so it’s worth getting to grips with it with this excellent tutorial on Debugging Swift Code with LLDB.

Some projects to check out: 

  • NotchKit: A simple way to hide the notch on the iPhone X.
  • whats-new-in-swift-4: An Xcode playground showcasing the new features in Swift 4. 
  • VegaScroll: Lightweight animation flow layout for UICollectionView written in Swift 4.
  • DIKit: An experimental project that provides static dependency injection by code generation. 

Android 

You might be wondering Where Do Layout Attributes Belong in your apps - layout files or style files. You’ll find out the answer here.

If you have an application with a use for NFC tags, you should read this tutorial on Reading from an NFC Tag, which includes a link to a previous tutorial on how to write to an NFC tag. 

If you’re providing a project for other developers to use, you need to ask yourself Is Your Android Library Lifecycle-Aware? If not, consider using Lifecycle Architecture Components as suggested in this article.

This fun tutorial from Joe Birch, starts out with the first part on Building a Guitar Chord Tutor for Actions on Google.

MapMe - the Android Maps Adapter is a new library for working with maps, by using the adapter pattern, and is compatible with both Google Maps and Mapbox.

If you want to keep up to date with the Kotlin community, you should keep an eye on the Kotlin Weekly Update. This week it points to an interesting article on Fluent Intents.

This article poses a great question - Realm, ObjectBox or Room. Which One is For You? With examples of when one is better than the other, this is an unmissable article for anyone building an app with persistence. 

Some projects to check out: 

General

Grab a coffee and read through these 10 Common Software Architectural Patterns in a Nutshell. Maybe there’s one in there that you should be utilizing now.

If you really want to supercharge your design skill, check out the Gestalt Theory for Efficient UX: Principle of Similarity

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:
java ,android ,ios ,kotlin ,swift ,mobile ,mobile app development

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}