Skip to content

Commit

Permalink
Update to support visionOS (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsim committed Jan 19, 2024
1 parent 69b2842 commit 1cc3531
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enum MicrophoneAccess {
}

static func getOrRequestPermission() async -> Status {
if #available(iOS 17.0, macOS 14.0, watchOS 10.0, xrOS 1.0, *) {
if #available(iOS 17.0, macOS 14.0, watchOS 10.0, visionOS 1.0, *) {
let recordPermission = AVAudioApplication.shared.recordPermission
return switch recordPermission {
case .undetermined: await AVAudioApplication.requestRecordPermission() ? .granted : .denied
Expand All @@ -23,7 +23,7 @@ enum MicrophoneAccess {
continuation.resume(with: .success(granted ? .granted : .denied))
}
}
#elseif !os(xrOS)
#elseif !os(visionOS)
let authorizationStatus = AVCaptureDevice.authorizationStatus(for: .audio)
return switch authorizationStatus {
case .notDetermined: await AVCaptureDevice.requestAccess(for: .audio) ? .granted : .denied
Expand Down
8 changes: 4 additions & 4 deletions ZenTuner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,7";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand Down Expand Up @@ -837,7 +837,7 @@
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,7";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -865,7 +865,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,7";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZenTuner.app/ZenTuner";
VERSIONING_SYSTEM = "apple-generic";
};
Expand Down Expand Up @@ -893,7 +893,7 @@
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TARGETED_DEVICE_FAMILY = "1,2,7";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZenTuner.app/ZenTuner";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand Down

0 comments on commit 1cc3531

Please sign in to comment.