PodSearch

Under the Radar

What's In Our Toolbox: Simulators & Source Control

 

00:00:00   Welcome to Under the Radar, a show about independent iOS app development. I'm Marco Arment.

00:00:05   And I'm David Smith. Under the Radar is usually no longer than 30 minutes, so let's get started.

00:00:09   So it's time for our Year in Review episode because it's December and that apparently juices numbers. Just kidding. No, we're gonna... Guess what? You all listened to Under the Radar this year. Thank you and congratulations.

00:00:20   Yeah, so we're gonna talk about continuing our series from last time about the tools we use to make our apps. I always love this kind of thing because I always learn something.

00:00:30   Like whenever I hear or see how someone else works, I always pick up some little detail. Either a new app that I might get value from myself or even just little workflow things people do like keyboard shortcuts they use that I didn't know about.

00:00:45   Or ways they arrange their tools or ways that different things interact with each other. And so I love this kind of thing.

00:00:52   So last time we did coding and design apps and we're gonna start today with how we do testing. And that's kind of broad.

00:01:04   And I think while we've discussed testing before, we've mostly discussed unit testing style tests and why neither of us seem to make that much use of those. This is not necessarily about that.

00:01:18   This is more about how do we run our apps on test devices, test simulators, all that kind of stuff and test how the app works.

00:01:27   I'm sure the test people have a word of looking down upon that kind of testing. But anyway, that's the kind of testing we do most often. And that's a huge part of development.

00:01:39   So I'm curious, Dave, I see your list here and a quick spoiler, I have used almost none of these things so I'm really looking forward to learning from you how I should be using more apps to facilitate my app testing.

00:01:55   Sure. So I think last week or last episode we talked about essentially the design tools to design the app and then we talked about the coding tools we use to make the app.

00:02:06   And then today, sort of the like now that it's made, how do we make sure that it works? And that's, like you said, we tend to, I think, lean towards what is, I don't know, maybe integration or functional testing.

00:02:18   That's the word.

00:02:29   I've tried on different phones and I tried on different configurations and there are different tools that I find helpful to kind of streamline that process and make it more efficient.

00:02:49   And I think that's the reason why I'm trying to use the simulator just because it is so much quicker and you don't have to deal with an extended build and run loop and all of the issues that you run into and it's much easier I find to, you know, sort of if something goes wrong, I can just delete the app and reinstall it and, you know, or do a full reset of the entire device if I'm trying to say, for example, do some testing around permission dialogues and things which are possible but awkward to reset on an actual device.

00:03:18   And I very often be using the simulator.

00:03:21   And I have two tools that I find super helpful for making the simulator just be a little bit more useful. The first is a tool called Sim Genie, which is actually made by Curtis Herbert, who's the maker of slopes.

00:03:48   And it's a tool that I use to kind of replay GPS tracks inside of the simulator, which is so helpful, because when I'm, you know, I've worked on a lot of location based workout apps.

00:03:57   And in these, it's very inconvenient to if you want to test a feature to have to go for a walk and, you know, like, I remember a couple years ago, I was working on a feature for pedometer++ and I wanted to make sure there weren't any memory leaks in my like location tracking system.

00:04:13   And so it's like, well, really, what I want to do is go for like, you know, a 48 hour walk and see what happens, you know, really push it to the limit there.

00:04:23   And so like in Sim Genie, I just loaded up an extremely long GPS track, ran it on my computer, and just let it run for hours and hours and hours.

00:04:32   I mean, just like for a couple of days and make sure that nothing was growing, you know, in the instrument panel and things.

00:04:38   And so it's a tool that I find just super helpful. If you do anything that involves location, it's a great tool.

00:04:44   It has a bunch of other things that we in terms of tools for adjusting things inside of the simulator.

00:04:50   But that's the feature that I use it most for.

00:04:52   And then the other one on the simulator is there's a tool called Rocket Sim, which is more on the capturing what the simulator is looking like, which is a different kind of testing.

00:05:03   It's often like I'm trying to capture a screenshot or I'm trying to record a video to try and make sure to record something.

00:05:10   It's also useful, not necessarily in a testing context, but also for creating promotional materials and things.

