To provide the user of your tvOS weather app with weather information for the Apple TVs current location, you need to setup location services. This includes several necessary steps, like asking the user’s permission, and dealing with the possibility that the user denies your app the permission to access his current location. All that is achieved using the CLLocation framework that you are also going to use later to reverse geocode user entries to transform a search for a city name into a search for geo coordinates.
- [Instructor] The Your Location tab of our application…is all about displaying the weather forecast…for the user's current location.…So somehow we need to get the user's location,…and of course, we can use very similar location service…objects and classes than we're used to on iOS,…and this is what we are going to do right now.…So we are going to add some more code…to our YourLocationViewController.swift file,…and I've already opened that up,…and if you have opened up the project associated…with the exercise files of this video,…then you will see that I did some cleanup here.…
I added some marks so that we can nicely jump around…our code, and I've also added a mark for location services…right here, and this is actually our action plan…of what we are going to do now.…First of all, we need to think about privacy,…because Apple TV, as well as iOS, require us to state…why we want to use the user's location…in the info PLIST file.…Next up, we should think about implementing setting up…the location services itself, that includes…
- The Siri remote
- The focus model
- Adding video assets and imagery
- UIKit components
- Location services
- Accessing a Web API
- Enabling the top shelf and layered images
- Setting up shortcuts
- Communicating with URL schemes
- Adding a layered app icon
Skill Level Beginner
1. Introducing tvOS Development
2. Your First tvOS App: Build the UI
3. Your First tvOS App: Add the Logic
4. Multipeer Connectivity
5. Final Touches
Next steps1m 18s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.