Member-only story

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

Mark Lucking
6 min readFeb 24, 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.

Obviously this is part VII, you need to go back to the beginning for it to make any sense, indeed you need to look at the notifications series before do that else your struggle. Most of the parts are just 4 minutes long including code.

I decided to try a major rewrite since part V, and I am going try and flesh out the code here.

Let me do a quick review. We have a messaging app, noob. I used public/private encryption on within it and it worked. But only if you followed a certain sequence when sending messages. I managed to fix the sequence issue, but not in all cases. I went back to the drawing board.

I abandoned encryption and introduced what will be a challenge response solution. Needed to revisit almost all of the classes we defined. Lets start with the first onTap in ContentView.swift

.onTapGesture {
// *** 1ST ***
self.sender = self.users[self.selected]
let success =…

--

--

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