00:05:17   You can end up with a really nice bezel around the simulator in the image that it creates, you know, so it gives you a nice like frame that actually looks like an iPhone, not like a Mac app.

00:05:28   And so it's just a very useful sort of tool for that. But those two ways are ways that I can be a bit more efficient with the simulator, do a bit more, and then either gather marketing materials or if I'm gathering like screenshots for things that I need to lead a reference in terms of, you know, found these issues.

00:05:45   It's a better way of getting better screenshots than necessarily just the simulator itself.

00:05:50   Okay, I'm just looking at these two, App Sim Genie and Rocket Sim that you just mentioned. Why have I not been using these all this time?

00:05:58   Because we haven't done Under the Radar tools episode. This is why we need to do this.

00:06:02   This is like, okay, you know, typical of my, you know, life, I often don't ask for help with things, and that extends to lots of different areas, including I often don't know about apps that I could try that could help me a lot in my development work.

00:06:21   And even, you know, just looking at just the very first web pages of Sim Genie and Rocket Sim, both of these, I'm like, oh my God, oh my God, I want that. Like everything, I'm going to buy these immediately.

00:06:33   Also, I very much appreciate the Game Genie style artwork on the Sim Genie icon. That is fantastic.

00:06:38   Yeah, wow. There's so much here. I don't have any need for location testing, at least at the moment. I sure did when I was doing my Fire Island driving app. That would have been nice instead of me riding around in the winter on an e-bike across the sand with my freezing hands at my phone and a little mount on the front of the bike.

00:06:58   This could have been a little more convenient. But yeah, even just beyond location stuff, I'm seeing all these different features in both of these apps, especially Sim Genie, like stuff I could really use.

00:07:10   I see open URL and trigger URL schemes. I see jumping quickly to the data folders, different things like sending push notifications. Oh man. Because I know there is so much capability built into the iOS simulator, but it's so hard to access a lot of the times.

00:07:29   Or it requires you to go look up commands on Stack Overflow to do some stuff via the command line interface. I never want to do any of that stuff. So to have a nice GUI that can just instantly jump me into these features, that matters so much for development.

00:07:45   Because this is the kind of stuff like, these shortcuts might save me 30 seconds, nine times in one session. It's that kind of savings. And when you make things easier in testing, you test them more.

00:08:02   Like you were just saying, you were able to do these long runs of location simulation to be able to do things like test long term memory usage. That's the kind of thing that if you didn't have a tool to easily do that, you probably just wouldn't test it.

00:08:16   Or maybe you would take one long hike and test it once and be like, "Alright, I think I'm good." And that would be it. Whereas when testing becomes easier, you do more of it.

00:08:26   So using this kind of app is a really good idea, as I see from the outside now. I know this is kind of our Christmas episode. Looking at some of these features, these apps, it's like I'm opening things on Christmas.

00:08:41   Like, "Oh wow, yes, I want that. Oh wow, what a great gift that'll be." Yeah, this will be great. Thank you.

00:08:47   Oh, sure. And I think it's the kind of thing where I think, yeah, it's Xcode and iOS simulators and all that are really powerful. And I think sometimes that power comes with a complexity that makes it really challenging for Apple to expose all of the full capabilities of these tools to us.

00:09:08   And so very often, I feel like some of these tools are things which are wrappers around functionality. Like they have the functionality to clean up the status bar on your iPhone. So if you're taking screenshots, you know, you want to have it say 941 is the time and you want to have a, you know, rather than saying no connection, you want it to say it has full Wi Fi and you know, five bars of 5g or whatever.

00:09:31   And there is a way to do that at the command line. But I can never remember how to do it. And it's always like I'm digging around on old Stack Overflows. And then it's like, "Oh, it used to work on this version of Xcode, now you need to change the command to this."

00:09:43   It's great to just have someone else who's built the app that has all of the right things for that so that when I'm taking a screenshot to, you know, add to my app in the App Store, in App Store Connect, it's just there, I just hit the button that says like, "Tidy up status bar." And it does it and I'm not spending 10 minutes, 20 minutes trying to work out the right thing or just giving up and then opening Photoshop and manually trying to do it and having the fonts not look quite right or whatever.

