What We’ve Learned

In this chapter, we took a break from adding features to our very simple app, and adopted techniques to make sure those features keep working.

We have explored Apple’s built-in unit testing suite, XCTest, for testing both application logic and user interface. We also saw how to test the user interface and how it interacts with our code. And to top it off, we ran the app on the device, so we’ll see exactly what the users will when they run it on their iPhones and iPads.

You now have the tools to go forth into the world and test your apps so that you can be sure your users won’t have to deal with a crash or erroneous behavior.

Looking at our app, though, there’s one piece of the player UI we’ve never really done anything with: the current time display. We could have implemented that with a Timer, which we learned about in this chapter, to check on the playback time and update the label. But there’s actually a more elegant approach to handling asynchronicity, and that’s what we’ll focus on in the next chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset