Empower Apps

Marin Todorov joins us to talk about his app dataTile for Simulator: how it uses logs to help developers, getting help from Apple, and his experience with SwiftUI on macOS.

Guest

Related Links

Related Episodes

We talked about 

  • (00:00) - What is dataTile for Simulator
  • (02:26) - Power of simctl
  • (07:26) - Sandboxing dataTile
  • (10:34) - SwiftUI on the Mac
  • (18:13) - Keeping it simple for developers
  • (25:52) - Reactivitiy, Performance, and Apple's Unified Log
  • (34:02) - Launching dataTile to the App Store

Social Media

Twitter Leo - @leogdion
Twitter BrightDigit - @brightdigit
LinkedIn - @leogdion
GitHub - @brightdigit
GitHub - @leogdion
TikTok - @brightdigit
Mastodon - @leogdion@c.im
Youtube - @brightdigit

Credits

Music from https://filmmusic.io
"Blippy Trance" by Kevin MacLeod (https://incompetech.com)
License: CC BY (http://creativecommons.org/licenses/by/4.0/)

Thanks to our monthly supporters
  • Holly Borla
  • Bertram Eber
  • Edward Sanchez
  • Satoshi Mitsumori
  • Steven Lipton
★ Support this podcast on Patreon ★

Creators & Guests

Host
Leo Dion
Swift developer for Apple devices and more; Founder of BrightDigit; husband and father of 6 adorable kids
Guest
Marin Todorov
Experienced on  platforms, author: https://t.co/ljpuMVZpWZ, past: https://t.co/chchhPxvur…, all the info: https://t.co/S8LmmNIQSx, 🐘 https://t.co/jcaSa2qgGr

What is Empower Apps?

An exploration of Apple business news and technology. We talk about how businesses can use new technology to empower their business and employees, from Leo Dion, founder of BrightDigit.

Leo Dion (host): Hello and welcome
to another episode, EmpowerApps.

I'm your host, Leo Dion.

Today I'm joined once
again with Marin Todorov.

Marin.

Thank you so much for coming on.

Marin Todorov (guest): Thank you.

Inviting me again.

I love your show.

I always listen in the car.

It's so great to be here.

Leo Dion (host): You, you
actually, you actually drive

and, and you said you, well.

Do you work from home or do you
commute or is it mostly for, for trips?

Marin Todorov (guest):
Well, I do work from home.

working remotely for a long time, but
kindergarten , the way is a little bit

nasty, goes through the train station.

It's a long way.

So I have my daily commute,
actually, it's the kindergarten and

Leo Dion (host): So what does the
kindergartner think of the podcast?

Marin Todorov (guest):
Alright good topics.

Good pace.

She generally likes . . Oh, well,
well, on my way, on my way in.

I listen to podcast on the way back.

We'll listen to fairy tale.

So I think it's a, I
think it's a fair deal.

Leo Dion (host): Yeah I'm same boat.

Yeah.

Couple of times I've had kids in the
car and I usually don't listen to

my podcast, to be honest with you.

Big surprise.

Cuz I already have to edit it anyways.

. But like one time I'll put it on and
they'll be like, daddy, that's your voice.

That's a pretty good, you got
a pretty good podcast dad.

They're very nice.

They're very nice about it,
even though I can tell it's

probably super boring for Yeah.

So let's get into it.

We're gonna talk about your new app today.

dataTile you wanna give an
intro to the app and where you

came up with the idea for it?

Right.

Marin Todorov (guest): yeah,
currently it, it's on the app store.

It's called dataTile for Simulator,
as we just discussed before recording.

so what it does the short pitch is
that it's widgets for debugging.

And so you log to Apple's
Unified log in your app doesn't.

Where, is it an iPhone app?

Is it a watch app and so forth?

DataTile runs as a companion app to Xcode
and just picks up available logs from

the simulator and just shows you a little
widgets on screen to visualize your data.

If you're logging numbers,
it can show you charts.

If you're logging progress, it can
show you progress bars and so forth.

It just makes debugging much
easier, much more intuitive.

Adds a little bit of color to it.

That's.

Leo Dion (host): Yeah.

It's awesome.

We talked about how I used it this
weekend for, for gBeat app that I

work How does the app actually work?

Like, how does it get the logs and
then able to build a chart based on

that, or display the text, right.

So,

Marin Todorov (guest): so
the technical details are.

There's this tool that comes with
Xcode, the simulated control.

So simctl on the command line,
and you can automate some tasks

with for the simulator, right?

Like, so people would use it to
set up the sim for tests or like

spawn a bunch of simulators to,
to , verify their screenshots and.

things like that.

so you can control functions of the
And so dataTile is also using the same

tool to read the logs from the unified
log in your front most running sim

through that control command line tool.

And so it gets.

The fire hose of all of the
processes log in your simulator.

So , like if you're making nice
network calls or if you're making

Bluetooth connections and things like
this, a lot of Apples frameworks log

to the same central place as well.

And if you log using the Apples logs,
they also go into that same central place

reads this whole spurs amount of text and
just filters for the ones that , come from

your app and the ones that look like some
valuable data and based on what exactly

you log, picks them apart and says, okay,
here there's something that says 20%.

It must be a progress bar.

Bang, it makes a progress , if something
else, it can, can guess like a bunch

of types and make switches for them.

Leo Dion (host): Yeah, that's the
biggest, most impressive thing

about it is I love how simple it
is to set up and also just how it,

knows, oh this is gonna be a number.

We'll, despite it like a graph and it
knows, oh, you're using an equal sign as

a separator or a column, it's just super
easy to integrate into existing app.

It doesn't require like a, like a third
party library, anything like that.

It just works right out of the box.

I love it.

Also in seat, you're talking about
simulator control cuz I've, I've

actually been deep diving into that.

have a video coming out about how
to fake sign in with Apple on the

simulator using vapor and sim control.

And there's a lot you
could do with sim control.

It's, it's really powerful.

. know, like I could go on and on
about it, but there's a surface

level of, oh, I wanna record a video
or take a screenshot command line.

But there's a lot to, to sim control
that people don't even realize.

Marin Todorov (guest): Right.

Yeah.

What, what did you find
Mo most interesting?

, that, that it allowed you to do?

Leo Dion (host): So you can't do
sign in with Apple on the simulator

on the Apple Watch simulator.

I shouldn't say specifically.

with gBeat for instance,
we need to do that.

sometimes, I don't know if this,
but debugging on a hardware Apple

Watch doesn't work 30% of the time.

So, or if it does work, it's super slow.

So I want to be able to
sign in with Apple using.

It's a vapor backend.

I wanna be able to sign in with
Apple on the watch simulator.

So what I do is I track the, whatever
you send off of the iOS simulator

to sign in with Apple, whatever
the, the, the JSON is, I save

that to every existing simulator.

Watch simulator that has.

save it like to the temp data
container, and then when you run

the Apple Watch simulator, it looks
for that file just like it would in

the, in the, in the data container.

And then it uses that to try to sign fake
sign on with Apple on my backend server.

And it.

Now I can actually like run the app
and sign in with Apple, well sign

in with Apple using the simulator.

So yeah, it's, that's a really powerful
tool for, for me to just, to get,

get going on Apple Watch development.

I don't know if that made sense, but.

.
Marin Todorov (guest): Yeah.

It, it does.

Yeah.

I think this tool is, is exactly the angle
that it just offers so many possibilities

to automate things that otherwise
would be so cumbersome to do by hand.

Just what you're doing, detect things
and then communicate, especially

when there's few simulators involved.

I think that's just crazy.

Leo Dion (host): So Basical.

I was just gonna say like the Vapor app
will just call sim control to like find

out what simulators you got running
and then save the request to the, to

the watch as a file and then I'm good
to go, like, which is really powerful.

Marin Todorov (guest): Yeah, I think,
I think, I think especially for testing

things, for recreating whole, whole scenes
if you want to call them like, right?

, when the, when the app is, is having some
kind of data stored in documents, but

not in, in somewhere else and so forth.

So just setting up like a whole.

Seeing, let's call it like for you to
jump on the simulator and test some

certain behavior in given conditions.

I think that's great.

It's amazing.

Yeah.

Yeah, and I was really
excited also to go ahead.

to, to just see all the
options that that show up.

, when you, when you type in sim
sim control help is like Woo.

Leo Dion (host): Yeah.

Oh, seriously.

Yeah, so I have the Get app
container and like the, the list

stuff, I have the all set up.

I'll put it link in my Swift package
that I'm currently trying to finish

up case folks are interested.

But there's a lot.

If, if people want to add a new command,
please feel free So, so yeah, simctl.

Super powerful.

What were the biggest challenges
though, in building this app?

Marin Todorov (guest): So I don't
know if you've seen it before, may,

maybe you've seen it, but like this
last year, I, I've built a whole bunch

of, of different developer tools that
like basically tackled like small

problem and some, something like that.

And so I, I would usually just make
my coffee in the morning and then,

Timebox about a couple of hours.

I will post live updates on Twitter
to see like how far I go within,

within this couple, couple of hours.

And, and this was like one of these ideas.

I basically made a coffee and then
made a little rectangle and in

affinity photo with a number in it
and I was like, Hmm, this is great.

Like, this is what I want to have.

I wanna while I'm debugging
frameworks or, or command line tools

or , anything that doesn't necessarily.

Easily adjustable ui.

Basically, I would like be able to
like have a, maybe a small piece

of UI somewhere on the side where I
can see data that, that, that, that,

that I'm testing or I'm, I'm, I'm
trying out , like more prominently.

And so within couple of hours I had a
little window that showed a number that

also changed and animated a little bit
and, and this, and this so like the

i, the idea to show a number on screen
is not that that complicated, but was

really dedicated to make it a product.

And so this took a long time.

This took the most time.

I think first challenge was
I was thinking, okay, so this

is gonna be an app, but it.

Doesn't fit into the sandbox because
it needs to read the system log

and therefore it will be a problem
for a lot of people to use at work.

And also like at home
just for hobbies as well.

you, it might be an issue who knows if
they cannot install from, especially for

people at work if they cannot install
outside of the app store or it's difficult

to get an approval for this kind of thing.

So regardless, so one of the goals
was go to the go to, go into the

sandbox, make it work into the sandbox.

Basically increased
the potential audience.

this was a kind of a challenge, but
turned out that from this sandbox you

can read the simulators lock stream
and so, had to for leave aside command

line tools, something that felt strongly
for the possibility to work with iOS

Apps watch OS apps TV So this was
the one thing that, that was, was

a it was a hill, but I got over it.

The other thing that, that really
tripped me over at a point was wanted

to make a hundred percent Swift UI app.

So for this app, I wanted to
start from the beginning and

only use Swift I for everything.

so this was a, a in point was
challenging, but it was still possible

and that was really happy with it.

However, I used only the latest
and greatest with so it was

a nice process and so forth.

But during the beta, a lot of people.

They were trying out the application,
said, Hey , by the way, I don't

wanna upgrade right now to Ventura.

I wanna wait out.

Until sir, so sometime before the
release I decided to lower the, the,

the requirements and, and be compatible
with macOS 12 and basically giving.

The set of features that they
added last year to Swift UI was

Leo Dion (host): really difficult for,
I was gonna say, there's like, you, you

do a lot of chart stuff and I'm like
you really wanna get let go of that.

And just for Monterey.

did that go?

So,

Marin Todorov (guest):
Swift charts, Swift charts.

I had to give up Swift charts.

I had to give up the new navigation.

System in Swift UI.

Yeah.

And I had to give up, most importantly,
the new APIs that allow you to open

windows and pass data into them.

Yeah.

And so these three things were, were, were
a little bit of a bummer to, to give up.

So had to recreate like
what these APIs in code.

Yeah.

It wasn't easy.

But I mean, it kind of works.

think there's, I think.

But the initial version that isn't right
now in the app store is still a couple of

visual glitches when you open new windows.

Maybe sometimes.

So, but it's something
that I'm gonna work on.

Leo Dion (host): Yeah.

So it's funny you talk about that cuz
we've been talking about I've been

building my own macapp bushel and like,
I kind of regret supporting Monterey

in a lot of ways because I've had to
do the same thing with opening windows.

Like I, we have this discussion with
Sarah, but yeah, just I have to use URLs.

That's basically how I ended up doing
it is using URLs and the URL listeners

to open new windows, cuz there was
just no way I can get around the, that

lack of, it's, it's nice and now I'm
like, man, should I just say screw

it and only support Vent Ventura?

It's like already been released.

Five, six months now, it's like, but like
I already have all that code in there, so

it's like, well, maybe it's not worth it.

So, yeah, I can understand that.

Are you still happy with the
fact that you support Monterey?

Marin Todorov (guest): As an indie app
I don't think it has the far and wide

reach so that the additional amount of
people who are in the Monterey will make

a difference for the adoption Right,
But , I think it's the right thing to

it was the right thing to do, right?

It's enough for developers.

And I do know that developers
tend to stay behind for a given

time on the previous version.

And would've been a little bit
in your face, kind of, if I

released it only for Ventura.

I just wanted to say about chart actually.

was an interesting, it was an
interesting moment because I actually

gave up on charts before lowering
the requirements because Okay.

a given point.

Yeah.

At a given point.

noticed that when I was doing stress
testing and leaving the app to run

for like a few hours with like a huge
amount of, of, of updates per second.

I was testing something with like
300, 400 logs per second, just leaving

it to run for a really long time.

And then I noticed that sometimes
when I come back to my desk, like

the computer would've would've
restarted in the meantime.

And so , and this was like, really?

That's so good.

Really.

It's not good.

Yeah, that's not good.

and so, yeah.

And and there were no crash logs and no
air logs and nothing that I could actually

like track back to being the cause of it.

only thing that I found in, in the system
log was that there would be a GPU panic

then, after recreating a few times, I
managed to find basically, yeah, a as the

app is updating, the screen will glitch
then, there will be like a little freeze.

Then the mouse will be a little
bit unresponsive and a little bit

later the computer will restart.

so it, it seems to be something with the
GPU that is, that is going very wrong.

, I couldn't track it down,
but a point I was desperate.

And so I was tr just trying out, like
commenting out code, just like , like

monkey debugging or so like mm-hmm.

I don't know how it's called.

But yeah, after commanding out
switch charts, it turned out that

don't have this problem anymore.

So it seems that running the macapp wits
with UI charts and the same on the side

somehow GPU to just completely go nuts.

And then the whole system was down.

But since way to debug if you
don't have like nothing to go off,

I couldn't really figure it out.

So that's why when I figured out that
this is really the reason and like it

was reproducible and you, a hundred
percent that this is the cause of problem.

Then I removed it and just
made the charts myself.

that's, that's solved the problem somehow.

Leo Dion (host): Did you file on it?

Marin Todorov (guest): They require
a they that they require a sample

app and that this meant that I
have to, like, put in the, the app

and, and it's in completeness.

Just putting a Swift UI chart in an
empty window didn't really do So I tried

Leo Dion (host): to like, which
you need a simulator running at the

Marin Todorov (guest): Well, the,
the log that was in the system log

said that the that the GPU panic
originated from the sim render server.

Okay.

So it was, and, and this is the
problem, like this made it so

wild because the, the charts are
running in the, in the Mac process.

Right.

And, and the panic was
caused by the sim render.

But they, none of them caused it,
like, separately only, like Right.

It was, yeah, it was a very
difficult issue to track down.

Leo Dion (host): Interesting.

yeah.

But in the app, you, you
support bar charts, right.

Is there anything else you support as
far as kind of information you display?

Marin Todorov (guest): Right.

So I have, I have charts for the charts.

I have progress bars a switch for bullying
values, and then the rest is just text.

I also have I also have
timers that show up.

Like it's a, it's a mixture some text
and, and some just little images.

Yeah.

Leo Dion (host): was there anything
else you wanted to talk about

when it comes to Swift UI on the.

Marin Todorov (guest): I think I just
like felt like sharing that, I had

doubts because previously I used to run
into issues especially with UI for Mac.

With Xcode 13, for example, I often had
compilers sometimes would hang quite

often if you like put in the wrong curly
brace somewhere would just cause it

to like lose, lose its But with Xcode
14, I must say that has been great.

I have not had any hangs in Xcode.

I didn't have any.

problems with the compiler?

It looks like everything
is much more stable.

So just in case there's somebody
out there wondering if Swift UI

is ready for my answer is yes.

I think people should go up
with Swift UI by default.

Yeah.

And I think

Leo Dion (host): like, I mean like I
think like with AppKit, like there's a

lot you can do there that you can't do
in Swift UI or you may have experience

with it, but I think the biggest
challenge is just gonna be long-term

maintenance of a AppKit app at this point.

Cuz like that would be the thing I
would be afraid of as much as like, oh

yeah, AppKit, I can do everything I want
to do, but like in two or three years

it's gonna be like an uphill battle
trying to maintain an app like that.

Marin Todorov (guest): Most probably.

Yeah.

And, and also what I, what I was thinking
a lot about because as I said, one of

my goals was a hundred percent with I.

So, and then, and then at a point I had to
like, stop, stop and, sit down and really

think about like, what does that mean?

Because like, and this application
is, is it, is it or is it Swift UI?

Or , and it's notification center.

Is it , is it AKI , or is it Swift UI?

So there, there's a whole bunch of
classes that are, that are not Swift UI

per se, but , they're necessary for an
app to, to use like the system mm-hmm.

And so I came up with the, with the,
with the summary that kinda like the,

the idea that , I have a Swift UI
app and for certain things I have

to reach out to other classes that
are part of AppKit or But as long as

this is the exception and , the app is
defined by being a Swift UI app think

that's a hundred percent Swift UI app.

Yeah.

Leo Dion (host): Yeah, totally.

wanna jump back, I wanna talk
to about what we talked about

before the show, cuz we talked
about the getting it into the app.

And There, what were some limitations
you ran into with sandboxing?

kind of Yeah, well, just that
first, let's start with that.

Marin Todorov (guest): Right.

So sandboxing was something
that I tried early and.

Now, the design of the app is basically
a very straightforward pipeline, right?

Like it, it reads input and then it just
processes it, it filters it and then finds

interesting data and then shows the ui.

So it's kind of like a
mostly one way data flow.

Mm-hmm.

from the input to like the
output, which is the ui.

And so I basically have diff
few different input consumers.

And so at first the input consumer was
actually starting a binary on, on the

system and reading the standard output.

So this would be very useful for
command line tools and things like this.

Mm-hmm.

. So this is the first thing I tried
and then I was like, okay maybe

it will be actually much nicer if
instead of reading the standard.

for which you need privileges on the
system, read the log for which you and you

don't have to start a binary and so forth.

So I did that and then at this point I
thought, okay, this is I have these two

and this is great, but at this point, I
think to go to the app store, because I

feel that this product is something that.

A wide range of people could use
to to improve their productivity.

And as soon as I enabled the
sandbox, I got a error message

saying, log the, the system log
cannot be read from the sandbox.

And so this seems to be a hard
limitation and there is no way around it.

It's, the one thing use a technical
support ticket with Apple and they

confirm that you can't read a system.

sandbox, even if you're
pseudo and so forth.

So, so this is why I decided to go
for supporting the simulator first.

Since you can read the systems.

Log from the sandbox but
not the machines log.

And so maybe this is the second step
because a lot of people have asked me

on, on release day even though it was
specifically for the sim actually almost

all of the questions that I got back
from people on product hand or Twitter

and mastered mastodon, I think I.

probably over 90% were about, how
about if I wanna macapp or like

yeah, debug something on my machine.

So obviously a non-box version will
be like a, a next step for that.

just need to figure out, yeah.

, how to handle payments, updates.

And

Leo Dion (host): so forth.

Yeah, I mean the other thing you
could do is just allow some sort of

place where you can read stuff and
have, especially if it's a Mac up

you're developing or a command line
tool, just have it pipe the log to a

specific place thatdataTile could read.

I mean, you could go that route.

. that way you don't have to Yeah, yeah.

ahead.

Where were you?

Marin Todorov (guest): Sorry.

Yes, it could possibly have a
web socket like there, there's

many ways to consume the logs.

But this was one of my other, so
I had like few principles that

I wanted to follow when this one
of the principles was No, depend.

and no changes.

Yeah, that makes sense.

, like the least effort to adopt the app.

So if you use apple's log logs,
go into the, to the unified log,

they disappear after a while.

It's all EF Ural, so it doesn't
really you, leave any traces.

You might be already using them anyways.

Mm-hmm.

. And so it's a very lean process
to you could be already logging

this way or to start logging.

You don't have to like, change your
project or anything, just use apples.

Apples APIs to do this.

And, and, and, and I really wanted to find
a solution that doesn't, doesn't require

you to change or add to your project.

Okay.

And you just really, truly
just install and start working.

So, yeah, I think that version is
a, is a good idea in this case.

Maybe a web socket is a better idea.

I'm still trying to figure out like
how to, how to be How to serve the

most, the most people with this app.

Yeah.

But first I need to, as I said, I
think first I need to ship a few more

like UI improvements and maybe few
more features for the, for the app

that is in the app store right now.

And then we'll see
about the next big step.

,
Leo Dion (host): have to talk
offline if there's a way we could,

we could work with bushel on, on
faking logs or getting logs from,

from a Mac, Mac simulator todataTile.

Maybe once I, once I get back
into that app, Yeah, cuz

that would be super useful.

But like, like you said, I mean, I
do think like a, by far the largest

audience is gonna be iOS developers.

We all know that.

Right.

So I think you've covered
that pretty well withdataTile.

you, you talked about kind of a bit about
what you want do, what do you, yeah.

What are some things that you want to
before you jump into to un sandboxing

this app or supporting Mac O.

Marin Todorov (guest): So I think the,
I think one of the best things about

how the app works is that it actually
doesn't depend on, on your code very much.

It depends on Apple's Unified log, which
is something that Apple ships with your

system and therefore pretty independent
from exactly what are you doing.

What I, what I found out it was two
weeks ago, is that actually the,

the app also works with, with React
native apps because I saw that you

can also write this, which is awesome.

Yeah.

Yeah.

This was so Wait,

Leo Dion (host): there's a wait, hold on.

There's like react native apps out there.

I thought people just use Swift.

I didn't know this.

Oh my gosh, what a revelation.

Marin Todorov (guest): I know.

They, they use a whole bunch of
languages, , because like you can

also use it with Objective C it also
writes to, to the unified log as well.

then I also, and I also thought,
huh, there's like so many other

different kind of technologies.

There is, there's flutter, there's Kotlin.

I mean, all of these, all these
people should also be logging

somewhere, I mean, for sure.

Right.

I think that the, the first thing that
I, that I wanna do is just you, figure

out like if these people are actually
served by the app and, and how this

can help make that more prominent.

then, and then come
the, the updates, right?

Like I need to figure out at
least a couple of glitches in

the UI that came from lowering.

always requirement.

There, there's a list of maybe five,
six features that people required.

Mostly you the log is a fire hose.

There's a lot of things that log to it,
including all kind of like system stuff.

So sometimes there's noise that, that
will just pop up in your, in yourdataTile

That looks like something useful
that you're logging, but is actually

like a framework putting there a.

Just characters and stuff like that.

So building, building an ignore
list kinda like ignores whole

frameworks like your L session Yeah.

Noises or Bluetooth noise and so forth
that you don't need things like that so

that you can just refine a little bit more
what the app does automatically for you.

That'll be great.

Okay.

features like people requested
that they wanna control if the

app jumps to the foreground.

when you, when you run the sim
or just stay somewhere behind so

that you can decide when do you
and when you wanna see it or not.

Because , if it's on a, if it's
on a second monitor, that's fine.

It can just stay there forever.

It doesn't really matter.

But right.

, a lot of people use j just laptop
and it really makes difference

for them if it jumps to the front
anytime they're in the same cell.

a li a little bit more on the setting
side , it's a power app, so it needs a

things, how to behave and, and what to do.

then, and that's it.

And that's one this is taken care of.

I think.

Just more widgets like, I think,
and, and this is one thing that I

really want to hear from users about
is , what kind of data they're.

Logging to their logs and , what will help
them as, as a widget, because charts and

numbers switches and pro progress bars
is probably something that I am, that I'm

really sure that, that people will use.

But I haven't seen how
it's, it's very personal.

So I just want to hear like what,
what people put in their logs and,

and what will help them right.

To see their,

Leo Dion (host): What, and that's it.

What, what We talked earlier about the
issue you ran into with Swift UI Charts.

What kind of like performance stuff did
you find as you built the app you like

had to change something underneath to
make sure that it was more optimized

for not, not getting in the way of,
of someone's iOS app, so to speak?

Marin Todorov (guest): Right,
so, so this is a, I think

this is a very, very, it's a.

Let me call it profound question
because it it comes from experience.

It's so, it's a debug app.

It's, it's something that is a
companion for your, for your excode.

And so therefore you don't want
it to impede like your development

process, which is Right.

, the main thing you're doing.

first of all, Apple's Unified log
is, very, very fast because it's not

meant to be consumed in real time.

This is, this is the main point.

Everything goes into a binary
format that is EF Ural.

As much work as possible is delayed to to
the point where you decide to consume it.

And therefore, since the app
is streaming that live it also

adds a little bit of overhead.

Luckily the process is that first you.

Which app are you, are you working with?

So that already filters the log,
like to a, to a big, to a big a big

amount to, to like a certain app.

does add a little bit of,
of overhead, of course.

so one thing that I had to do, and I
really, I really loved it when I did it,

was there, the app would, the app would.

how many logs it receives per second.

So it basically tracks
the velocity of the log.

Okay.

And therefore it just
counts logs per second.

you, if you there's a little
sub sub subtitle in each tile

and you click a few times, you
will see different kind of data.

And so one of them is logs per second and.

I had to fine tune behavior of the
input consumer so that I know, like if

it's, if you're logging very rarely,
let's say once per second that.

Basically renders every update with
a little neat animation and so forth.

But if you're logging like a hundred times
per second something interesting that

doesn't really mean, like, it doesn't make
sense to update the UI every time, right?

Like and mm-hmm.

, if you don't throttle that in any
way, this really drives Swift UI.

Into, into, into crazy mode and like
this really ease up CPU time as well.

Yeah.

And so forth and so forth.

And so I had to make the model
basically for like the amount of

logs that you're, which you're doing.

So the more you log, the more the
model will throttle, and then you will

still see like a reasonable amount
of updates so that you can Right.

But not too many per perceive the
updates, but like, not all of them.

Right, right.

So this isn't.

consumer CPU course for you.

And so this was very interesting.

Like it had to do a lot of fine
tuning, like to find out like how

much is reasonable to see while
you're traveling and so forth.

And so you still have to
like update, update the data

but just like total the ui.

So it was, this was, this was a fun task.

It was a, it was a fun thing to do.

Leo Dion (host): Yeah.

Was , so this is Swift UI.

This is Swift UI updating.

What did you, if you mind
me asking, what did you use?

for the reactivity of the Swift UI view
and making sure that you're, like, did

you use combine Async Stream or what?

Like how did you, how did you do that?

I'm really curious cuz I don't,
we don't hear a lot about like

high performance Swift UI apps.

Right.

Marin Todorov (guest): So, so think the
whole, like the whole consumer part of

the pipeline and the data modeling part of
the pipeline is very, , I forgot the word.

What's the opposite of reactive?

controller.

It's just, it's simple.

No, no.

It's just a simple Swift code as it gets.

Like there's no tricks,
there's no nothing of it.

Just the simplest, yeah.

Fastest code that you can write.

So so this feeds everything into the data
in basically the fastest possible way.

And from there there's
a, there's an app model.

uses combined to communicate to
each of the models that drives

every window in thedataTile.

Because you can be monitoring
several apps at the same time.

Right, right.

And then each window would then split
the stream into several, basically

tile models that drives every tile.

Right.

Based

Leo Dion (host): on the whatever metric.

Okay.

So when you do the throttling,
you're trying to do that way early

on before you even get to combine.

you wanna do it as fast and
quickly as possible it sounds like.

Marin Todorov (guest): Right.

But I did have to like this,
this kind of like, it's, it's

kind of like a tree, right?

Like it just tr fences out to, to every
of, of the views that needs to update.

But some things needed throttling
and some things didn't need tring.

So, okay.

For example, when you keep the totals
of logs that are, that are being

logged, you don't have to mm-hmm.

, you don't have to you can't really
throttle that , you still need

to count all of the logs that
are coming in, but the actual.

Properties that are driving
the UI need to be dropped.

So for my, so for my models that
were being bound via combined, I

had for some of those I have to, I
had to kinda move away from the at

published property bonfire because this
these drive , every of these updates

drives the whole, the whole model to.

Yeah.

so I had to do custom custom say
these and this and this properties,

when they're updated, just have a
bid set on them and then buying the

product together and decide when to
send an update to based on Okay.

, which they specifically.

Data so I cannot split them.

These things are real time.

This is what updates the data model.

These things are not real time.

This is what drives the ui, and then
this kinda like turns on and off

when you hit a certain amount of
updates per second and this turns off

I'm sorry, the truckling turns on.

And then from there it just do the amount.

So it was really, that's awesome.

That sounds like fun.

I never had to do like this kind
of ui self adjustment . Yeah.

Yeah.

It's basically like, almost
like the ui, self-aware, like,

oh, you're loyal too much.

I'm not showing all of that.

Leo Dion (host): Yeah, yeah, yeah.

Before we was there anything
else you wanna talk about?

Technical with the app?

I was gonna talk about launching next.

Right.

Marin Todorov (guest): No, I think, I
think we covered a lot of, of technical

details and you, people I'm sure
have their limits too, listen about

Leo Dion (host): listening about
check this app out, like go to the

app store and get it and try it out.

It's definitely worth a So before
we close out, let's talk about that.

Launching this app.

So how many, how many, you were mentioning
earlier, you have like, you're big into

building like small apps often how.

How long, how is this different?

And then at what point were you like,
okay, this is actually going into the app?

,
Marin Todorov (guest): right.

So I think last year I think I've built
like a whole bunch of niche things.

, like solved one problem that
I had and it solved them.

And like, I usually
just like package them.

Some of them I put on GitHub, some of
them I just keep in a folder on my laptop.

And.

, but like they, oftentimes
they just solve one problem.

And, and I'm really not so sure
if that's a problem that I had

because of certain way I do things.

Yeah.

Or is it like something that people,
without running like really user

interviews, you don't really know that.

like this app it, after I had the
prototype and then after, I thought

like, this is possible to actually
happen in the sandbox with the sim.

, this made me, made me instantly
see the possibility the.

Basically any iPhone developer to use it.

, probably not every iPhone developer
should use it or, or could use it,

but yeah, possibly anybody could.

Yeah.

Because it's a real use case
for, for, for, for something

that people actually do.

And once I saw that productizing
this, making it so to say was, was

really something that I wanted.

Yeah, so,

Leo Dion (host): so just to tell you,
I've had this idea too, so you're not

the only one who's come up with this.

My idea was more doing it in the terminal
but like the same idea, like totally.

But I, I think as a backup, you're,
you get, you get away with it makes a

lot more sense than doing it in the But
yeah, it's, it's a really good idea.

Did you face any issues with
getting this, besides sandboxing?

Besides that what did you face any
issues launching this app getting it out?

Marin Todorov (guest): Right.

So, so I, so I had few back and
forth with app review naturally.

Okay.

I was gonna ask, but Yeah, it was,
but it was a ni it was like a, it

was a neat coincidence that just
before I was submitting apple had

this round the one on office hours.

They're not the one-on-ones.

Yeah, exactly.

Yeah, exactly.

The office hours over Zoom.

And, and, and I applied for, every
single one like topic that they had open.

And I got approved for
a couple of them those.

And that was really great experience.

I, can only recommend it to other
people because agreed, yes, in

the, in the application form,
you, you just enter your use case.

Possible questions linked to the app
store and since the better was already

there, like people could just, people on
the team could also just grab it and, and

try it out and see what it's all about.

And so, jumping on the Zoom call.

People have already tried it,
already had ideas, already had

some answers we could just really
use the time past possible way.

And I, I have only
positive feedback for that.

And so they helped me also
with app review how to frame.

So

this

Leo Dion (host): was a, this was a
app review one-on-one that you had.

Marin Todorov (guest): I
had one one-on-one about

the app store and one about.

It was I forgot the framing.

It was like a technical
assistance kind of Yep.

Yep.

Gotcha.

And so one, the one that was about
the app store I had exactly I, I

wrote them in the application form.

I just wrote them that like.

, it's a developer tool.

It's kind of a difficult setup.

, it requires to work with Xcode.

I don't know how to frame this
on, on the App store page.

And also how to introduce this
to the, to the app review team.

So, mm-hmm.

, can you help me guide me a
little bit in, in that process.

And so they did.

so they did help me understand
what were the limitations regarding

showing Xcode and screenshots into
sim and screenshots and so forth.

So this kind of like, Topics
that are, that are sensitive

for Apple and the App Store.

And, they're not really easy to navigate.

If you, if you need to yeah.

Send a request to the review team, then
get an email back on the next date.

Then you send an email back
on the next day and so forth.

So this could take some
time I know from experience.

Yes.

And being able to talk in the real
time on Zoom show people share screen.

This was just amazing.

So it is.

Yeah.

Leo Dion (host): Yeah, I, I agree.

It's take advantage of 'em try to get.

Try to come into it with a good list
of questions or discussion topics,

but they are totally invaluable.

They, they know not so much app review,
well, app review is super helpful,

but more in like, oh, I got a Swift
UI question or a design question.

They know - they use that stuff
and they know how it works.

They're gonna come up
with great answers for you.

So, yeah, I agree completely.

It's.

very invaluable.

yeah.

Marin Todorov (guest): The last
thing was - I mentioned I never

used the technical support.

you they're called incidents I
think that you can send to Apple.

Mm-hmm.

When I was trying to make the
system log work, I thought,

well, maybe I should write them.

I never did that before.

Mm-hmm.

. And so I did and emails that came
back that I was completely floored.

because , this person called the
Quin Eskimo, that he answers the

weirdest questions, the most
difficult questions on the forms.

Yes.

He wrote me back and he sent like
a few emails that were like pages

long, he was like, I see the problem.

I've tried and tried this.

Here's a project that I
made in Xcode this problem.

But There's no solution in this
way that you're looking for.

This is the things I've
tried and here's the code.

And so I was really , I was
really So this is something

that I also recommend to people.

Yeah.

I was just it was out of this
world, so this was great.

How much do, how many do

you

Leo Dion (host): get per, per year?

Is it like two of those?

Marin Todorov (guest): Two
you get, so you get two.

Yeah, and I've seen on the app store for
12 years, so this is 24 that I didn't use

,
Leo Dion (host): so I've used.

I've used a couple in the last year,
and mostly it ends up being like,

I'll talk to someone and they'll be
like, oh, you have to do the, you

have to file a ticket, don't worry.

It's a freebie.

That's usually what ends up being, so
I've actually used a couple, couple of 'em

and they were freebies cuz I needed to.

What is it like a access to a specific
new entitlement or like like I had

one-on-one and they're like, oh yeah,
we couldn't fix this, but here file

a dt dts and we'll take care of it.

So, yeah.

yeah, they're, they are, they'll,
they'll give you an answer, the,

at least I'll say that, so, yeah.

Totally useful.

okay.

there anything else you wanted to
talk about before we close out?

No,

Marin Todorov (guest): no, that's great.

I, it was a great chat.

Think it's nice time to wrap up.

Yeah.

Leo Dion (host): if wanna try out
the app, where can they find it?

Marin Todorov (guest): they, if
they search fordataTile it's, it's

one word on the app store, they'll
find out the app right away.

Leo Dion (host): Yeah.

Give it a Yeah.

Yeah.

Thank you so much, Marin,
for coming on again.

You're, you're a fountain lots
of information and experience,

so it's great to have you Where
could people find you online?

Marin Todorov (guest): Yeah, my
website, is nderplot.com, like the word

under plot and there's all the links.

Leo Dion (host): Yep.

And we'll have his Twitter and
Mastodon and everything else

in there as well on the show.

So definitely take a look and enjoy.

I don't know how often you
block, like what, once a week?

Pretty much so you can see
all his little apps and all

his valuable blog posts there.

Thank you, Marin.

Marin Todorov (guest): Yeah.

Thank you very much for inviting me.

This was, this was fun.

I'm, I'm really glad to see you again too.

Leo Dion (host): Yeah, same here.

can find me on Twitter @leogdion.

@leogdion@c.im is my Mastodon
that I can also find my LinkedIn.

All the social media links
are in the show notes.

company is BrightDigit.

Please take some time to review
this podcast, and if there's any

topics you want me to cover, let me
also like, and subscribe if you're

watching this on Thanks again and
I look forward to talking to you.

Next time.

Hi everyone.