00:10:12   Like, which is something I've done many times. And so it's I find these tools very helpful for that. Like it's just these little wrappers that make your life just that little bit easier. But if you use this all the time, like these are tools that are always running on my always running on my computer whenever I'm doing work, because inevitably I'm going to the simulator. And there's just little things that they will make better and easier inside the simulator as a result.

00:10:35   Yeah, and again, like that kind of thing adds up. Anything with like the build, test, run, you know, kind of, you know, workflow of building an app where you're just constantly, you know, editing the code, going back to the simulator, building and running, going, checking again, trying something else, moving stuff around.

00:10:51   Like anything that makes that loop faster and lower friction pays huge dividends in not only just like sheer accumulated time and not only in quality of the resulting product as I was saying earlier, but also just the pleasantry of development or the grind of development.

00:11:09   Like if you feel like that cycle that you're doing so many times throughout the day, if you feel like you're hitting friction on one of those points, there's no worse feeling when building software than when you feel like you're fighting your tools or your tools are fighting you.

00:11:23   And then the opposite is also true. When you have tools that just get problems out of your way or that give you amazing capabilities that make things smoother and easier for you, it's an amazing feeling.

00:11:34   And you can really start flying when you're developing and that, you know, that keeps you in the zone more, it keeps you happier, it keeps you more productive, and I think it makes better output.

00:11:43   Yeah, no, I couldn't agree more. And I guess the other place that I'm doing very similar things to these kinds of simulator tools is this year, especially in iOS 18, we had a bunch of improvement in terms of when you're actually doing the same operations on an actual device because now we have iPhone mirroring in iOS and Mac OS where you can run, you know, essentially it looks like the simulator in terms of you have a phone, you know, a phone window on your Mac, but it is actually your code running in real time.

00:12:12   On, you know, on your on an actual testing device, and I find that super helpful for that same kind of production in.

00:12:21   It's weird because it's not that much of a burden to like pick up a phone off my desk. Right, but it is something that is that much just a little bit less efficient or a little bit of friction that I don't like.

00:12:34   Whereas now I can just, you know, be doing the interaction doing the on device testing still on my Mac with a, you know, with a with a mouse tapping around and some of the gestures are a bit weird and there's things that aren't perfect, but it is still very helpful in that regard.

00:12:48   And I very much appreciate that as a feature because it kind of makes device testing because there are some things you test which you just have to test on device there's no equivalent in the simulator or it's just ultimately, you know, as much as simulator testing is a is useful, it is still a simulation of what it's going to actually be on a device and so you don't want to rely on that as the final thing.

00:13:08   And so you want to ultimately test so iPhone mirroring has been super helpful for that and related in similar in some ways the way that I use rocket sim for the simulator I use a tool called bezel on the front device testing which is a tool which when you plug in your phone will show you

00:13:25   essentially a real time stream for coming from your phone as a window on your Mac which isn't interactive it's doing essentially a screen recording, but it is super helpful for capturing screenshots and videos and those kinds of tools.

00:13:40   Those kind of things if you're doing marketing or help documentation or things like that it's really nice and it has a really nice interface to be able to export those with the appropriate bezels around them and make nice videos that are gifts or things like you can there are things that you're wanting to collect from your device.

00:13:57   And taking an actual screenshot you know pushing volume up in the side button of your phone is not going to end up with nearly as nice as a result as something you can get from bezel as a result of it being built for that purpose.

00:14:11   So these are some of the hacks where you can do it through quick time but then it will have these downsides and these limitations and then you'll have this resulting video that you have to process in this way and it looks like bezel takes a lot of those steps and limitations away and that's again make it easy and everyone's happy.

00:14:27   So this is where we are brought to you this episode by ListenLater.net. There is so much great educational helpful content online now. The struggle isn't finding something good to read it's having the time to sit down for 20 minutes and actually read it.

00:14:41   So you either save that great article somewhere and never look at it again I'm familiar with this dynamic or you just accept that you'll never get around to it and you eventually just close the tab.

00:14:49   This is where our friends at ListenLater.net come in. You can convert articles to podcasts so you can take them on the go. Email any articles URL to them and their AI with it's human like narration will transform it swiftly into a podcast episode.

