Build Location-Based Projects for iOS: GPS, Sensors, and Maps

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Coding is awesome. So is being outside. With location-based iOS apps, you can combine the two for an enhanced outdoor experience. Use Swift to create your own apps that use GPS data, read sensor data from your iPhone, draw on maps, automate with geofences, and store augmented reality world maps. You'll have a great time without even noticing that you're learning. And even better, each of the projects is designed to be extended and eventually submitted to the App Store. Explore, share, and have fun.

Location-based apps are everywhere. From mapping our jogging path to pointing us to the nearest collectible creature in a location-based game, these apps offer useful and interesting features and information related to where you are. Using real-world maps and places as the environment, they add an extra layer of adventure to exploring the outdoors. If you've ever wanted to make your own location-based apps and games, you can learn how with four simple, Swift-based projects that are easy to code and fun to use.

Build four stunning apps that sense the iPhone's surroundings. Use Core Location and MapKit to draw GPS data on maps and share the results to social media. Use the sensor data from the iPhone and draw acceleration graphs using Core Graphics while on a playground swing. Build an app that measures the time you spend outside using geofences. Combine Core Location and ARKit to build an augmented reality scavenger hunt app that you can use and play with other people. Have great time building creative apps you cannot wait to try out.

Author(s): Dominik Hauser
Edition: 1
Publisher: Pragmatic Bookshelf
Year: 2020

Language: English
Pages: 156
Tags: iOS, GPS, Sensors, Maps, location, Swift

Cover
Table of Contents
Acknowledgments
Introduction
Who This Book Is For
Who Am I?
What This Book Covers
How to Read This Book
Creating with Swift
Online Resources
1. Drawing on Maps
Creating the Xcode Project
Removing the Storyboard
Managing Location Services
Building the User Interface
Exercises
2. Measuring Length with Gravitation
Setting Up the Project
Collecting Motion Data
Storing Acceleration Data
Building the User Interface Using a Storyboard
Drawing Data
Starting and Stopping Motion Events
Three Axes of Motion
Adding Movable Markers to the Diagrams
Calculating the Length from the Swing Period
Exercises
3. Automating with Geofences
Setting Up the Xcode Project
Asking for Permission
Fetching the Current Location
Setting a Geofence
Persisting Geofence Events
Calculating the Outside Duration
Binding the User Interface and Data Using Combine
Presenting a Single Day Entry
Making the Day Entry Accessible
Combining Day Entry Views for a Week Overview
Handling Wrong Authorization
Things to Remember When Working with Geofences
Exercises
4. Sharing Augmented Reality
Setting Up an Augmented Reality App
Adding Our Logging Library
Getting and Managing Location Updates
Implementing the Distance Screen
Adding Virtual Text to Reality
Storing the World Map
Presenting the Augmented Reality View
Restoring the World Map
Exercises
A1. Debugging on the Go
Creating a Host Application
Creating a Swift Package
Creating the LogStore
Presenting the Log On-Screen
Presenting the Log from a Special Shake
Sharing the Package on GitHub
Wrapping Up
Exercises
Bibliography