On WWDC 2020, Apple announced a much sought-after addition to SwiftUI, namely the new SwiftUI-native Map view. 🗺 Finally we don’t have to create messy wrappers around MKMapView anymore. 🙌 However, there’s a catch.

“Maps only show annotation views of the same type, backed by a single collection.” — Apple’s official documentation

At first glance I found this to be a bit strange. The Map view supports three types of annotation views: MapPin, MapMarker, and MapAnnotation. But for some reason, Apple won’t let us use these types together, although doing so is both possible and common practice with MKMapView. How…

What to do and what not to do when implementing push notifications in your app, and introducing the concept of message notifications to supplement push notifications.

A note to the reader: I use the self-coined term “message notification” in this article to refer to notifications that are stored in the database on the backend.

When implementing push notifications for your mobile app there are certain pitfalls you want to avoid.

  • Don’t start with designing the push notification. Start with the event that will trigger it, then consider whether you need a push notification, a message notification, or both.
  • Don’t directly store the payload of the push notification in the database. The title and/or the body of a push notification should never be stored in the database…

There’s a thing that has been driving me nuts ever since I started programming in Xcode, and that’s the infamous project.pbxproj file.

The project.pbxproj file contains metadata like settings, file references, configuration, and targeted platforms which Xcode uses to build your project.

Whenever you add, move, delete or rename a file / folder in Xcode (among other things), it will result in project.pbxproj being modified. Git, of course, recognizes this and adds it to the staging area. Now, the problem with this is that once you have enough changes in your staging area, and you want to split them up into logically segregated commits, it becomes extremely tedious because you have to manually go through the changes in the project.pbxproj

Firestore is a new, alternative Firebase database which brings a number of benefits with it over the old Firebase database (henceforth referred to as rtdb), two of which are a more rigid structure and the possibility of querying multiple properties as opposed to just one. However, as of the current beta release, there is no built in way of mapping the documents in Firestore to custom objects in Swift. In this article, I will elaborate on a possible solution to this problem.

Firestore structure

Firestore is a document database and as such it is organized into documents, which are contained by collections…

Toni Sučić

📱iOS Developer from Oslo, Norway

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store