00:15:03   So you can enjoy your episodes in your personal feed in any podcast app that supports URLs which is almost all of them.

00:15:10   So this is a great service and it's more than just articles. ListenLater.net can convert an email newsletters PDF attachments and Google docs also into podcasts.

00:15:20   This is perfect for transforming your work documents your newsletters or any text content into enjoyable listenable formats.

00:15:27   Go now to ListenLater.net to try it for yourself and stop missing out on great content you don't have the time to read.

00:15:34   There's $2 in free credit waiting for you so there's no reason not to try it. You can also get up to 25% extra credits on your purchases.

00:15:42   Don't miss out head to ListenLater.net and grab your bonus credits today. That URL one more time is ListenLater.net.

00:15:49   Our thanks to ListenLater.net for their support of this show and Relay.

00:15:53   Alright so moving into a different category now source code and source control. This is one area where I actually do use a GUI app to save me from myself and the command line.

00:16:07   It's one of the only areas that so far that I have done this before listening to you tell me why I should do these things.

00:16:13   This is I use the app get tower or now it's just called tower used to be called get tower and this is my get app of choice it has been for a number of years now.

00:16:24   And I find you know I'm able to use get on the command line in a fairly basic way.

00:16:32   I can do you know basic you know checkouts and commits and polls and pushes and ads and all that stuff.

00:16:39   But when it comes to like branching and merging and any kind of like undoing anything I did.

00:16:46   I every time I would have to go look up on Stack Overflow or something like what's the command to do to make this branch do this thing and I would often do things subtly wrong.

00:16:57   It was always kind of a mess and tower allows me to just get rid of all of that stress and just hit a couple of buttons.

00:17:05   And I absolutely love both the efficiency of that and again also that the features that it offers a running theme here.

00:17:14   Let me make better software because for instance it has one of my favorite parts of tower is they have a really good built-in diff viewer.

00:17:20   We'll get to that again in a minute but you know you can see what you are currently staging and you can see what each commit contains.

00:17:27   And the diff viewer is really nice and really advanced and makes things very obvious what you have changed.

00:17:32   And that is a huge relevant thing for programmers. That's incredibly important.

00:17:37   And I know that everything I'm seeing in there I know like it's anything going on in my entire repository I will see it.

00:17:47   I will see if I'm behind by a bunch and I have to update like if I just take out my laptop or something and I haven't used it in a while.

00:17:53   There's all these kind of visual cues to tell you what's going on and all the advanced stuff like branching and merging and everything it makes incredibly easy.

00:18:03   And therefore I do it more. So instead of like kind of avoiding making branches on the command line because it would take me an extra 20 seconds to Google the right command.

00:18:12   You know before I just wouldn't make very many branches. Now that making branches is like two clicks I do it more which is better for my development.

00:18:20   Because I'm using more tools to accomplish more things more in the right ways.

00:18:25   And so again I can't say enough about tower. I think if you use get for your source control and you probably should.

00:18:32   I strongly recommend using tower.

00:18:34   Yeah I use exactly the same thing. I use tower though strangely I think I'm still using a very old version of tower.

00:18:40   Because I don't need many of or any of the very more advanced features of tower.

00:18:47   I just use it. I have an old like when you could one of the old times you could buy once version that just like really it's for me it's about it's a tool for staging adding a commit message doing the occasional branch and merge.

00:18:59   And that's it. Like there's so many things that get can do.

00:19:02   But I think mostly of those run into when you're actually collaborating with other people.

00:19:08   You know if you're doing needing to do complicated rebasing and merging and things when you have lots of different people who are working on the same code base.

00:19:17   Because it's just me. I just use the basics but I find a tower to be just that much more. I don't know like straightforward and much less likely to make an error.

00:19:26   You know it's one of those funny things where Xcode has this built into it. But the degree to which that I only use Xcode is it's sometimes I use the like you can get the view the author's view which is slightly funny which is you're running it would use to put the command lines called get blame I think which I'm always to blame which is the slightly funny thing of myself.

00:19:46   It's essentially like how long ago did I make this mistake is the question I'm asking.

00:19:51   You know any development in a nutshell. I'm always to blame.

