Skip to content

Commit 5f2b3fc

Browse files
committed
fix(ios): Wrong deprecation on allowBluetooth with XCode 26.0.
fixes #549
1 parent 9c9da76 commit 5f2b3fc

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

record_ios/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.1.4
2+
* fix: Wrong deprecation on allowBluetooth on XCode 26.0.
3+
14
## 1.1.3
25
* fix: Recording should resume after pause when in background.
36

record_ios/ios/record_ios/Sources/record_ios/RecordConfig.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ struct IosConfig {
9292
case "duckOthers":
9393
AVAudioSession.CategoryOptions.duckOthers
9494
case "allowBluetooth":
95+
#if compiler(>=6.2)
96+
// For XCode 26.0+, Swift 6.2 version
9597
AVAudioSession.CategoryOptions.allowBluetoothHFP
98+
#else
99+
// Deprecated in 26.0, not 8.0. Thanks Apple!
100+
AVAudioSession.CategoryOptions.allowBluetooth
101+
#endif
96102
case "defaultToSpeaker":
97103
AVAudioSession.CategoryOptions.defaultToSpeaker
98104
case "interruptSpokenAudioAndMixWithOthers":

record_ios/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: record_ios
22
description: iOS implementation for record package called by record_platform_interface.
3-
version: 1.1.3
3+
version: 1.1.4
44
homepage: https://github.com/llfbandit/record/tree/master/record_ios
55

66
environment:

0 commit comments

Comments
 (0)