Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions FBControlCore/Commands/FBSettingsCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,13 @@ extern FBTargetSettingsService const FBTargetSettingsServiceLocation;
extern FBTargetSettingsService const FBTargetSettingsServiceMicrophone;
extern FBTargetSettingsService const FBTargetSettingsServiceUrl;
extern FBTargetSettingsService const FBTargetSettingsServiceNotification;
extern FBTargetSettingsService const FBTargetSettingsServiceCalendar;
extern FBTargetSettingsService const FBTargetSettingsServiceFaceID;
extern FBTargetSettingsService const FBTargetSettingsServiceMedia;
extern FBTargetSettingsService const FBTargetSettingsServiceReminders;
extern FBTargetSettingsService const FBTargetSettingsServiceMotion;
extern FBTargetSettingsService const FBTargetSettingsServiceSiri;
extern FBTargetSettingsService const FBTargetSettingsServiceSpeech;
extern FBTargetSettingsService const FBTargetSettingsServiceUserTracking;

NS_ASSUME_NONNULL_END
8 changes: 8 additions & 0 deletions FBControlCore/Commands/FBSettingsCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@
FBTargetSettingsService const FBTargetSettingsServiceMicrophone = @"microphone";
FBTargetSettingsService const FBTargetSettingsServiceUrl = @"url";
FBTargetSettingsService const FBTargetSettingsServiceNotification = @"notification";
FBTargetSettingsService const FBTargetSettingsServiceCalendar = @"calendar";
FBTargetSettingsService const FBTargetSettingsServiceFaceID = @"biometrics";
FBTargetSettingsService const FBTargetSettingsServiceMedia = @"media";
FBTargetSettingsService const FBTargetSettingsServiceReminders = @"reminders";
FBTargetSettingsService const FBTargetSettingsServiceMotion = @"motion";
FBTargetSettingsService const FBTargetSettingsServiceSiri = @"siri";
FBTargetSettingsService const FBTargetSettingsServiceSpeech = @"speech";
FBTargetSettingsService const FBTargetSettingsServiceUserTracking = @"userTracking";
8 changes: 8 additions & 0 deletions FBSimulatorControl/Commands/FBSimulatorSettingsCommands.m
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,14 @@ - (instancetype)initWithSimulator:(FBSimulator *)simulator
FBTargetSettingsServicePhotos: @"kTCCServicePhotos",
FBTargetSettingsServiceCamera: @"kTCCServiceCamera",
FBTargetSettingsServiceMicrophone: @"kTCCServiceMicrophone",
FBTargetSettingsServiceCalendar: @"kTCCServiceCalendar",
FBTargetSettingsServiceFaceID: @"kTCCServiceFaceID",
FBTargetSettingsServiceMedia: @"kTCCServiceMediaLibrary",
FBTargetSettingsServiceReminders: @"kTCCServiceReminders",
FBTargetSettingsServiceMotion: @"kTCCServiceMotion",
FBTargetSettingsServiceSiri: @"kTCCServiceSiri",
FBTargetSettingsServiceSpeech: @"kTCCServiceSpeechRecognition",
FBTargetSettingsServiceUserTracking: @"kTCCServiceUserTracking",
};
});
return mapping;
Expand Down
8 changes: 8 additions & 0 deletions idb/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ class Permission(Enum):
LOCATION = 4
NOTIFICATION = 5
MICROPHONE = 6
CALENDAR = 7
FACEID = 8
MEDIA = 9
REMINDERS = 10
MOTION = 11
SIRI = 12
SPEECH = 13
USER_TRACKING = 14


class TargetType(str, Enum):
Expand Down
16 changes: 16 additions & 0 deletions idb/grpc/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@
Permission.LOCATION: ApproveRequest.LOCATION,
Permission.NOTIFICATION: ApproveRequest.NOTIFICATION,
Permission.MICROPHONE: ApproveRequest.MICROPHONE,
Permission.CALENDAR: ApproveRequest.CALENDAR,
Permission.FACEID: ApproveRequest.FACEID,
Permission.MEDIA: ApproveRequest.MEDIA,
Permission.REMINDERS: ApproveRequest.REMINDERS,
Permission.MOTION: ApproveRequest.MOTION,
Permission.SIRI: ApproveRequest.SIRI,
Permission.SPEECH: ApproveRequest.SPEECH,
Permission.USER_TRACKING: ApproveRequest.USER_TRACKING,
}

REVOKE_MAP: Dict[Permission, "RevokeRequest.Permission"] = {
Expand All @@ -187,6 +195,14 @@
Permission.LOCATION: RevokeRequest.LOCATION,
Permission.NOTIFICATION: RevokeRequest.NOTIFICATION,
Permission.MICROPHONE: RevokeRequest.MICROPHONE,
Permission.CALENDAR: ApproveRequest.CALENDAR,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those should be RevokeRequest

Permission.FACEID: ApproveRequest.FACEID,
Permission.MEDIA: ApproveRequest.MEDIA,
Permission.REMINDERS: ApproveRequest.REMINDERS,
Permission.MOTION: ApproveRequest.MOTION,
Permission.SIRI: ApproveRequest.SIRI,
Permission.SPEECH: ApproveRequest.SPEECH,
Permission.USER_TRACKING: ApproveRequest.USER_TRACKING,
}

VIDEO_FORMAT_MAP: Dict[VideoFormat, "VideoStreamRequest.Format"] = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ struct ApproveMethodHandler {
.url: .url,
.location: .location,
.notification: notificationApprovalService,
.calendar: .calendar,
.faceid: .faceID,
.media: .media,
.reminders: .reminders,
.motion: .motion,
.siri: .siri,
.speech: .speech,
.userTracking: .userTracking,
]

var services = try Set(
Expand Down
8 changes: 8 additions & 0 deletions proto/idb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,14 @@ message ApproveRequest {
LOCATION = 4;
NOTIFICATION = 5;
MICROPHONE = 6;
CALENDAR = 7;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the same entries in the RevokeRequest below

FACEID = 8;
MEDIA = 9;
REMINDERS = 10;
MOTION = 11;
SIRI = 12;
SPEECH = 13;
USER_TRACKING = 14;
}
string bundle_id = 1;
repeated Permission permissions = 2;
Expand Down