Overview
Breeze requires certain permissions to provide location-based air quality data. All permissions are requested only when needed and include clear explanations for users.Required Permissions
Location Permission
Breeze requests “When In Use” location access to show air quality data for your current location.Privacy Description
The location permission description is defined inInfo.plist:
Info.plist:51-52
Location permission is optional. Users can always search for cities manually without granting location access.
How Permissions Are Requested
Location Permission Flow
The app requests location permission when users tap the “Use My Location” button:DashboardViewModel.swift:52-68
Authorization Status Handling
The app responds to authorization changes:DashboardViewModel.swift:215-225
Permission States
- Not Determined
- Denied
- Restricted
Initial state when the app hasn’t requested permission yet.
- App shows the iOS permission dialog when
requestLocation()is called - User can choose “Allow While Using App” or “Don’t Allow”
Location Manager Setup
TheDashboardViewModel initializes and manages the location manager:
DashboardViewModel.swift:44-47
CLLocationManagerDelegate
The view model implements location delegate methods:DashboardViewModel.swift:181-208
The app uses reverse geocoding to display a friendly location name (e.g., “San Francisco, United States”) instead of raw coordinates.
User Experience
Permission Dialog
When users tap “Use My Location” for the first time:- iOS shows the standard permission dialog
- Dialog includes the custom message from
NSLocationWhenInUseUsageDescription - User chooses “Allow While Using App” or “Don’t Allow”
Error Handling
If permission is denied or location fails:DashboardViewModel.swift:210-213
Privacy Considerations
App Transport Security
Breeze enforces secure network connections:Info.plist:53-57
Encryption Declaration
For App Store submission:Info.plist:58-59
false.
App Store Requirements
When submitting to the App Store, ensure:Permission descriptions
All
NSLocationWhenInUseUsageDescription strings are clear and explain why permission is needed.Data usage disclosure
Update App Store Connect with data usage details (location data for air quality).
Testing Permissions
Simulator Testing
Grant permission
Grant permission
In the iOS Simulator, when the permission dialog appears, click Allow While Using App.
Deny permission
Deny permission
Click Don’t Allow in the permission dialog. The app should handle this gracefully with an error message.
Reset permissions
Reset permissions
- Go to Settings → Privacy & Security → Location Services
- Find Breeze and change the setting
- Or reset all permissions: Simulator → Reset Content and Settings
Simulate location
Simulate location
In Xcode, go to Debug → Simulate Location and choose a city (e.g., San Francisco, London).
Device Testing
On a physical device:- Install the app via Xcode
- Tap “Use My Location”
- Grant permission when prompted
- Verify that the app receives real location updates
Troubleshooting
Permission dialog not showing
Permission dialog not showing
- Ensure
NSLocationWhenInUseUsageDescriptionis inInfo.plist - Check that you’re calling
requestWhenInUseAuthorization()correctly - Reset simulator permissions if testing on simulator
Location always denied
Location always denied
- Check device/simulator Settings → Privacy → Location Services is ON
- Verify the app has location permission in Settings → Breeze → Location
- On device, check if parental controls are restricting location access
'Location access denied' message stuck
'Location access denied' message stuck
The error message persists until the user takes action. Guide users to:
- Open Settings
- Scroll to Breeze
- Tap Location
- Select While Using the App
Next Steps
Dashboard View
Learn how the dashboard uses location data
Location Services
Deep dive into location features