Open Finder and browse to your workspace directory, then press Cmd+2 to activate list view.Scroll through the list of targets, select iOS UI Testing Bundle, then click Next and Finish.Go to the File menu and choose New > Target.Here’s where things can get confusing, so rather than follow Fastlane’s instructions I suggest you follow these instead: Next it will read through your project configuration to figure out the next steps. That’s fine, so press enter once to let it continue. Fastlane will begin the process of walking you through the configuration process to automate your screenshot generation, but unless you like confusing yourself I strongly recommend you ignore what it says and read this guide instead.įirst, Fastlane will say it’s going to generate two helper files that make its screenshot hooks work. We’re going to start with screenshots, please press 1 and press enter. Fastlane will think for a couple of seconds, then detect Paraphrase.xcworkspace and offer some options for things it can automate. To get started, change into your workspace directory – the one where you can see Paraphrase.xcworkspace. And when your UI design changes you need to redo those screenshots – “tedious” doesn’t really begin to describe it.įastlane can take screenshots for us automatically, and it uses a simple but smart approach: you write UI tests that launch your app and manipulate it however you want, then insert special commands to trigger a screenshot. This usually isn’t too annoying to do the first time you try it: you launch your app in a simulator device of your choosing, browse around until you find the part you want, then take the screenshot and file it away.īut then you realize you need five screenshots in your app, potentially across multiple iPhone and iPad models. We’re going to start with having Fastlane take screenshots for our application. Sponsor Hacking with Swift and reach the world's largest Swift community! Starting the setup process SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until July 30th. Just like SwiftLint, that will install Fastlane across your whole system so you can use it in any project from now on. Once that completes, you can install Fastlane with this command: sudo gem install fastlane -NV You’ll either get back “command line tools are already installed” or you’ll trigger their installation process. Open your Mac’s Terminal program and run this command: xcode-select -install There’s a good chance you already have the command-line tools already, but you can find out just by trying to install them again. If you’re looking for example code to learn from, this is the wrong place.īefore we get started, we need to install two pieces of software: Xcode’s command-line tools and Fastlane itself. Warning: The example project has been written specifically for this tutorial series, and contains mistakes and problems that we’ll be examining over this tutorial series. If you’ve been following the other parts of this tutorial you should already have a working project ready to try out, but if you’re not you can try checking out our original example project from GitHub – there’s a good chance things won’t be quite the same here, though. To give you a quick tour around Fastlane, we’re going to upgrade our sample project to use it. It can take screenshots of your app in any devices you want and at any places you want, it can push new versions of your app out to beta testers or to the App Store, and it can even – gulp! – take most of the pain of provisioning profiles away. In the dark old days of app development you needed to build projects, fight with certificates and provisioning profiles, take screenshots across a multiple of devices, and more – all by hand, too.įortunately, these days we have Fastlane: a project with the specific aim of saving developer time by automating common tasks. I'm writing one new, free tutorial every day until WWDC – click here to see the full list!.How to validate code changes using CircleCI.How to save and share your work with GitHub.How to streamline your development with Fastlane.How to clean up your code formatting with SwiftLint.Part 4 in a series of tutorials on modern app infrastructure:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |