Over a million developers have joined DZone.

This Week in Mobile: Getting to Grips With Kotlin and Swift

DZone 's Guide to

This Week in Mobile: Getting to Grips With Kotlin and Swift

You can't afford to miss these mobile dev tips on better testing, better debugging, and getting to know Kotlin and Swift better.

· Mobile Zone ·
Free Resource

The headlines from the mobile world this week belong to Google, with the announcement of Pixel 2 along with Daydream, Pixel Buds, new Google Home devices and a new PixelBook. 


Kotlin Tips: Singleton, Utility Functions, Group Object Initialization and More ..  is full of good advice on the right way to get started with Kotlin. While, Amused By .. and in Operators in Kotlin highlights some of the more natural ways of coding in everyone’s favorite new language.

If you take test driven development seriously, you’ll want to read Android Architecture Components: Testing Your ViewModel LiveData to get a handle on how to properly test out your ViewModels.

Implementing EventBus with RxJava: RxBus shows how to use the EventBus pattern in your Rx code.

Default methods + lambdas = less code shows how you can use the combination of these two Java 8 features to clean up your Android code, with no limitations on the Android SDK.

Some projects to check out: 

  • ScalingLayout: With Scaling Layout, scale your layout on user interaction.
  • SimpleApiClient: A retrofit extension written in Kotlin. 
  • StatusStories: Status Stories = Snapchat stories, Instagram stories, WhatsApp Statuses, Facebook Messenger Stories.
  • RendererRecyclerViewAdapter: A single adapter with multiple view types for the whole project.


Did you know that Xcode 9 is twice the size of Xcode 5? If space is at a premium on your development machine, check out How to Make Xcode Take Up Less Space

John Sundell talks about Using Generic Type Constraints in Swift 4, highlight the techniques and patterns that they make possible.

AutoLayout priorities are a little tricky in Swift, but Easier Swift Layout Priorities shows how you can use some operator overloading to make things better.

Managing Different Environments in Your Swift Project With Ease shows how you can use configurations and schemes to split out your development, production and staging setups.

As the article notes, developers spend about 70% of their time debugging, so you should really know your toolset. Debugging Swift Code with LLDB is the article for you.

Some projects to check out: 

  • LifetimeTracker: Find retain cycles/memory leaks sooner. 
  • BulletinBoard: Generate and display Bottom Card Interfaces in iOS.
  • InfoKit: Strongly typed access to the Info.plist for iOS, macOS, and tvOS.
  • Mint: A package manager that installs and runs Swift command line tools.


Mapbox put forth an interesting New Kind of Map in their latest offering. It’s a great way to look at things, and I’m sure you’ll see this pattern appearing in location-based apps soon.

This article on Instacart’s Lead Product Designer on Creating a Design System shows how difficult it can be to create a single reusable design system. If you’re not put off after reading it, then check out Creating a First Product Design System in Sketch.

In the first part of a series on The Ultimate Guide for Mobile Developers Who Want To Design, find out more about design thinking.

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

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}