From ac058261fe47787221c0213e67fd7f9d42cfc3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 7 May 2024 12:41:21 +0200 Subject: [PATCH] iOS: Remove use of a non-public vibration API in app store builds --- ios/main.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/main.mm b/ios/main.mm index 21b75f294b..ea35024b66 100644 --- a/ios/main.mm +++ b/ios/main.mm @@ -443,7 +443,9 @@ void System_AskForPermission(SystemPermission permission) {} PermissionStatus System_GetPermissionStatus(SystemPermission permission) { return PERMISSION_STATUS_GRANTED; } +#if !PPSSPP_PLATFORM(IOS_APP_STORE) FOUNDATION_EXTERN void AudioServicesPlaySystemSoundWithVibration(unsigned long, objc_object*, NSDictionary*); +#endif BOOL SupportsTaptic() { // we're on an iOS version that cannot instantiate UISelectionFeedbackGenerator, so no. @@ -470,6 +472,7 @@ void System_Vibrate(int mode) { } [app.feedbackGenerator selectionChanged]; } else { +#if !PPSSPP_PLATFORM(IOS_APP_STORE) NSMutableDictionary *dictionary = [NSMutableDictionary dictionary]; NSArray *pattern = @[@YES, @30, @NO, @2]; @@ -477,6 +480,7 @@ void System_Vibrate(int mode) { dictionary[@"Intensity"] = @2; AudioServicesPlaySystemSoundWithVibration(kSystemSoundID_Vibrate, nil, dictionary); +#endif } }