Skip to content

Commit

Permalink
Raise minimum deployment target to iOS11
Browse files Browse the repository at this point in the history
Due to breaking change in Swift 5.5 & Xcode 13
  • Loading branch information
dcvz committed Sep 16, 2021
1 parent 7b8a4f3 commit cafd513
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Example/SwiftAudio.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HPNZWPB9JK;
INFOPLIST_FILE = SwiftAudio/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -551,7 +551,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = HPNZWPB9JK;
INFOPLIST_FILE = SwiftAudio/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PackageDescription

let package = Package(
name: "SwiftAudio",
platforms: [.iOS(.v10)],
platforms: [.iOS(.v11)],
products: [
.library(
name: "SwiftAudioEx",
Expand Down
2 changes: 1 addition & 1 deletion SwiftAudioEx.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ DESC
'Jørgen Henrichsen' => '[email protected]', }
s.source = { :git => 'https://github.com/DoubleSymmetry/SwiftAudioEx.git', :tag => s.version.to_s }

s.ios.deployment_target = '10.0'
s.ios.deployment_target = '11.0'
s.swift_version = '5.0'
s.source_files = 'SwiftAudioEx/Classes/**/*'
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ protocol AudioSession {

var availableCategories: [AVAudioSession.Category] { get }

@available(iOS 10.0, *)
func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, options: AVAudioSession.CategoryOptions) throws

@available(iOS 11.0, *)
func setCategory(_ category: AVAudioSession.Category, mode: AVAudioSession.Mode, policy: AVAudioSession.RouteSharingPolicy, options: AVAudioSession.CategoryOptions) throws

func setActive(_ active: Bool, options: AVAudioSession.SetActiveOptions) throws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
The URL pointing to the now playing item's underlying asset.
This constant is used by the system UI when video thumbnails or audio waveform visualizations are applicable.
*/
@available(iOS 10.3, *)
case assetUrl(URL?)

/**
Expand Down Expand Up @@ -116,7 +115,6 @@ public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
The service provider associated with the now-playing item.
Value is a unique NSString that identifies the service provider for the now-playing item. If the now-playing item belongs to a channel or subscription service, this key can be used to coordinate various types of now-playing content from the service provider.
*/
@available(iOS 11.0, *)
case serviceIdentifier(String?)


Expand All @@ -130,11 +128,7 @@ public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
return MPNowPlayingInfoPropertyAvailableLanguageOptions

case .assetUrl(_):
if #available(iOS 10.3, *) {
return MPNowPlayingInfoPropertyAssetURL
} else {
return ""
}
return MPNowPlayingInfoPropertyAssetURL
case .chapterCount(_):
return MPNowPlayingInfoPropertyChapterCount

Expand Down Expand Up @@ -175,11 +169,7 @@ public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
return MPNowPlayingInfoPropertyPlaybackRate

case .serviceIdentifier(_):
if #available(iOS 11.0, *) {
return MPNowPlayingInfoPropertyServiceIdentifier
} else {
return ""
}
return MPNowPlayingInfoPropertyServiceIdentifier

}
}
Expand All @@ -194,10 +184,7 @@ public enum NowPlayingInfoProperty: NowPlayingInfoKeyValue {
return options

case .assetUrl(let url):
if #available(iOS 10.3, *) {
return url
}
return false
return url

case .chapterCount(let count):
return count != nil ? NSNumber(value: count!) : nil
Expand Down

0 comments on commit cafd513

Please sign in to comment.