Skip to content
Permalink
Browse files

Merge pull request #379 from TortugaPower/develop

Release 3.5.1
  • Loading branch information...
GianniCarlo committed Sep 9, 2019
2 parents ca04ccf + 5b52d8c commit 405c9a9f1456f59a170070be529f0e3e9bd1a5fc
@@ -1264,6 +1264,7 @@
CreatedOnToolsVersion = 7.3;
DevelopmentTeam = S7TJSJXWUZ;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
@@ -1772,10 +1773,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
@@ -1802,10 +1805,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1830,10 +1835,12 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWatch/BookPlayerWatch.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
GCC_C_LANGUAGE_STANDARD = gnu11;
IBSC_MODULE = BookPlayerWatch_Extension;
INFOPLIST_FILE = BookPlayerWatch/Info.plist;
MARKETING_VERSION = 3.5.1;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1856,10 +1863,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
@@ -1884,10 +1893,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
@@ -1910,10 +1921,12 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_ENTITLEMENTS = "BookPlayerWatch Extension/BookPlayerWatch Extension.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.watchkitapp.watchkitextension;
PRODUCT_NAME = "${TARGET_NAME}";
@@ -2146,6 +2159,8 @@
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
@@ -2156,8 +2171,10 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
@@ -2173,6 +2190,8 @@
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -2182,8 +2201,10 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = RELEASE;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
@@ -2343,11 +2364,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
@@ -2370,11 +2393,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2395,11 +2420,13 @@
CODE_SIGN_ENTITLEMENTS = BookPlayerWidget/BookPlayerWidget.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
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;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer.BookPlayerWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2469,6 +2496,8 @@
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_ENTITLEMENTS = BookPlayer/BookPlayer.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = S7TJSJXWUZ;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -2478,8 +2507,10 @@
INFOPLIST_FILE = BookPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 3.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.tortugapower.audiobookplayer;
PRODUCT_NAME = BookPlayer;
PROVISIONING_PROFILE_SPECIFIER = "BookPlayer 3 with CarPlay";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = RELEASE;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
@@ -172,7 +172,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.5.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -189,7 +189,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
@@ -146,7 +146,7 @@ class ItemListViewController: UIViewController, ItemList, ItemListAlerts, ItemLi
}

func presentImportFilesAlert() {
let providerList = UIDocumentPickerViewController(documentTypes: ["public.audio"], in: .import)
let providerList = UIDocumentPickerViewController(documentTypes: ["public.audio", "com.pkware.zip-archive"], in: .import)

providerList.delegate = self

@@ -89,7 +89,11 @@ class BookCellView: UITableViewCell {
case .playlist:
self.accessoryType = .disclosureIndicator

self.progressTrailing.constant = -5.0
if #available(iOS 13.0, *) {
self.progressTrailing.constant = 2.5
} else {
self.progressTrailing.constant = -5.0
}
default:
self.accessoryType = .none

@@ -1,11 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14865.1" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14819.2"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -14,8 +12,8 @@
<tableViewCell contentMode="scaleToFill" restorationIdentifier="BookCellView" selectionStyle="default" indentationWidth="10" reuseIdentifier="BookCellView" rowHeight="86" id="4fw-Bq-hyU" customClass="BookCellView" customModule="BookPlayer" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="375" height="76"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4fw-Bq-hyU" id="cUU-yJ-MnU">
<rect key="frame" x="0.0" y="0.0" width="375" height="75.5"/>
<tableViewCellContentView key="contentView" opaque="NO" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4fw-Bq-hyU" id="cUU-yJ-MnU">
<rect key="frame" x="0.0" y="0.0" width="375" height="76"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fxJ-mz-qEf" customClass="CheckboxSelectionView" customModule="BookPlayer" customModuleProvider="target">
@@ -30,58 +30,6 @@ class PlayerControlsViewController: PlayerContainerViewController, UIGestureReco
}
}

private var currentTimeInContext: TimeInterval {
guard let book = self.book, !book.isFault else {
return 0.0
}

guard
self.prefersChapterContext,
book.hasChapters,
let start = book.currentChapter?.start else {
return book.currentTime
}

return book.currentTime - start
}

private var maxTimeInContext: TimeInterval {
guard let book = self.book, !book.isFault else {
return 0.0
}

guard
self.prefersChapterContext,
book.hasChapters,
let duration = book.currentChapter?.duration else {
let time = self.prefersRemainingTime
? self.currentTimeInContext - book.duration
: book.duration
return time
}

let time = self.prefersRemainingTime
? self.currentTimeInContext - duration
: duration

return time
}

private var durationTimeInContext: TimeInterval {
guard let book = self.book, !book.isFault else {
return 0.0
}

guard
self.prefersChapterContext,
book.hasChapters,
let duration = book.currentChapter?.duration else {
return book.duration
}

return duration
}

private var prefersChapterContext = UserDefaults.standard.bool(forKey: Constants.UserDefaults.chapterContextEnabled.rawValue)

private var prefersRemainingTime = UserDefaults.standard.bool(forKey: Constants.UserDefaults.remainingTimeEnabled.rawValue)
@@ -147,9 +95,11 @@ class PlayerControlsViewController: PlayerContainerViewController, UIGestureReco
}

if !self.progressSlider.isTracking {
self.currentTimeLabel.text = self.formatTime(self.currentTimeInContext)
self.currentTimeLabel.accessibilityLabel = String(describing: "Current Chapter Time: " + VoiceOverService.secondsToMinutes(self.currentTimeInContext))
self.maxTimeButton.setTitle(self.formatTime(self.maxTimeInContext), for: .normal)
self.currentTimeLabel.text = self.formatTime(book.currentTimeInContext(self.prefersChapterContext))
self.currentTimeLabel.accessibilityLabel = String(describing: "Current Chapter Time: " + VoiceOverService.secondsToMinutes(book.currentTimeInContext(self.prefersChapterContext)))

let maxTimeInContext = book.maxTimeInContext(self.prefersChapterContext, self.prefersRemainingTime)
self.maxTimeButton.setTitle(self.formatTime(maxTimeInContext), for: .normal)
let prefix = self.prefersRemainingTime
? "Remaining Chapter Time: "
: "Chapter duration: "
@@ -169,6 +119,7 @@ class PlayerControlsViewController: PlayerContainerViewController, UIGestureReco
let prefix = self.prefersRemainingTime
? "Remaining Book Time: "
: "Book duration: "
let maxTimeInContext = book.maxTimeInContext(self.prefersChapterContext, self.prefersRemainingTime)
self.maxTimeButton.accessibilityLabel = String(describing: prefix + VoiceOverService.secondsToMinutes(maxTimeInContext))
}

@@ -272,7 +223,8 @@ class PlayerControlsViewController: PlayerContainerViewController, UIGestureReco
}

if self.prefersRemainingTime {
self.maxTimeButton.setTitle(self.formatTime(newTimeToDisplay - self.durationTimeInContext), for: .normal)
let durationTimeInContext = book.durationTimeInContext(self.prefersChapterContext)
self.maxTimeButton.setTitle(self.formatTime(newTimeToDisplay - durationTimeInContext), for: .normal)
}
}
}

0 comments on commit 405c9a9

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