Hey iOS developers! 👋
Apple is known for taking privacy very seriously, considering it one of the core values of its ecosystem. Accessing personal data on Apple devices is tightly controlled, and users must explicitly grant or deny permission for apps to access sensitive information.
This week's Curated iOS topic focuses on handling and requesting app permissions, such as user location, camera usage, health data, push notifications, and more.
Requesting access to protected resources
Accessing sensitive data stored on an iOS device involves a few key steps. First, we need to provide purpose string in the Info.plist
file, explaining why the app needs access to the protected resource. Second, depending on the system framework that provides access to the resource, we should check the current authorization status using the appropriate APIs.
Read on Apple Developer
Integrating iOS Push Notifications Using Swift
Sachin Siwal provides the step-by-step guide to integrating of push notification into iOS apps. This article covers how to properly request authorization, discusses critical aspects of the implementation and introduces several products and tools that can simplify user engagement.
Read on Medium
Deep Dive into Core Location in iOS: Requesting and Utilizing User Location
In this article, Dwi Randy Herdinanto delves into the various aspects of accessing Core Location data in iOS. It covers setting up the project, requesting location permissions, handling continuous location updates, and debugging Core Location using the iOS Simulator.
Read on Medium
Getting user location with SwiftUI
If you're building your app with SwiftUI and need access to Core Location, Desilio Neto provides a helpful guide complete with UI code examples to assist you with the implementation.
Read on Medium
Requesting authorization for media capture and audio on iOS
Camera and microphone usage require user permission on iOS. Check out this article for detailed instructions and code examples to guide you through the process.
Read on Medium
Handle the Limited Photos Library in your app
Starting with iOS 14, the new Limited Photos Library feature enhances user privacy by allowing apps selective access to the user's photos instead of full access to the entire photo library. Users can choose between several options: Selected Photos, Full Access, or No Access.
Watch on Apple Developer
Mastering Contacts in iOS Development with Swift
The CNContactStore
object represents the user’s contacts store database, and you use it to fetch information from that database and save changes back to it. It saves contacts, groups, and containers from the user’s Contacts database. Lee Young-jun's article provides an overview of how to access and work with contacts in iOS.
Read on Medium
WWDC23: Discover Calendar and EventKit
In this WWDC23 session, learn how to integrate Calendar into your app to help users manage their time more effectively. Discover how to create and fetch events, as well as implement a virtual conference extension.
Watch on Apple Developer
Building a Scalable Apple Health Authorization Management View for iOS
Emre Havan demonstrates how to go beyond the standard requestAuthorization
method for accessing Apple Health data. This article details how to create a better user experience by displaying authorization preferences, showing which data types have been authorized, and identifying any new data types for which additional permissions are needed.
Read on Medium
App Tracking Transparency (ATT)
ATT is Apple’s privacy framework, which requires apps on iOS to request user permission to access the Identifier for Advertisers (IDFA) to track the user or device.
Read on Apple Developer
WWDC22: Explore App Tracking Transparency
Check out the WWDC22 session to learn more about App Tracking Transparency and how to obtain user permission. This session explains how App Store Policy defines tracking and whether your app requires adoption of the ATT framework.
Watch on Apple Developer
WWDC24: What’s new in privacy
At this year’s WWDC, Apple introduced updates to permission flows. Don’t miss this session to learn about the latest privacy features.
Watch on Apple Developer
Until next time!
Artjoms