Skip to content

Commit

Permalink
Removing code Swift 4.2 migrator inserted
Browse files Browse the repository at this point in the history
  • Loading branch information
mergesort committed Sep 16, 2018
1 parent 08e9bad commit b754caf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Source/FeedbackEffect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public struct FeedbackEffect {
public static func play(sound: SoundEmitting?, feedback: HapticEmitting? = nil) {
if let sound = sound {
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.ambient), with: .mixWithOthers)
try AVAudioSession.sharedInstance().setCategory(.ambient, mode: .default, options: .mixWithOthers)
sound.makeSound()
} catch {
print("Couldn't play a sound")
Expand All @@ -40,8 +40,3 @@ public struct FeedbackEffect {
}
}
}

// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromAVAudioSessionCategory(_ input: AVAudioSession.Category) -> String {
return input.rawValue
}

0 comments on commit b754caf

Please sign in to comment.