Member-only story

Using iOS Notifications, Cryptography and iCloud to build your own Chat App II

Mark Lucking
4 min readFeb 19, 2020

I should start this article with a disclaimer, it based on iOS 13, Swift 5 and Xcode 11.x. If you reading this and those numbers look dated, be forewarned.

I should also warn you that notifications and iCloud code, involve Apple’s infrastructure which means you will need an Apple Developers account to use them.

Finally Obviously this is part II, you need to go back to part I first, indeed you need to look at the notifications series before do that ideally.

Ok, so in part I we covered the overall plan. The cryptographic code and the cloud databases we’re going to be using. In this article I we’re going to make a stab at the UI [Using SwiftUI and Combine] and do the cloudKit code.

Lets start with some SwiftUI. I want to try and keep simple as possible cause I am a neophyte when it comes to SwiftUI and I already blinded you with science with the cyptographic code.

I decided to have two picker views and a single text field as my interface. You select the person you want to be and you select the ID of the person you want to talk to.

Lets populate our new database then with a few names. Open your browser window to the CloudKit Dashboard, choose the data tab and add a few directory records to the public database. I’v gone with biblical theme and added Matthew, Mark, Luke and John to mine.

--

--

Mark Lucking
Mark Lucking

Written by Mark Lucking

Coding for 35+ years, enjoying using and learning Swift/iOS development. Writer @ Better Programming, @The StartUp, @Mac O’Clock, Level Up Coding & More

No responses yet