00:19:54   I ran into this recently where I was literally there was a bug I had and I you know it was it was like what was I thinking and I look back and it's like well I don't know like four year ago me thought this was a good idea.

00:20:06   Four year ago me was wrong. This was a bad idea. But it's that you that use that view inside of Xcode to kind of do that kind of comparisons where I'm inside the source code itself.

00:20:18   But you know comparing to a previous commit but mostly towers the place that I go to do that and I think in some ways as much as like Xcode you know actually commit and control stuff I find just it just awkward in a way that I can some ways I think it is a good thing to have a set a sort of a secondary tool that you use to actually commit it because I think it is useful and this is a theme that will come up a couple of times in the next two tools and talk about is I think it is useful to have it.

00:20:47   It is useful to have a context switch between I'm writing the code and here is the code that I want to become the canonical version of the code that it is good that you have to take a you know sort of take a take a breath take a moment go into another tool look at the code you just wrote you know the incident terms of you need to look at it stage it look at the diffs that you know what's actually changed and then commit it and then actually send send it in because inevitably what I will find.

00:21:16   Is that I'm catching issues or it's a debug code that shouldn't be in the shouldn't be in the actual thing that I commit to the repository but is in there that I may not catch if I was doing that commit inside of Xcode itself and so it's I use tower there's so many of these and I feel like.

00:21:36   Is probably based on which is the first one you ever used because you just like sort of like the you know which ways up in a first person shooter you know do you pull forward or pull back and it's like whatever way it was the first time is what you get used to and so I'm just used to get our because that's what I learned on and so I'm used to it that there's countless others of these and it's like using something is a great first step that I think is very important.

00:21:59   Yeah and I like the idea of like the context which is I realize that is kind of how I use it to that it is almost a way that I simulate code review by being one person that you know it's kind of hard to have someone else review the code I'm committing but I do use tower that way like that's one of the reasons why the diff you.

00:22:15   And then the built in integration between like you know the the checkboxes text stage things and the different everything that's also important because what I'm using it for is not just alright select all commit go I'm actually reviewing everything I commit before I commit it and.

00:22:30   Tower makes that both nice and easy but also you're right I do like having a different app that it kind of puts me into like a different mode like alright I'm here prepared everything now let me review what I prepared and then I will choose to commit this you know and maybe that's like a little bit maybe I should be using branches more and that maybe that's a little bit too heavy weight of a process but that's that's you know me but there's some data that's how I work now and and I love having the different tool for that and a tool that is so good at that and you're right like.

00:22:57   I don't use probably more than 10% of the features of tower because we're just working alone here and my needs are fairly simple but even even that 10% that I use is done really well so I am on the current like subscription priced one and I have no problem with that I think it's worth every penny.

00:23:19   And I think my next tool actually is very similar to the thing that you were just discussing in terms of like running your own code reviews when you're by yourself or don't have the formal structure that you need to do that another tool I found.

00:23:31   Super helpful is a thing called juxtapode and by the way links always in the show notes so if it's you know I don't need to spell it out but juxtapode is a tool which is about showing directory level diffs between different commits inside of your get to history.

00:23:50   If that makes any sense, so you can tap on any two commits, and it will show you all of the files that have changed between those two commits and how they've changed, which is something that I've gotten into the habit of using as a kind of code review process before.

00:24:05   I actually will publish an update I open up you know so we can get in tower I'm doing all of my like daily or you know feature by feature commits as I go and then when I'm actually getting ready to submit it to the App Store.

00:24:20   I open juxtapode tap the linear the last published commit and the commit that I'm about to try and publish and then I will go through you know it has a very convenient for you where you sort of say next next next and it just jumps you to all the different things that have changed.

00:24:35   And it's a way for me to make sure that I'm you know there's nothing silly in here and this is yet another context which is very helpful like it's a totally different app it's a different kind of mindset I'm in and I'm doing a code review I'm looking at these changes and saying is there something in here a that shouldn't be is there some debug code or some thing that was in there you know like I have definitely sometimes when I'm testing I'll go into like my membership management system, you know for my subscription, and I'll just be like return true for just like a second.

