feat: Refactor AudioSessionManager for iOS 26 compatibility - #1206
Open
vaibhavchvn86 wants to merge 4 commits into
Open
feat: Refactor AudioSessionManager for iOS 26 compatibility #1206vaibhavchvn86 wants to merge 4 commits into
vaibhavchvn86 wants to merge 4 commits into
Conversation
Removed TARGET_OS_SIMULATOR guard to support AVAudioApplication on Xcode 26 simulator. Added SDK version checks for record permission methods to ensure compatibility with iOS 26.
fix: Refactor AudioSessionManager for iOS 26 compatibility
Updated minimum iOS version requirement from 14.0 to 17.0.
Summary of what changed vs original: Location Change RNAudioAPI.podspec line 13 '14.0' → '17.0' @interface block line 8 Removed usesAudioApplicationRecordPermissionAPI declaration configureAudioSession: Removed @available(iOS 13.0, *) wrapper (always true at iOS 17 floor) Lines 242–253 Removed entire usesAudioApplicationRecordPermissionAPI method requestSystemRecordPermission: Replaced 6-line guarded block with 1 direct AVAudioApplication call currentRecordPermissionStatus Replaced 6-line guarded block with 1 direct AVAudioApplication call recordPermissionStatusString: Removed the usesAudioApplicationRecordPermissionAPI branch + AVAudioSession enum switch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #
platform :iosordeployment_targetbelow 17.0 will get a CocoaPods version conflict.Introduced changes
ios_min_versionto17.0inRNAudioAPI.podspecAVAudioSession.requestRecordPermission:andAVAudioSession.recordPermission— both are unavailable (hard error, notjust deprecated) in the iOS 26 device SDK (
iphoneos26), causing CI archivebuilds to fail with Xcode 26
AVAudioApplicationAPIs introduced in iOS 17:+requestRecordPermissionWithCompletionHandler:and[AVAudioApplication sharedInstance].recordPermissionusesAudioApplicationRecordPermissionAPIhelper — no longer neededsince
AVAudioApplicationis unconditionally available at the iOS 17 floor#if TARGET_OS_SIMULATORguard that was forcing physicaldevices to the deprecated
AVAudioSessionpath even on iOS 17+@available(iOS 13.0, *)wrapper inconfigureAudioSession:(always true at iOS 17 minimum)
Checklist