From 4e2a62d24b26e8652b09cfd589493492247f8527 Mon Sep 17 00:00:00 2001 From: Duy Tran Khanh Date: Mon, 30 Jan 2023 08:40:27 +0700 Subject: [PATCH] Move strings to InfoPlist.strings, change AVAudioSession category Change AVAudioSession category to AVAudioSessionCategoryPlayAndRecord --- Natives/Info.plist | 4 ++-- Natives/JavaLauncher.m | 2 +- Natives/en.lproj/InfoPlist.strings | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Natives/Info.plist b/Natives/Info.plist index 2fe417d6..d90fd2a1 100644 --- a/Natives/Info.plist +++ b/Natives/Info.plist @@ -111,9 +111,9 @@ _altserver._tcp NSLocalNetworkUsageDescription - PojavLauncher uses the local network to find and communicate with AltServer and LAN servers. + NSLocalNetworkUsageDescription NSMicrophoneUsageDescription - PojavLauncher uses the microphone to enable support for voice chat mods. + NSMicrophoneUsageDescription UIApplicationSceneManifest UIApplicationSupportsMultipleScenes diff --git a/Natives/JavaLauncher.m b/Natives/JavaLauncher.m index 201e09a3..a4857c1e 100644 --- a/Natives/JavaLauncher.m +++ b/Natives/JavaLauncher.m @@ -289,7 +289,7 @@ int launchJVM(NSString *username, id launchTarget, int width, int height, int mi // TODO: Add preference toggle NSError *sessionError = nil; - [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&sessionError]; + [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord withOptions:AVAudioSessionCategoryOptionMixWithOthers error:&sessionError]; [[AVAudioSession sharedInstance] setActive:YES error:&sessionError]; diff --git a/Natives/en.lproj/InfoPlist.strings b/Natives/en.lproj/InfoPlist.strings index b92732c7..e9885506 100644 --- a/Natives/en.lproj/InfoPlist.strings +++ b/Natives/en.lproj/InfoPlist.strings @@ -1 +1,3 @@ /* Localized versions of Info.plist keys */ +"NSLocalNetworkUsageDescription" = "PojavLauncher uses the local network to find and communicate with AltServer and LAN servers."; +"NSMicrophoneUsageDescription" = "PojavLauncher uses the microphone to enable support for voice chat mods."; \ No newline at end of file