Skip to content
Permalink
Browse files

Merge pull request #411 from TortugaPower/develop

Release 3.6.0
  • Loading branch information
GianniCarlo committed Jan 13, 2020
2 parents 405c9a9 + e794dcf commit 6b87afa393ef4eb7d9e61666893cf2f97bb556c4
@@ -1,8 +1,8 @@
language: swift
osx_image: xcode10.2
osx_image: xcode11.1
xcode_project: BookPlayer.xcodeproj
xcode_scheme: BookPlayer
xcode_destination: platform=iOS Simulator,OS=11.3,name=iPhone 5s
xcode_destination: platform=iOS Simulator,OS=13.1,name=iPhone 8
cache:
directories:
- Carthage
@@ -1773,12 +1773,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
@@ -1805,12 +1805,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1835,12 +1835,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1863,12 +1863,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
@@ -1893,12 +1893,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
@@ -1921,12 +1921,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = "BookPlayerWatch Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
@@ -2160,7 +2160,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
@@ -2171,7 +2171,7 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
@@ -2191,7 +2191,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -2201,7 +2201,7 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
@@ -2364,13 +2364,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
@@ -2393,13 +2393,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2420,13 +2420,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = BookPlayerWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.2;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2497,7 +2497,7 @@
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -2507,7 +2507,7 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
MARKETING_VERSION = 3.6.0;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
@@ -50,9 +50,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// register to audio-interruption notifications
NotificationCenter.default.addObserver(self, selector: #selector(self.handleAudioInterruptions(_:)), name: AVAudioSession.interruptionNotification, object: nil)

// register to audio-route-change notifications
NotificationCenter.default.addObserver(self, selector: #selector(self.handleAudioRouteChange(_:)), name: AVAudioSession.routeChangeNotification, object: nil)

// update last played book on watch app
NotificationCenter.default.addObserver(self, selector: #selector(self.sendApplicationContext), name: .bookPlayed, object: nil)

@@ -236,33 +233,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}

// Handle audio route changes
@objc func handleAudioRouteChange(_ notification: Notification) {
guard PlayerManager.shared.isPlaying,
let userInfo = notification.userInfo,
let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,
let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else {
return
}

// Pause playback if route changes due to a disconnect
switch reason {
case .oldDeviceUnavailable:
guard let storedPort = PlayerManager.shared.outputPort,
let currentRoute = AVAudioSession.sharedInstance().currentRoute.outputs.first else { return }

guard storedPort != currentRoute else { return }

guard currentRoute.portType == .builtInSpeaker else { return }

DispatchQueue.main.async {
PlayerManager.shared.pause()
}
default:
break
}
}

// For now, seek forward/backward and next/previous track perform the same function
func setupMPRemoteCommands() {
// Play / Pause

0 comments on commit 6b87afa

Please sign in to comment.
You can’t perform that action at this time.