Add missing App Permission Types (#159)

* Add missing app permission types

* Remove old unused icons for photos, background fetch and background audio permission types

* Add missing icons for contacts and reminders permission types

* Add missing camera permission icon and name

* Switch permission icons to filled versions for a more cohesive look
This commit is contained in:
Fabian Thies
2022-11-29 14:30:51 +01:00
committed by GitHub
parent f0302b0d1e
commit 7ebecc353a
15 changed files with 65 additions and 79 deletions

View File

@@ -25,8 +25,22 @@ public extension ALTAppPermissionType
switch self
{
case .photos: return NSLocalizedString("Photos", comment: "")
case .camera: return NSLocalizedString("Camera", comment: "")
case .location: return NSLocalizedString("Location", comment: "")
case .contacts: return NSLocalizedString("Contacts", comment: "")
case .reminders: return NSLocalizedString("Reminders", comment: "")
case .appleMusic: return NSLocalizedString("Apple Music", comment: "")
case .microphone: return NSLocalizedString("Microphone", comment: "")
case .speechRecognition: return NSLocalizedString("Speech Recognition", comment: "")
case .backgroundAudio: return NSLocalizedString("Background Audio", comment: "")
case .backgroundFetch: return NSLocalizedString("Background Fetch", comment: "")
case .bluetooth: return NSLocalizedString("Bluetooth", comment: "")
case .network: return NSLocalizedString("Network", comment: "")
case .calendars: return NSLocalizedString("Calendars", comment: "")
case .touchID: return NSLocalizedString("Touch ID", comment: "")
case .faceID: return NSLocalizedString("Face ID", comment: "")
case .siri: return NSLocalizedString("Siri", comment: "")
case .motion: return NSLocalizedString("Motion", comment: "")
default: return nil
}
}
@@ -34,10 +48,25 @@ public extension ALTAppPermissionType
var icon: UIImage? {
switch self
{
case .photos: return UIImage(named: "PhotosPermission")
case .backgroundAudio: return UIImage(named: "BackgroundAudioPermission")
case .backgroundFetch: return UIImage(named: "BackgroundFetchPermission")
default: return nil
case .photos: return UIImage(systemName: "photo.on.rectangle.angled")
case .camera: return UIImage(systemName: "camera.fill")
case .location: return UIImage(systemName: "location.fill")
case .contacts: return UIImage(systemName: "person.2.fill")
case .reminders: return UIImage(systemName: "checklist")
case .appleMusic: return UIImage(systemName: "music.note")
case .microphone: return UIImage(systemName: "mic.fill")
case .speechRecognition: return UIImage(systemName: "waveform.and.mic")
case .backgroundAudio: return UIImage(systemName: "speaker.fill")
case .backgroundFetch: return UIImage(systemName: "square.and.arrow.down")
case .bluetooth: return UIImage(systemName: "wave.3.right")
case .network: return UIImage(systemName: "network")
case .calendars: return UIImage(systemName: "calendar")
case .touchID: return UIImage(systemName: "touchid")
case .faceID: return UIImage(systemName: "faceid")
case .siri: return UIImage(systemName: "mic.and.signal.meter.fill")
case .motion: return UIImage(systemName: "figure.walk.motion")
default:
return nil
}
}
}

View File

@@ -10,5 +10,19 @@
typedef NSString *ALTAppPermissionType NS_TYPED_EXTENSIBLE_ENUM;
extern ALTAppPermissionType const ALTAppPermissionTypePhotos;
extern ALTAppPermissionType const ALTAppPermissionTypeCamera;
extern ALTAppPermissionType const ALTAppPermissionTypeLocation;
extern ALTAppPermissionType const ALTAppPermissionTypeContacts;
extern ALTAppPermissionType const ALTAppPermissionTypeReminders;
extern ALTAppPermissionType const ALTAppPermissionTypeAppleMusic;
extern ALTAppPermissionType const ALTAppPermissionTypeMicrophone;
extern ALTAppPermissionType const ALTAppPermissionTypeSpeechRecognition;
extern ALTAppPermissionType const ALTAppPermissionTypeBackgroundAudio;
extern ALTAppPermissionType const ALTAppPermissionTypeBackgroundFetch;
extern ALTAppPermissionType const ALTAppPermissionTypeBluetooth;
extern ALTAppPermissionType const ALTAppPermissionTypeNetwork;
extern ALTAppPermissionType const ALTAppPermissionTypeCalendars;
extern ALTAppPermissionType const ALTAppPermissionTypeTouchID;
extern ALTAppPermissionType const ALTAppPermissionTypeFaceID;
extern ALTAppPermissionType const ALTAppPermissionTypeSiri;
extern ALTAppPermissionType const ALTAppPermissionTypeMotion;

View File

@@ -9,5 +9,19 @@
#import "ALTAppPermission.h"
ALTAppPermissionType const ALTAppPermissionTypePhotos = @"photos";
ALTAppPermissionType const ALTAppPermissionTypeCamera = @"camera";
ALTAppPermissionType const ALTAppPermissionTypeLocation = @"location";
ALTAppPermissionType const ALTAppPermissionTypeContacts = @"contacts";
ALTAppPermissionType const ALTAppPermissionTypeReminders = @"reminders";
ALTAppPermissionType const ALTAppPermissionTypeAppleMusic = @"music";
ALTAppPermissionType const ALTAppPermissionTypeMicrophone = @"microphone";
ALTAppPermissionType const ALTAppPermissionTypeSpeechRecognition = @"speech-recognition";
ALTAppPermissionType const ALTAppPermissionTypeBackgroundAudio = @"background-audio";
ALTAppPermissionType const ALTAppPermissionTypeBackgroundFetch = @"background-fetch";
ALTAppPermissionType const ALTAppPermissionTypeBluetooth = @"bluetooth";
ALTAppPermissionType const ALTAppPermissionTypeNetwork = @"network";
ALTAppPermissionType const ALTAppPermissionTypeCalendars = @"calendars";
ALTAppPermissionType const ALTAppPermissionTypeTouchID = @"touchid";
ALTAppPermissionType const ALTAppPermissionTypeFaceID = @"faceid";
ALTAppPermissionType const ALTAppPermissionTypeSiri = @"siri";
ALTAppPermissionType const ALTAppPermissionTypeMotion = @"motion";