00:25:04   I'll just be like return true for does have membership. Yep, just because it makes it easier and I have caught myself using this this method to not publish that to the App Store, which would have been problematic bad bad and so like I've caught myself doing this because it's like that's a bit of code that should never have been committed, but it's just at some point it got you know caught up in some other.

00:25:24   commit and change, but it was this last line of defense between you know myself in the App Store. And so it's a really helpful tool for that another if you you know if you don't want to use this tool which I would recommend similarly you can do lots of things with you know in tower or something you can select to two commits, and then say like, you know, generate to diff, and then send that to a tool like kaleidoscope, which is a great diff viewer or just to file merge, which is like the very basic version but personally I find having a purpose built to.

00:25:53   This purpose built tool for this has been very helpful. And it's just that kind of, you know, it's, there's certain things that are great about being a one person or small development team.

00:26:03   The one of the things that's not great is that you don't have lots of eyes on the code you don't have this kind of better sort of checks and balances around, making sure that the right things are going in that, you know, it's sometimes when you look at, you know, sometimes I look at an implementation.

00:26:17   Outside of Xcode in a different context and in the scope of the entire change, and be like, Oh, that's not right, like, this was the this part of the code. I built at the when I started building this feature and forgot that I need to update it to what the final implementation

00:26:32   is, and things like that and so it's just sort of gives you this higher level perspective it's like you're zooming out on your code.

00:26:38   And it's a tool that I find super helpful, you know, to be a cat. He says you saved me from myself because I am always to blame. And as a result, I need to do all the things I can do to kind of catch my own mistakes.

00:26:50   This is really that's that's an interesting perspective like I've never done this but I you're right, I would probably like this. Again, this has been a very expensive episode. Thank you.

00:27:01   Oh, sure. And the nice thing is many of these tools are small in developers, you know, maybe many of them are maybe even listening to this episode. So if you are one of these people, I thank you very much for your service because it has been super helpful and these tools help me kind of, you know, get things just do my job better.

00:27:18   And that's the ultimately the main goal with any of these tools is to just have the, the core part of our work is writing the code. And then there's all these things that we can tack on to the sides to make it a little bit better to improve our code quality, a little bit more.

00:27:31   And it's wonderful when we have those. And so like these tools are just to help it help us in that way which is so wonderful. So the last thing that I wanted to mention this and that I've added into my source management, somewhat recently, is using Xcode cloud

00:27:46   as a continuous integration system, essentially. And I don't use this for continuous integration in the, you know, the testing sense where I'm having unit tests run on a regular basis and anything like that I don't use unit tests we've talked about that before.

00:28:02   You may have different perspective on that than I do, but that is what works for me. But I find very helpful with Xcode cloud is it saves me again, it's saving me from myself of it is giving me the confidence that whatever is in the App Store is something that is repeatable

00:28:19   in a way that isn't dependent on anything about my machine. Because one of the challenges that I run into sometimes I don't know if you run into this too, is because I'm the only one who's ever building the app. It's not like I'm in a team where there's a bunch of us who are all building it. And so if there was some file, which I didn't actually check in, and accidentally added to the project, but isn't you know, is referencing a file outside of the, you know, the git directory or something, which is something I've done many times. And then, you know, I go to a new machine,

00:28:48   I check out my project, and I try and build it and it won't build, because there's a file in a documents directory somewhere on the desktop or like weird places like that, that I just, you know, this is terrible behavior. But these are things that have happened to me in the past. And so I like Xcode cloud, not necessarily for most of its most essentially all I'm having it do is run a build from a particular commit. And it gives me kind of confidence that I would be able to recreate that build in the future with confidence and that it's you know, I'm not accidentally

00:29:17   leaving some file out or some resource out. And so I use it for that. I don't use it for anything else. You know, otherwise, it's fine. I don't you know, it's Xcode cloud isn't any great thing. I can't recommend it beyond it does the job.

00:29:29   That's interesting. I've literally never even considered using it because I kind of thought it was only about CI kind of uses that I wouldn't use. Maybe I'll check that out as well. Because I Yeah, I think for a simple use like that, I could probably give it a shot. Absolutely. Well, thank you everybody for listening. Enjoy the holidays and the new year and we will see you next year.

00:29:51   Sounds good. Bye.

00:29:53   [BLANK_AUDIO]