Skip to content

feat: Refactor AudioSessionManager for iOS 26 compatibility - #1206

Open
vaibhavchvn86 wants to merge 4 commits into
software-mansion:mainfrom
vaibhavchvn86:vaibhavchvn86-patch-2
Open

feat: Refactor AudioSessionManager for iOS 26 compatibility #1206
vaibhavchvn86 wants to merge 4 commits into
software-mansion:mainfrom
vaibhavchvn86:vaibhavchvn86-patch-2

Conversation

@vaibhavchvn86

Copy link
Copy Markdown

Closes #

⚠️ Breaking changes ⚠️

  • Minimum iOS version bumped from 14.0 to 17.0. Apps with platform :ios or
    deployment_target below 17.0 will get a CocoaPods version conflict.

Introduced changes

  • Bumped ios_min_version to 17.0 in RNAudioAPI.podspec
  • Removed deprecated AVAudioSession.requestRecordPermission: and
    AVAudioSession.recordPermission — both are unavailable (hard error, not
    just deprecated) in the iOS 26 device SDK (iphoneos26), causing CI archive
    builds to fail with Xcode 26
  • Replaced both call sites with AVAudioApplication APIs introduced in iOS 17:
    +requestRecordPermissionWithCompletionHandler: and
    [AVAudioApplication sharedInstance].recordPermission
  • Removed usesAudioApplicationRecordPermissionAPI helper — no longer needed
    since AVAudioApplication is unconditionally available at the iOS 17 floor
  • Removed erroneous #if TARGET_OS_SIMULATOR guard that was forcing physical
    devices to the deprecated AVAudioSession path even on iOS 17+
  • Removed redundant @available(iOS 13.0, *) wrapper in configureAudioSession:
    (always true at iOS 17 minimum)

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant