Read the transcript
Jeroen Leenarts: Hi, and welcome
to the 59th episode of my
podcast. My name is Leenarts.
And I've been developing
software for over nine years
developing iOS apps for over
nine years and number
neurological cats for over eight
years. If you're an iOS app
developer, you should listen to
my podcast because it will keep
you updated on interesting
articles, conference and events
you might not have heard about.
In this episode, I'm going to
talk about implementing and
testing universal links, making
rounding specific corners easier
with extension, how to make
custom exit test assertions show
an error at the call sites,
lightweight dependency injection
and unit testing using async
functions. So let's get started.
This week, I will be presenting
at Dutch cocoa hats on
Wednesday, that's December 15.
If you missed the event, there's
a live stream available on
YouTube on the channel of cocoa
XML. So register or have a look
after the fact. And let me know
what you think of my
presentation on Tuesday. Also,
my first content piece from a
new job has been published. So
it's a swift UI SDK,
announcement blog post will it
tutorial attached for the new
SDK for stream. So really
excited to get it out there, I
don't want to go into too much
detail because my podcast is my
podcast and not my work. But
still, it's it's fun to to
actually be able to have
something out there for my new
job. On another note, my son is
running a bit of a fever. So
while it's going to be his first
week at school next week, I do
hope that he gets well soon so
that he doesn't have any issues
getting into the school yards
because of his illness. So
fingers crossed, he will recover
soon, and not run a fever
anymore. So it's a bit of a
bummer to have this situation
for him right now. Because on
Saturday, it's also his
birthday. And right now his
birthday is a bit up in the air
whether or not we can keep all
the festivities going for his
birthday. Everything was already
scaled down significantly due to
COVID. But let's hope that he
recovers soon and that he still
has something that resembles a
birthday party. So he's going to
be turning four on Saturday, the
recovery of my wife whether
concussion is still slow going.
So for the past six weeks, I've
been doing a lot of things in
and around the house. So a lot
of covering and small trips and
errands to make sure that the
kids get to school and
everything just keeps on working
here. So it's been a lot of late
nights and things like that to
just get to the things that I
want to keep on doing. And I
must say that lately, the
podcast has been a bit taxing to
keep going, struggling through
it. But just doing my best and
making sure that I put some
content out there. I do enjoy
the interviews, podcasts very
much. And I like doing those and
I have some of those in the back
catalogue. So those will
continue, for sure. But still,
I'm always looking for new
guests. So if you know somebody
who would be a good guest from a
podcast, let me know, so that I
can reach out to this person. So
let's get into the news articles
and finish up with daanish
Monday morning tweet.
First article wants to mention
is by David Chang implementing
and testing universal links.
Universal links is a feature
allowing redirection to your
mobile app. Its main goal is to
offer the end user the ability
to display your content either
on your mobile app installed or
your websites. So what is
universal link about to
illustrate the benefits, David
describes that he wants to have
a look at Google Maps. With the
app installed, the first time
that you tried to open Google
Map link system will prompt you
to ask if you would like to open
the app by accepting the system
will save the preference and
open all future and similar
links with the app offering a
richer experience. So there are
some caveats involved with
universal links. But the meat of
the article is about describing
what universal links are and how
you can actually configure that
for your app. It's one of those
things that once you've done it,
you know how this works, you
know where to look, not which
piece of code you have to have
in your app. But it's it's a
good overview by David, that
explains a number of things and
also how it can validate that
you have everything configured
correctly. So it's good for you
to just make sure that you don't
forget anything while
implementing universal links.
There's also a number of links
and stuff in there that you can
use to debug and understand what
you're doing with universal
links. Phillip Nemecek has an
article titled make rounding
specific corners easier with an
extension. It's an article about
Philip Nemecek being tired of
spending time to distinguish
between layer mint x max y
corner and layer Min X min y
corner when trying to round only
specific corners with a mask on
his property on ca layer. So we
created the simple extension to
make this much more pleasant, at
least for himself. So basically,
it's an extension and the way
that you can use an extension To
make something that you have
some difficulty with
remembering, more convenient for
you to use. It's a fun little
thought experiment here. It's
very short article, really,
because it's just a few lines.
But what I find interesting on
this article is this this is
like, right, like right at the
edge of something, should you
introduce this, or should you
not introduce this? The pros
are, of course, that you have an
easier time remembering and
having the effect that you're
looking for. The disadvantages
is that this is something that's
very much specific to your code
base, you create a sort of like
a new dialect in your code base.
And I always tend to be very
careful about this. But
considering the completely weird
naming of the of the properties
that you need to set when
dealing with corner radiuses on
ca layers, I do understand this
one. And yeah, it's just one of
the things I wanted to highlight
this article. Because, yeah,
just always be careful when
introducing new naming in your
app, do it for a good reason.
And make sure that you don't get
too much of a project Pacific
dialect going on. So just wanted
to mention that. The next
article is by saloon, how to
make custom exit test assertions
show an error at the call site.
So it's a bit of a long name.
But basically, if your unit
testing and you have like more
complex assertion going on,
there are ways that you can get
Xcode to signal the failure
location of your assertion.
There are some trickery involved
with static strings. So that's
hash filepath, hash line and
hash function. And in his
article, certain details, what
these things are, how you can
use them, and how it can make
sure that when you create a
custom assertion that the
assertion is actually flagged by
Xcode on the call side of this
assertion. So you have a much
easier time finding the correct
piece of code that is having an
issue in your unit testing. So
it's one of those things either
you know about this or you
don't, if you don't know about
this, definitely this article.
If you do know about this, then
this article is a very good
recap on the features. And maybe
there's something in there that
you have missed the first time
that you've been dealing with
this feature. The final article
I wants to highlight is by John
sandal, it's called lightweight
dependency injection and unit
testing using async functions.
Very often making code easy to
unit test tends to go hand in
hand with improving that code
separation of concerns, it
states management, and its
overall architecture. In
general, the more well
structured and organized your
code is, the easier it tends to
be to test in an automated
fashion. However, in an effort
to make code more testable, we
can often find ourselves
introducing a ton of new
protocols and other kinds of
abstractions, and end up making
your code significantly more
complicated in the process,
especially when testing
asynchronous code that relies on
some form networking. Junk
posts, were not really has to be
this way. And the solution that
he's looking for is dependency
injection to use in your unit
testing, while using async
functions.
First, he goes into a lot of
detail on what Dependency
injection is. And then he
follows up by how can use
dependency injection to inject
certain dependencies in
asynchronous codes in your unit
tests. It's it's an interesting
overview. And it's thorough as
always, with Johnson though, and
yeah, it's it's a nice
experiments on dependency
injection, so that you can use
in your unit testing, but also
in other areas of the code base.
So while it's probably no such
thing as the perfect dependency
injection setup, but by
experimenting with different
techniques, you can often arrive
at an architecture, just that
structured need balance between
how your code base is organized,
your testing needs, and the
personal preferences of the
developers working on it. So
it's a very thorough and
interesting article with an
overview of dependency injection
and practical applications, and
how you can actually implement
this in your own code base. So
definitely have a look at this,
because it's a nice way to deal
with dependencies in your unit
test if you have asynchronous
code. Now let's move on to
daanish Monday morning tweet. As
I already mentioned earlier, I
did some content releases, and I
also indicated that it would be
presenting at Cocottes. And now
Josh, he actually started a new
job at revenue Cat today. So
congrats on that one, Josh. I
hope you really enjoy your new
job. And fortunately he also
indicates that he will keep on
working on Fastlane tools.
Steward Lynch released something
new Xcode and source control a
case study and he indicates that
is one of the most satisfying
videos that he has created on
his YouTube channel. John Doe
Gatto is doing a little victory
dance because his team Lee just
told he's got a race. And
Michaela Caron is getting some
work done on the freelance
project and finishing up some
stuff before the holidays.
Philip Nemecek has started
implementing support for non
appstore apps in the in the apps
catalog. So he's updating his
data model and it's quite a
painful exercise. takeI is doing
some bug fixing does anyone's
apps icons look darker when they
actually compile the app in the
simulator. So he has some
questions on that. And GTA
portal is hoping that 90% of the
writing of his first in the app
will be done soon. So he did an
absolute corruptions over the
weekend. And today, it's some
layered code for the Thank You
screen. So Robin is mentioning
that he she's been helping
someone learn late coding for
interviews, and man Swift is not
great for that. He's going to be
doing pairing with that person
more this week. Andrew says it's
his last week at his current job
and he only has three working
days including today left in
2021. role on December 15, I
can't wait. Yeah. So by December
15, he is winding down after an
intense year. Dominic Rodell
mentions that he started his
journey to marketing for indie
developers, if you know and
know.
There is still learning swift
UI. And he's or she's very
grateful for meeting like minded
people in iOS Dev, Twitter. And
he's wishing you all the best
and make better impact on the
world.
And Secretary linman has just
released an update to his app,
Jelly cuts app. So it's so all
know a lot of people are pushing
out content, some app updates.
And yeah, it just seems that
people are also wrapping up the
end of the year. So I wish
everybody good luck with those
last few days of 2021 or was
still 2020. I forgot what date
it is. Because things just go
into one big blur. So talk to
you again next week. And let me
know if you have anyone that you
think I should have on my
podcast, because I will
definitely follow up on any good
leads that you could provide me.
If you want to support my
podcast, please give me ratings
and review. If you have any
questions, let me know at app
force one on Twitter. And yeah,
that's basically it for this
week. Talk to you again next
week.