Choosing a Geographical Location

Apps like NearbyMe depend on the user’s location to do their work. Different locations mean we will get different results, so we need to figure out some way to get consistent, reliable coordinates back from Core Location.

Apple’s already done the work for us and provides two simple hooks. One uses a special file format that Xcode loads when it runs the app. The other uses an interface exposed to UI Automation for setting the coordinates on the fly in our scripts. Let’s explore both.

Choosing the Location in an Xcode Scheme

In Seeding Data in Xcode with Application Data Packages, we first used Xcode schemes to choose an application data package that completely replaced the sandbox with whatever we had captured ...

Get Test iOS Apps with UI Automation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.