Show Notes
Guest
Sponsors
- Specialize in helping businesses build apps for iPhone, iPad, Mac and Apple Watch
- 10 years of experience developing for a variety of Apple platform
- Helping dev shops which lack experience with Apple platforms and Swift
We have an opening for sponsors
- Do you have a product or service which can target our ever growing community of developers as well as technology and business leaders?
New iPhone 11 Thoughts
- Camera Improvements
- Max vs Not-Max Size
- DSL vs iPhone
- Night Mode
Continuous Integration Issues with iOS
- Deployment Issues
- Cache Issues
- Continuous Integration 101
How to Get Started
- Removing Dependencies on People and Files
- Reproducible Anywhere
- Using Pull Requests or Code Reviews As Triggers
- Having Tests to Address Pain Points
- Dealing with Certificates and Provisioning Profiles
- HashiCorp
- Using Tools Like Fastlane
Comparing Services
- Cloud Services
- Bitrise - Focused on Mobile Development (Android and iOS)
- Travis-CI - Free Open Source (includes macOS)
- Circle-CI - Free Open Source (includes macOS)
- Self-Hosting
- Hybrid Solutions
- Differences between macOS and iOS building Speculid
Feedback Loops and CI
- Having Healthy Unit Tests
- Rapid Results through Automation
- Proofing Builds Before QA
Social Media
Transcription
Leo Dion (Host): Hey, Kyle, how are you doing?
[
00:00:01]
Kyle Newsome (Guest): I'm doing great. Thanks very much. It's unfortunately a slightly rainy day in Toronto here, but otherwise, a good mood.
[
00:00:07]
Leo Dion (Host): Yeah, same here. It's been a weird, cause. I don't know what Ontario's like, but Michigan. It's like one day was 80 degrees and then the next day dropped down to like 50 or 60
[
00:00:18] Oh, sorry. That's Fahrenheit. But you get what I mean.
[
00:00:20]
Kyle Newsome (Guest): It's okay. I lived a little bit in the States, so I like can do the conversion. I know that like 70 is nice and comfortable. Eighties getting to hot sixties like not too bad.
[
00:00:30]
Leo Dion (Host): I think fall's finally here. Yeah, so another sign of fall is the new iPhones. Did you get anyone iPhone?
[
00:00:38]
Kyle Newsome (Guest): I got the new iPhone 11 pro max. Which I've been waiting to upgrade for a few years. So this is like my first experience with like the X, you know, edge to edge screen as well.
[
00:00:49]
Leo Dion (Host): What do you think of it?
[
00:00:51]
Kyle Newsome (Guest): Honestly, so far I'm pretty impressed with it and as much as people have complained about how the three lenses look, I actually think it looks pretty nice.
[
00:00:58] They've done something good with the glass backing, so it looks pretty refined, so I can't really complain about that. I've played around with the camera and the night photography a little bit and it's pretty cool to see how much it can capture in low light.
[
00:01:11]
Leo Dion (Host): What did you have previously?
[
00:01:13]
Kyle Newsome (Guest): Previously I had the iPhone seven plus.
[
00:01:17]
Leo Dion (Host): Okay. And do you really like the max size?
[
00:01:19]
Kyle Newsome (Guest): You know, like I'm used to it in my hand now, so I can't complain. You know, for the longest time I didn't think that I would like it, but I believe when the seven plus was the only one that had the two cameras, and I was really interested in that functionality.
[
00:01:32] So I upgraded to the largest one, and now I'm kind of used to it. But I think that both the regular size and the max size are both pretty good in terms of screen size you got. I'm just sort of used to this in my hand and I liked that when they at least made the change from the old ones to the new ones, they kept the size of the same and then just you got more screen space so it feels exactly the same as my old phone in my hand.
[
00:01:56]
Leo Dion (Host): Yeah, I was a plus size user and I loved that. And then I went to the 10s, not max. And I don't feel like I miss the size because the screen size is pretty much the same. But I was just curious, like if you see like a big advantage with the max.
[
00:02:12]
Kyle Newsome (Guest): No, I don't really think so. I guess it gets a little bit longer battery life, which is always nice, but otherwise, yeah, they both look pretty nice.
[
00:02:20] I was sort of on the fence whether to go with one or the other, but I think ultimately it was kind of like hand feel that I just like, I was used to the weight and everything, so I just wanted to make a seamless transition like that.
[
00:02:30] And the big selling point for me with the plus was the extra lens. And like now we don't have that.
[
00:02:35]
Leo Dion (Host): Like the extra selling point isn't there because he can pretty much get that with the regular pro. So like that was my big thing was I just want a really good camera. Like I don't have cameras anymore. Like I think I sold my DSLR and my other digital cameras a couple of years ago cause I wasn't really using them.
[
00:02:54] And like the convenience of having an iPhone was always worthwhile to me. And like the dual camera, like I'm a. I know people don't really care for portrait mode, but I use portrait mode all the time when I'm taking pictures with my family and things like that, and I like it a lot.
[
00:03:08]
Kyle Newsome (Guest): It's funny that you just sold your DSLR and I just bought a mirrorless camera because I was interested actually mostly for video recording purposes, which i think is actually where there's the biggest difference between what these phone cameras can do and what the regular cameras can do, because they can do a lot of post-processing on like one image, but doing things like getting that portrait mode depth of field effect per video is not something they're really capable of today.
[
00:03:33]
Leo Dion (Host): Yeah. Not now.
[
00:03:34]
Kyle Newsome (Guest): That aside, I mean, yeah. It's just like the camera on your phone is just so much more of a utility for everyday use. So many of the pictures that I take with my phone or just to like to help me maybe remember a password that was written on a note somewhere that I wanted, or just general utility.
[
00:03:51] They're not very interesting pictures, but I would never do that with a mirrorless camera. Obviously not convenient at all.
[
00:03:58]
Leo Dion (Host): Yeah. Really liking these cameras on these phones. So what's your opinion of like night mode.
[
00:04:03]
Kyle Newsome (Guest): You know, it wasn't the operating the way I thought. I thought it was just going to basically do a whole bunch of post-processing on the image and know how to like extract the right colors, but it actually does do like a long shutter effect, which surprised me a little bit.
[
00:04:18] I wasn't ready to see that. But it's interesting. So I think depending on the amount of light in the room, it kind of auto suggests about how long it's going to do the shutter effect for and seems like the longest it goes for is maybe four seconds.
[
00:04:32]
Kyle Newsome (Guest): What I find interesting about it though, like I'm curious about what it's doing, because obviously if you are holding the shutter open for four seconds and you're just doing it like handheld, you're probably not holding it perfectly still.
[
00:04:43] So, I wonder, you know, what other sorts of machine learning and things they're applying after the fact to make sure it still comes out like a crisp photo, but it's grabbed more information about color simultaneously. I can't say I've really looked into exactly what it's doing, but that was the experience I got from it.
[
00:05:01] Anyway, I thought it was going to be just Oh snap and then it'll post-process and like bring out all this color, but it actually does try to record more light for longer.
[
00:05:09]
Leo Dion (Host): Okay. So that's what it's doing. So it's basically keeping the shutter open to get more light while at the same time doing some ML stuff to like figure out what's the best photo to use or what's the best picture to use. Interesting.
[
00:05:21]
Kyle Newsome (Guest): For sure.
[
00:05:21]
Leo Dion (Host): That's pretty cool. So before we deep dive into continuous integration, you want to tell people a little bit about yourself.
[
00:05:28]
Kyle Newsome (Guest): Sure. I'm terrible at talking about myself or building myself up. I'm an iOS developer in Toronto. I've also done a lot of full stack development over the years, and so I've done backend and JavaScript and PHP, but I did Objective-C back in the day and then got a little tired of it, did some more Javascript just because the language, I think was more pleasant to use.
[
00:05:53] And then Swift came out and they open sourced it, and then it just sorta like turned all my attention back to iOS again. And then I've just been going straight with iOS since, but even some of my continuous integration experience actually came first from doing it on the web side, deploying web and backend Java script applications.
[
00:06:12] And then when I came back to the iOS world, realized I was joining a lot of teams that weren't doing much with that. And so. Really started trying to learn more about continuous integration on the iOS side and championing that at the places I was working.
[
00:06:25]
Leo Dion (Host): And where are you working right now?
[
00:06:26]
Kyle Newsome (Guest): So right now I am consulting with Deloitte for Loblaw digital.
[
00:06:32] Loblaws is like the Walmart of Canada, effectively. And I work with their loyalty, their PC optimum points application, which is. I believe the biggest loyalty program in Canada as well. So like when you go out and buy groceries or you go to the pharmacy, they're constantly collecting points and they're giving you bonuses and things.
[
00:06:50] So yeah, that's the application I'm working with right now.
[
00:06:53]
Leo Dion (Host): What have you found is the biggest difference with CI or continuous integration on iOS. And I'm assuming we're just talking about iOS as opposed to web development.
[
00:07:05]
Kyle Newsome (Guest): I mean, I think probably the deployment factor is a huge thing, which isn't exactly like, it's the last step of the continuous integration process, like right as you deploy, but going even beyond continuous integration, there's like continuous integration, continuous deployment.
[
00:07:20] And continuous deployment is really like, you're always able to continuously like push out the latest version of your application, you know, multiple times per day even, which is not really possible from an iOS perspective. We have to be a little more meticulous because we go through the Apple review process.
[
00:07:36] A lot of companies are, you know, probably deploying maybe at most once a week. I don't hear of many who are deploying more than once a week. There's probably some out there, so it's a little bit slower. That's one of the big things. And I think even just some of the tasks you actually do, because continuous integration sort of starts first of all with like build, test, deploy steps, which are kind of just the core steps to getting your application built, making sure it's actually functioning properly, and then sending it out to the world.
[
00:08:04] But beyond that, we tend to add a lot of additional tasks to kind of make sure that we're. As much as possible, automating our entire process. So some of those additional steps are probably quite different depending on web or iOS. Like I remember on web, I had to be constantly clearing cachees out, you know, clearing cachees out from CDNs or content delivery networks.
[
00:08:27] And I don't have to do that as much on an iOS side, but there's other tasks I might do instead, like, you know, automatically generate screenshots or something like that.
[
00:08:36]
Leo Dion (Host): All right. So let me do my best attempt at trying to explain what CI is and then you let me know what parts I'm missing. So continuous integration is the idea of, as you make changes to the code, you are running various tests, not just like unit tests, but also like integration testing, things like that.
[
00:08:58] And also making sure that the app can be easily deployed. And usually you're doing it on some central server somewhere, either locally or in the cloud. So that way you can best recreate the situations for where an app will actually be running. And I'm saying this because you have, like for server side stuff, it's pretty easy because you can just run on the actual server and recreate that situation pretty easily whereas with client applications, you need to like actually recreate the client atmosphere in the client environment in order to do that. But is that like a good description of continuous integration?
[
00:09:35]
Kyle Newsome (Guest): Yeah, I think that's a fairly good description of it.
[
00:09:38]
Leo Dion (Host): What am I missing?
[
00:09:39]
Kyle Newsome (Guest): It's not very often that people ask me to explain it and sort of formal terms, so I'm probably usually speaking about it from the benefits perspective.
[
00:09:49] But one of the things I guess I take away from it sort of from, I guess a more philosophical perspective, is like there's many things you do to sort of make sure that your app is deployment ready and some of those things can be automated and some of them can't. The ones that you can automate, you should automate and you should be doing them every single time, every single day.
[
00:10:11]
Leo Dion (Host): Yeah. There we go. And I think that's it. It's like regression testing where you're like testing old features and making sure they're continually working and doing it every time in a repeated basis. And when we talk deployment, we're talking about like taking that app and putting it on an actual machine, whether that's your server for server side app or an iPhone or iOS simulator in a lot of cases, and actually testing it on that device and seeing if the app is working.
[
00:10:36]
Kyle Newsome (Guest): Absolutely.
[
00:10:37]
Leo Dion (Host): If you were going to convince somebody who like has never done continuous integration, especially in an iOS application, what would you say to that person or to convince them that like, yeah, you really need to get started on getting your iPhone app running, some sort of continuous integration whenever a new release is about to come out in the app store.
[
00:10:56]
Kyle Newsome (Guest): Yeah, I mean, I think certainly on some teams you just really kind of help identify the pain points they're feeling or you know, something goes wrong and then you do a retrospective on like, why did this happen and how could we prevent it in the future? And then it's really easy to say like, Oh, well see, I could fix that coming from the web, like the example I used before with cache clearing, that was a super easy.
[
00:11:18] Thing to point out at one company I worked with, like we were just forgetting the clear caches, and then people weren't pulling down the latest version of the application, or they were pulling down the latest JavaScript, but not getting the latest CSS and so they weren't seeing things correctly. So that was, you know, a good pain point from a web perspective
[
00:11:35] On iOS, one team I worked with, they just had one developer who could deploy the app and had all the certificates and was ready to go and he was also responsible cause one of the things when you deploy an iOS application is you always have to bump the build version, which is like the most boring change you have to make to your application is increment you know, the build number every time.
[
00:11:56]
Leo Dion (Host): But it's easily forgettable.
[
00:11:58]
Kyle Newsome (Guest): Oh, super easy to forget. Right. And that's what was happening in this case was that the developer would sometimes deploy it, he'd forget to bump the build number. So we'd go through the whole deployment process and that build process takes sometimes 20-30 minutes to get that, especially if you include the uploading process to Apple's TestFlight and the processing time before they give you feedback.
[
00:12:20] That's actually, you know, that's sometimes an hour to an hour and a half. So you know, having to kind of realize that the very end of that. Oops! we forgot to increment the build number let's go back. In this case too he actually unfortunately had just been going through ACL surgery too. So he wasn't always available in the office cause he was going to a physiotherapist.
[
00:12:41] So like his availability wasn't good. So there, you know, the pain points between relying on this one guy who was in the middle of, you know, dealing with ACL surgery and recovering from that and having that point of failure of the build number. Those were two big pain points and good reasons to move to CI.
[
00:12:57] So, yeah, I guess in summary, find the pain points. It's probably hard for me to pick someone up off the street who doesn't have a problem already and tell them that continuous integration is going to solve things. But once people have those pains, I think it's really, really easy to change their mind or convinced them to start using it.
[
00:13:16]
Leo Dion (Host): It's one of those cases where it's like you don't realize the pain until your employee has to be out for a few weeks, or what was it - somebody who was like on paternity leave at some company and like they're quickly trying to hire somebody to like fill the gap until he gets back. And it's this like one of those situations where you don't run into it until you run into an issue and you're like, okay, now I need to set up some sort of system with continuous integration in order to make sure that deployments are easy and things like that.
[
00:13:42] Yeah. What are would be some like first steps in order to get started? Like what would you say is like the bare minimum as far as getting continuous integration set up?
[
00:13:51]
MarkerKyle Newsome (Guest): Yeah, so I mean, one of the first things you probably want to be thinking about is eliminating any local dependencies you have, right. If someone can only run that from their machine there's a reason why, right? Something is local to only their machine that isn't available to others. And a lot of cases with iOS, it's mainly about the certificates and the profiles that are on that computer that the others don't have. So you're going to try to either you know, make sure that your CI system has that stuff now, or ultimately, yeah, you're just trying to make sure that this is something that you can reproduce pretty much anywhere.
[
00:14:29] You know, that people haven't, you know, have too many local scripts or anything like that. Running that would prevent you from duplicating the build experience somewhere else. So that's one of the first things that you can do if you have a tool like fastlane that you're using already. Cause sometimes some teams are actually using fastlane, to do tasks for themselves, but they haven't gotten themselves on CI yet, or you're trying to sort of slowly work your way there.
[
00:14:54] I think fastlane is a good tool that can start getting you ready for that because fast lane is all about doing tasks related to iOS stuff for you automatically, and you can run fastlane commands in CI. So you could even have your build, test, deploy phases running from your local machine through fastlane.
[
00:15:12] And then when you put it on CI, you're basically just telling CI to run those same commands you were locally. So that can make it very easy to make the transition. If you already have a pull request code review process going on, that's probably one of the most important places to start integrating your CI server because every time you put code up for review, then it can go through this system and some of that feedback can be automated against it.
[
00:15:39] So I'd say if a team doesn't have any sort of pull requests or code review process yet, they should get that up and running first. Even if they don't do super thorough examinations of the code in those pull requests, at least get the CI starting to do that for them. I think those are some good first steps to getting ready for CI.
[
00:15:59]
Leo Dion (Host): So let's sit back for a little bit and talk about each of those components, like a pull request and a code review process. What does that mean exactly?
[
00:16:06]
Kyle Newsome (Guest): So it's very easy for me to just merge code into, say, the main code base that maybe I'm collaborating on with others. But if I just sort of get to directly make changes to the code.
[
00:16:20] No one else is, you know, reviewing that in advance for any sort of mistakes or giving me feedback on how maybe I can improve those changes to the code base. And not having a process in place to do something like that is probably prone to causing error or catching problems later. So if you use anything like GitHub, GitLab, Bitbucket, they all have the ability to do a pull request process, which basically means you work on your code in sort of a separate branch and get terms, you know, from the main master code base, and then you make a formal request to merge your branch of code into your master or into maybe your development branch where you're working on things.
[
00:17:03] And before that merge actually happens, someone actually has to approve it. You know, someone has to actually go into, say if you're using GitHub, going to GitHub and hit the approve button, and then the code can be merged from there.
[
00:17:17] So. You know, the pull request process is the first step to, I think, creating a code review process. Like I said, you know, even if you weren't reviewing the code changes, but you at least were going through a formal process of putting up a request to change the code and someone else was approving it, that would be the first step.
[
00:17:36] And then from there you'd probably want to influence your culture to like spend more time actually looking at the code. I'm getting feedback on it. And then integrating CI as well. And I can certainly talk about things. See I can do for your code review processes as well later.
[
00:17:51]
Leo Dion (Host): So basically like you have unit tests, obviously that need to be run and we did a whole episode on unit tests a few months ago, which you can check out. But like a pull request, that's where you'd have like your branch or your feature, and then you want to make sure to merge it into a specific version or master branch, and then somebody will go ahead and approve that. Does that sound about right?
[
00:18:12]
Leo Dion (Host): and I think like one of the biggest challenges, and you just touched upon this, was the local dependencies and the certificates and profiles and things like that. That seems like one of the biggest challenges that I've faced with getting any sort of continuous integration set up is getting those certificates on some sort of server or putting them into the repo, but also in a way that it's secure.
[
00:18:36] Because obviously you don't want anybody off the street to come in and get your repo and then put your app into the app store, but like there's a specific process for setting that up, right, where you can like encrypt the certificate, but then like have the password on the CI so that way you can decrypt it while at the same time, like making it secure, but also letting the CI system be able to approve and deploy an app.
[
00:19:01]
Kyle Newsome (Guest): Yeah, absolutely. You ultimately want to expose. You're a certificate to as few people as possible. Ideally, you don't really want to be distributing these widely. So yeah, the fewer number of people that have that privileged, right - the better. And I mean, depending on the size of the team, you know, in enterprise situations, like I was working with a bank earlier this year.
[
00:19:24] And they don't want the certificates or the profiles available to the developers at all. In fact, they have policies at the bank that, you know, a developer can't end to end both build the application and get it deployed to the store. There's actually multiple steps between to sort of make sure no one gets that much power.
[
00:19:41]
Leo Dion (Host): If you can say, I guess, how do they get around that?
[
00:19:44]
Kyle Newsome (Guest): Well, I mean, ultimately they have a dev ops team, and so these are, you know, operations guys who are sort of full time dedicated to building the applications and getting things configured properly so they get some access to this stuff. Although those certificates and profiles are still kept in a vault.
[
00:20:02] There's like HashiCorp Vault is a product, I don't know if you're familiar with it, but it's just sort of a secure key store. So their CI system access is things from this vault, but they have permissions to work with the Vault and the CI process. But yeah, we weren't even really super involved. And that, you know, I could make some requests to change some of the CI workflows, but dev ops always was approving those.
[
00:20:26] I couldn't change those myself. So interesting. It was just sort of one layer away from me that had the access ultimately.
[
00:20:33]
Leo Dion (Host): So if someone were to get started with CI, what service would you recommend first and foremost, and how do each differentiate themselves?
[
00:20:44]
Kyle Newsome (Guest): Right. Well, I think. My suggestion would maybe depend on, you know, whether, like if we're talking about just getting started with your first CI ever and you haven't done this at all, and we're talking about iOS, I've certainly enjoyed using BitRise because BitRise is very iOS and Android focused.
[
00:21:06] When they first came out, they were even just iOS focused. And I found that the flow of getting started with them, they would, you know, do additional analysis on your project and try to sort of get it auto configured for you every time there's new versions of Xcode, they really try to be the first to get those beta versions of Xcode out onto their systems.
[
00:21:28] So I found that they just, they have a very, like iOS is first class kind of attitude, which I like. Things like Travis CI and CircleCI are both. I guess I don't have much to differentiate between those two. They might have different price points, some of these different services. Also, I know like let's say you're doing an open source project that you want to put through CI. I think Travis or Circle might be better for that because they have a better free tier.
[
00:21:56]
Leo Dion (Host): Yup, yep. I've used Travis CI and we'll get into it a little bit, but I still haven't figured it out with Circle CI, and I've actually talked to some of the folks there, but Travis also does Mac apps. Which we'll talk about in a little bit.
[
00:22:09] I think Circle supports that, but I haven't quite figured that out. It seems like the big hurdle with a lot of these surfaces, spoiler alert, is that you actually need a Mac to like run this stuff, which is a huge cost burden to any company in the cloud because they literally, like if you look at somebody like MacStadium, like you literally have to have a rack of Mac pros or Mac minis or iMac pros or whatever to like from this stuff. It's not like even with the VM, you need to run this stuff on a Mac. So I think like that's one of the big burdens with a lot of these services is like a lot of your CI services, they're going to be fine at doing like your Ruby or your Node JS and even some of the.net stuff, but like once you actually need a piece of like Mac hardware to do it, that kind of makes it more of a challenge cost-wise to these companies
[
00:23:00]
Kyle Newsome (Guest): for sure. And yeah, performance of some of these things, I guess when they're like running inside of virtual machines may not be as good as if you say got a really high end Mac mini or something and ran it locally because that is another option is self hosting, which we haven't touched on yet.
[
00:23:17] And I don't really recommend self hosting for some reasons I'll bring up in a second, but just exploring what that means. You know, this is buying a computer to sort of have, you know, in your office that is connected with the system and running those things locally on your own computer. It meant you could do that either through Jenkins, which is a very popular one, or Xcode server.
[
00:23:40] Apple has their own X code server. Although I don't know anyone who uses Xcode server. I don't know if you have worked with many companies that use it. I haven't found it to be very good personally.
[
00:23:50]
Leo Dion (Host): It's okay. So here's my situation that I've run into is I have a Mac app Speculid, which is for building app icons from SVG files or image sets, whatever. Okay.
[
00:24:02] So like with this app, I've run into situations, especially early on where I needed to like actually test it on different like Mac environments and one thing you learn with like Mac development, I find one of the biggest challenges is that you don't have like reset simulator on the Mac, right? So I ended up sending up like a Virtual Box VM on my iMac to run Mojave or whatever is the latest OS and putting Xcode server on it and it works and it's like a great way for me to just like do reset simulator essentially by reverting to like a snapshot on a VM and that's what I've been using whenever I need to like test. There's been all sorts of weird issues like dependencies that have been installed or like I totally forgot about how different countries do decimal points differently and like all sorts of weird issues I've run into.
[
00:24:54] That has been to my benefit with the CIA stuff. So like XCode server worked. It was fine. It was a great, was it as easy to set up as like Travis, which is probably the other situation I've run into? No, I don't think so. And of course it's like not the fastest, but it works.
[
00:25:11]
Kyle Newsome (Guest): It gets the steps done for sure.
[
00:25:13] Like it's not pretty, it just sorta does the basics versus something like, I know BitRise. I mean I really liked their interface cause I think it's nice looking and it's something, I mean I know some companies, you know, even have sort of a culture of trying to make sure that sort of the build and whether it's kind of staying green is, you know, the developers are sort of aware of that all time.
[
00:25:34] So maybe you have a dashboard that's kind of giving you an update on what your CI is and is it staying green. So sometimes using a nice CI that actually makes that look kind of nice to have, but it's not really the most important thing as just being able to run the steps.
[
00:25:48]
Leo Dion (Host): And then integration with the Xcode is really good. And it was just a matter of like, the issue I ran into was just, I was using Travis CI cause Travis CI is free for open source projects and like it worked fine, but there was just a lot of things that I couldn't really like get into the guts of a Mac that I could do with the VM and Xcode server. So that's why I ended up getting that set up.
[
00:26:09] And Travis CI doesn't necessarily have the latest betas installed for a lot of reasons. So I was able to like set up a CI system with whatever was the latest beta at that time.
[
00:26:20]
Kyle Newsome (Guest): Yeah. For ultimate sort of like power and control, having things, you know, self hosting is the way to go. For sure. You can do things just different that may not be possible.
[
00:26:31] Like even the kinds of like caching can be different on some of these different services as well. I know that BitRise has some caching capabilities, but there might be a limit to the size of the cache. I've heard recently, I think maybe Circle CI didn't have a cache. Okay. Someone was telling me they were using either Travis or Circle and they couldn't cache the same way that BitRise could anyway.
[
00:26:52]
Leo Dion (Host): And when you say cache, what exactly are you talking about?
[
00:26:55]
Kyle Newsome (Guest): Just like holding onto some artifacts. Like, you know, sometimes you have dependencies such a, you know, a lot of people use CocoaPods
[
00:27:02]
Leo Dion (Host): and you know, want to rebuild and refinish those dependencies every single time. Is that what you mean?
[
00:27:07]
Kyle Newsome (Guest): For sure.
[
00:27:08]
Kyle Newsome (Guest): Exactly. That can certainly add to the time that it takes to get through your whole CI process.
[
00:27:13]
Leo Dion (Host): Yeah, that sounds like a lot. We had Abby Jackson on last week. We talked about modularization but she said like one of the big benefits is build times. So it's not something I really think about, but like if you're doing caching like what you're talking about, but that makes total sense. That's gonna like save a ton of time on your builds
[
00:27:30]
Kyle Newsome (Guest): for sure. One other thing with self hosting is the benefits is you get all the control, but the downsides is nobody's going to do that for you, so you become responsible for it. So I definitely think when a company decides whether they want to use a service or want to self host. They should really think about the dev ops costs associated with that in particular.
[
00:27:53]
Kyle Newsome (Guest): Because if there's a beta, you're going to be responsible for getting that beta up and running. And if you realize that all of a sudden your team is growing and you need more machines, then you need to go buy and provision all of those machines and then get them collaborating together on a farm yourself again.
[
00:28:10] And that is one thing that's really nice about using a service is that your team grows and you just buy the next tier or pay, you know, $5 more per month or whatever it costs per developer to grow your team like that. So these third party services scale very nicely. And yeah, the dev ops costs, you should really strongly consider before self hosting, I think for sure.
[
00:28:31]
Leo Dion (Host): Yeah. Do you have like an opinion on using a service like MacStadium because the only reason I see it might be important for self hosting is security reasons or like Mac development where you like actually need an actual machine to like play around essentially with the computer itself and get those settings exactly the way you want it like otherwise, I don't see much of a reason to use self hosting service right.
[
00:28:56]
Kyle Newsome (Guest): Yeah. Unless you just, you want to do something really different. There is one organization I was working with, I can't talk too much about this one, but they wanted to be running a lot of different types of virtual - like they wanted to kind of virtualize their whole system during the CI process.
[
00:29:13] So the servers that were being communicated with were all being run from that server as well. And so they were looking at moving towards self hosting to get some of those features that they couldn't get from doing it through these third party services. Because there are some limitations to just like how far you can configure these things.
[
00:29:32]
Leo Dion (Host): Exactly, exactly.
[
00:29:33]
Kyle Newsome (Guest): It's like I sort of temporary container. They boot up and they run some things and then they tear it down for you. Right, so you only get so much in that container.
[
00:29:41]
Leo Dion (Host): Like I'd almost suggest maybe looking at something like MacStadium like somewhere it's almost like a compromise in between, like what is it - it's like a layer of abstraction from running your own server locally, but not quite as abstract as like Travis CI or Circle or a BitRise because then like you don't have to do the IT work, but you still have to set up though less. So like that might be a decent compromise in some situations.
[
00:30:07]
Kyle Newsome (Guest): So I don't know MacStadium super well if I understand, it's sort of letting you actually get full access to a Mac machine.
[
00:30:14]
Kyle Newsome (Guest): Remotely. Yeah.
[
00:30:15]
Leo Dion (Host): Yeah. They just have like. Mac minis that they run in their separate locations that you have access to. And I've done, like I've done the virtual box setup with getting a Mac server set up in virtual box. That way I can like tear it down and bring it back up, but that's only for like small apps that I've done.
[
00:30:32] And then I'll post a link to my YouTube video about how I got Speculid set up on Travis CI, which is a Mac app and how I got that to work as well.
[
00:30:41] So I wanted to jump in and talk a little bit more about Fastlane, which we got into and some of the tooling there, but you said you wanted to mention something about feedback loop and how feedback loops can be some issues you can run into with continuous integration.
[
00:30:55] Do you want to explain that a little bit?
[
00:30:57]
Kyle Newsome (Guest): Sure. Continuous integration is something that I see as fitting as one of your feedback loops or sort of touch points, but to explain first a little bit about what the feedback loop is. You know, developer's going to get a piece of work in and then they're going to need to iterate on that several times before it goes out the door.
[
00:31:14] And that iteration cycle, I would call your feedback loop and how long it takes for you to get feedback on something, whether it's working for you or not. You want to try to make that the smallest amount of time possible. Right?
[
00:31:27] So there's lots of different points of feedback that we have. We're getting feedback as we're continuously like developing on something, running it, checking if it's working.
[
00:31:36] We're getting feedback when we run unit tests, when we run UI tests, we're getting feedback when we pass things to the QA team and when we're say, getting approval from our designers and our product owners, but each one of these points of feedback takes a certain amount of time to like send it out and then get feedback and know whether to iterate on it further or whether you've sort of met the requirements.
[
00:31:58] So I think we want to try to think about how well A - you know, some of the touch points with people, we want to make sure that we have like fast access to them and can turn around feedback quickly, but we also want to try to organize things in a way where the tightest feedback loops are sort of available to us first.
[
00:32:14] We get those working and then we slowly work our way outward into the things that take longer and longer to get feedback from. So the first things are the development you're doing as you're iterating on it. Unit tests, I think, are a great way to get fast feedback on something as well. UI tests, those tend to get a little bit slower.
[
00:32:34] Now, sometimes some UI tests suites, you know, may even take hours to run. So those are not necessarily the greatest way to get feedback. Those are something that might fit well in say, your continuous integration. Right. And I think this, again, so this is coming back to earlier, just like why continuous integration is important and sort of making sure that steps, like say running your UI tests don't get missed before you say go to QA or maybe get your final approvals.
[
00:33:02] Because those types of feedback to take even longer sometimes than running some of those tests earlier, right. So I think that's where continuous integration fits in ultimately, is that you kind of want to make sure there's some steps that's making sure that's doing that proofing and giving you feedback as soon as possible.
[
00:33:17] Because sometimes you ship something to QA and QA can't look at it until tomorrow, and then, you know, four hours later, then they give you the feedback and then you iterate on it. So really you want to be sending things to QA as perfect as possible. So yeah, again, just thinking about that feedback loop, what kinds of things can I get the feedback on the fastest to help me with my iterations before I go to the slowest things. CI, I think kind of fits somewhere nicely in the middle, like after I've done my work, but before I start sharing it out with the greater team, I want to have my continuous integration feedback loop in place.
[
00:33:53]
Leo Dion (Host): So you're saying like when it comes to the pipeline between the developer and QA, continuous integration kind of fits in there to kind of facilitate and help QA give you feedback, but on a much quicker timeline. Does that sound right?
[
00:34:08]
Kyle Newsome (Guest): Yeah, absolutely, and I mean continuous integration can even help with the pull requests or code review process itself.
[
00:34:15] Like I'm really big on automating as much analysis as possible really so that even when it comes to requesting that your peers review code. They're not, you know, nitpicking on - Oh, you left it to do comment in here and Oh your spacing isn't quite right here. Cause those aren't really exciting things. And I don't think they contribute super positively to the culture to be nitpicking at code where you really want to automate those things.
[
00:34:39] To help just kind of make sure everyone's code is in line and then let the team work on some of the higher level analysis of like, Oh, this is an interesting implementation, but if you use this trick, you might save, you know, five lines of code or something like that. Like that's the kind of feedback I want from peers.
[
00:34:54] So CI, yeah. Can help do some QA before you get to your QA, and it can also help you do some code review before it even gets to your peers.
[
00:35:01]
Leo Dion (Host): Really interesting. I like that a lot. And then I guess let's just touch on it, but like the elephant in the room to a lot of this setup with continuous integration is fastlane.
[
00:35:11] And I don't know if there's any other apps you'd recommend, but like I met Felix, I want to say like about a year and a half ago, and he was super nice. He's super into security now. I don't know if you've watched or gone to any of his talks, but he's really into. Man in the middle of tax where you can like have software that kind of listens into your traffic or all that kind of stuff, which I think is super important.
[
00:35:34] We don't really talk much about, but like Fastlane has been around. I don't know since when, but it's definitely automated. A lot of like the app store API stuff and a few of the other things. What other benefits does Fastlane have, and especially when it comes to continuous integration, what does it bring to the table?
[
00:35:53]
Kyle Newsome (Guest): Yeah, so I mean, Fastlane has like a ton of different types of tasks you can run with it.
[
00:35:59]
Leo Dion (Host): And it's available for both iPhone apps and Android apps, correct?
[
00:36:03]
Kyle Newsome (Guest): Yes, it was iOS support first, but I believe it does all sorts of Android stuff now as well, too. But I don't feel like it's just added so many different tasks and all sorts of ways to communicate also with the Apple or like App Store Connect in order to help like get team members set up so it can do things even sort of outside your system of helping you just get your team set up. I recently worked on a team that had a good fast lane setup for helping people get. The configurations they needed, like pull down the development profiles that they needed just to run things on the simulator, sort of all automatically.
[
00:36:38] That was something I actually hadn't seen Fastlane used before. So even beyond CIA, it just has tasks that are really useful to automate for an iOS team that maybe don't need to run more than every time you add a new developer to the team. But beyond that also, yeah, just full of lots of different tasks you can do to build, test the application on pure version number, take screenshots.
[
00:36:59] And one other. I think very important thing to think about. Sometimes when you set up what's going to be happening in your continuous integration process, you can sort of choose - Oh, am I going to write the tasks that it's going to do? Am I going to configure those in the continuous integration system itself, or am I going to try to push as much of that configuration into my code repository, like commands for Fastlane to run.
[
00:37:26] And the benefit of keeping it in your repository is that the developers have more control over it. Like I mentioned that example earlier where when I was working with a bank, the dev ops team was in charge of the CI, so really we wanted to put as much into Fastlane as possible because that's where we had more control over changing what targets were being built, et cetera, versus if we had put that into the CI system, we would have had to go through a much slower process in order to make changes to our build configurations.
[
00:37:56] So yeah, putting things in Fastlane, I think helps developers keeping control of it. And you can also think about vendor lock-in.
[
00:38:03] If you were saying, moving between. Maybe you're using a third party service and then you decided - Hey, I want to actually move to self hosting, or vice versa. Or say you're using Travis and then you decide, no, I'd prefer BitRise. If you have most of your commands in Fastlane, it's going to be easier to move between these services because you've used far less of the vendor oriented configurations.
[
00:38:28]
Leo Dion (Host): Yeah. You talked to a lot of people in server-side development, and I'll tell you, like vendor lock in has become a big deal on their end. So it's only a microcosm of that issue when it comes to like continuous integration services when it comes to iOS development so I can totally understand that.
[
00:38:43]
Kyle Newsome (Guest): Yeah vendor lock in for like server side is way, way more of a problem then what I'm talking about. But I mean, it's not even so much vendor lock in. It's just like, Oh - it's going to take me a little bit of time to get from this service to this service. But like the server side, people are dealing with like serious, like costs associated with moving their services over like nothing we see on our side.
[
00:39:02]
Leo Dion (Host): Right, exactly. Well, thank you so much for coming on. The show is really, really great to talk about this topic. I think it's super important and I'm glad we covered it. Going back server-side people have been doing this for awhile, but like when it comes to iOS stuff, I think, and watch and Mac and TV there, I always forget that one.
[
00:39:21] I think this is a topic along with a test driven development that people should really engage with and integrate into their team. And where can people find you?
[
00:39:29]
Kyle Newsome (Guest): On Twitter? I guess @kylnew - it's just like the first three letters of my first name, first three letters of my last name. Other than that.
[
00:39:36] Also, I have a website, pyrus.io that I do consulting through. I blog on there occasionally. I haven't blogged recently. Otherwise I'm just in the community in Toronto trying to run meetups and ran the SwiftTO conference just this past summer, which you spoke at about Vapor. Yeah.
[
00:39:57] You can find me around Toronto, go to a Toronto Swift meetup and you'll probably see me there.
[
00:40:01]
Leo Dion (Host): Yes. And if you miss a meetup, you're doing the video work on those, aren't you?
[
00:40:06]
Kyle Newsome (Guest): Yeah. As much as possible. And trying to film all the meetups going on in Toronto, just because we did a survey from the conference and got feedback from people and definitely saw from even the conference feedback that like people find it hard sometimes to come into the city. Unless I'd say I like a full day of content. So trying to find ways to distribute more video content so that it's available to those who can't make it downtown for our meetups.
[
00:40:31]
Leo Dion (Host): I'd love to check those out. And Swift Toronto was a great conference. so we'll see if you guys do it again. So
[
00:40:39]
Kyle Newsome (Guest): hopefully I'll try to polish up the details.
[
00:40:41]
Leo Dion (Host): Yeah, yeah. Fantastic. Thanks again for joining us on this episode and we look forward to talking to you in a couple of weeks. Thanks again.
[
00:40:51]
Kyle Newsome (Guest): Take care. Thank you.
Thanks to our monthly supporters
- Holly Borla
- Bertram Eber
- Edward Sanchez
- Satoshi Mitsumori
- Steven Lipton
★ Support this podcast on Patreon ★