diff --git a/Apps/Relisten/RLAppDelegate.swift b/Apps/Relisten/RLAppDelegate.swift index f589bf66..5ea29097 100644 --- a/Apps/Relisten/RLAppDelegate.swift +++ b/Apps/Relisten/RLAppDelegate.swift @@ -16,8 +16,10 @@ import AsyncDisplayKit import Fabric import Crashlytics +import GoogleCast + @UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate, RelistenAppDelegate { +class AppDelegate: UIResponder, UIApplicationDelegate, RelistenAppDelegate, GCKLoggerDelegate { var window: UIWindow? public var rootNavigationController: RelistenNavigationController! = nil @@ -46,6 +48,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, RelistenAppDelegate { RelistenApp.sharedApp.setupThirdPartyDependencies() + // Set up Chromecast support + let criteria = GCKDiscoveryCriteria(applicationID: kGCKDefaultMediaReceiverApplicationID) + let options = GCKCastOptions(discoveryCriteria: criteria) + GCKCastContext.setSharedInstanceWith(options) + GCKLogger.sharedInstance().delegate = self + window = UIWindow(frame: UIScreen.main.bounds) // (farkas) Yuck. We have to get the standard switch bounds on the main thread, and state restoration means we might try to get it on load which deadlocks with other Texture stuff running on the main thread. diff --git a/Podfile b/Podfile index e5b44790..c2d24637 100644 --- a/Podfile +++ b/Podfile @@ -19,6 +19,7 @@ def apply_pods pod 'Fabric' pod 'FastImageCache', :git => "https://github.com/mallorypaine/FastImageCache.git" # The new official fork pod 'FaveButton', :git => "https://github.com/farktronix/fave-button.git" # Waiting on https://github.com/xhamr/fave-button/pull/42 + pod 'google-cast-sdk' pod 'KASlideShow' pod 'LastFm', :git => "https://github.com/farktronix/LastFm.git" # Waiting on https://github.com/gangverk/LastFm/pull/20 pod 'LicensesViewController', :git => "https://github.com/tsukisa/LicenseGenerator-iOS.git" diff --git a/Podfile.lock b/Podfile.lock index 9737613e..7123d808 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -2,6 +2,7 @@ PODS: - ActionKit (2.5.3) - AGAudioPlayer (0.8.2): - BASSGaplessAudioPlayer + - google-cast-sdk - Interpolate - MarqueeLabel - NapySlider @@ -23,7 +24,15 @@ PODS: - Fabric (1.10.2) - FastImageCache (1.5.1) - FaveButton (3.2.2) - - Interpolate (1.3.0) + - google-cast-sdk (4.5.3): + - google-cast-sdk/Core (= 4.5.3) + - GTMSessionFetcher/Core (~> 1.1) + - Protobuf (~> 3.13) + - google-cast-sdk/Core (4.5.3): + - GTMSessionFetcher/Core (~> 1.1) + - Protobuf (~> 3.13) + - GTMSessionFetcher/Core (1.5.0) + - Interpolate (1.3.1) - KASlideShow (3.0.0): - SDWebImage (~> 3.8) - KissXML (5.0.3): @@ -44,24 +53,25 @@ PODS: - PinpointKit/Core (= 1.5.0) - PinpointKit/Core (1.5.0) - PinpointKit/ScreenshotDetector (1.5.0) - - Realm (10.1.1): - - Realm/Headers (= 10.1.1) - - Realm/Headers (10.1.1) + - Protobuf (3.14.0) + - Realm (10.5.2): + - Realm/Headers (= 10.5.2) + - Realm/Headers (10.5.2) - RealmConverter (0.5.3): - CSwiftV - PathKit - Realm (~> 10.0) - SSZipArchive - TGSpreadsheetWriter - - RealmSwift (10.1.1): - - Realm (= 10.1.1) - - Reveal-SDK (26) + - RealmSwift (10.5.2): + - Realm (= 10.5.2) + - Reveal-SDK (27) - SDCloudUserDefaults (1.0.2) - SDWebImage (3.8.3): - SDWebImage/Core (= 3.8.3) - SDWebImage/Core (3.8.3) - - Siesta/Core (1.5.1) - - Siesta/UI (1.5.1): + - Siesta/Core (1.5.2) + - Siesta/UI (1.5.2): - Siesta/Core - SimulatorStatusMagic (2.4.1) - SINQ (0.7.0) @@ -74,7 +84,7 @@ PODS: - Texture/Core (3.0.0) - Texture/MapKit (3.0.0): - Texture/Core - - Wormholy (1.6.3) + - Wormholy (1.6.4) DEPENDENCIES: - ActionKit @@ -94,6 +104,7 @@ DEPENDENCIES: - Fabric - FastImageCache (from `https://github.com/mallorypaine/FastImageCache.git`) - FaveButton (from `https://github.com/farktronix/fave-button.git`) + - google-cast-sdk - KASlideShow - LastFm (from `https://github.com/farktronix/LastFm.git`) - LicensesViewController (from `https://github.com/tsukisa/LicenseGenerator-iOS.git`) @@ -132,6 +143,8 @@ SPEC REPOS: - DZNEmptyDataSet - EDColor - Fabric + - google-cast-sdk + - GTMSessionFetcher - Interpolate - KASlideShow - KissXML @@ -140,6 +153,7 @@ SPEC REPOS: - NapySlider - PathKit - PinpointKit + - Protobuf - Realm - RealmSwift - Reveal-SDK @@ -210,12 +224,12 @@ CHECKOUT OPTIONS: :commit: 7159a9cd67eacf8d49d4ad5f847623017e2ebaba :git: https://github.com/farktronix/Observable.git RealmConverter: - :commit: fc50dd4ad565af96362fc6da84bb44ce6937ed5a + :commit: 7620605946cc55910422246dade1a1c7745a7bc7 :git: https://github.com/farktronix/realm-cocoa-converter.git SPEC CHECKSUMS: ActionKit: c1b6427fd36a0fe2223555679bcc5dea437af5b3 - AGAudioPlayer: d1c572757f190502712aa2c6bfa74d646022fba6 + AGAudioPlayer: ebb639362e2112c7c561d0a45e418dd35a5835ff AXRatingView: b975cd1a11c6c2e76c8999c166e089ed26f54133 BASSGaplessAudioPlayer: 5b074495769769192b720c70aa2a60f6f33751f3 Cache: 4ca7e00363fca5455f26534e5607634c820ffc2d @@ -231,7 +245,9 @@ SPEC CHECKSUMS: Fabric: ea977e3cd9c20425516d3dafd3bf8c941c51223f FastImageCache: 9defcc791b9db343858b55ab2fadfd0139f5d529 FaveButton: 4c2ec413f2d31dc3ff50ed36ce0af8bc364160bd - Interpolate: 99edce3f72d84d1b9fdc3f769c775b6ade7f92e9 + google-cast-sdk: f94c5df87564f71d4342400b8487665e9bed27c6 + GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 + Interpolate: 490b5a7bdaeb00f86c69b61aa87cab59f6f8d703 KASlideShow: d737c734ee603ed4fc7de09876d5193192e74ee4 KissXML: d19dd6dc65e0dc721ba92b3077b8ebdd240f1c1e LastFm: a624fa250bbda5950fccbd068ea7950dcba2da1f @@ -243,13 +259,14 @@ SPEC CHECKSUMS: Observable: bdfa770fc9d925b997d186b09860a0bcdd6f9690 PathKit: 364e0de7fb5adb142aecab4e112187e5548fc4b6 PinpointKit: 8599f60b7cff2b65e52a10293c220b6b81f14839 - Realm: 784ca1da1453e31a9c9adc14445421a81f316119 + Protobuf: 0cde852566359049847168e51bd1c690e0f70056 + Realm: 2e1bc0d28301006176692da234deff51f867d5ae RealmConverter: 763536a2d227b90d4d97a3c1056a81aca3c0ceb5 - RealmSwift: cc52fe0dcea56387274dff36e19219e055a3bb84 - Reveal-SDK: 5f94f14aff3d5f2a49f246edcd266fa4472679e9 + RealmSwift: a522ad39715e8b4e491af4460059bc32b84f5a9b + Reveal-SDK: 306e2880395ee396f5a8b4c485c3a86dd19866c7 SDCloudUserDefaults: cacf733d192160d94364efab8548ae3302615a65 SDWebImage: a72e880a8fe0f7fc31efe15aaed443c074d2a80c - Siesta: 0b689eff328778c754c4f9afe33ffd70af5ada3d + Siesta: d1e1966af43ffca170f658ad6d987228a5b40873 SimulatorStatusMagic: 28d4a9d1a500ac7cea0b2b5a43c1c6ddb40ba56c SINQ: 64cab7b7c73486da8f4442c25ccdd6ada7e67b95 SQLite.swift: d2b4642190917051ce6bd1d49aab565fe794eea3 @@ -257,8 +274,8 @@ SPEC CHECKSUMS: SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 Texture: 2f109e937850d94d1d07232041c9c7313ccddb81 - Wormholy: bfc1c8679eefd0edd92638758e21c3961b1b3b50 + Wormholy: 2e70f64227e010d363f8d33268369f77faf12471 -PODFILE CHECKSUM: bcd9a9870c6d6a515915037bea253b69475b4d77 +PODFILE CHECKSUM: 50377538c966d9ddb22f7b251b30d38a70ea98fd COCOAPODS: 1.10.0 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index 9737613e..7123d808 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -2,6 +2,7 @@ PODS: - ActionKit (2.5.3) - AGAudioPlayer (0.8.2): - BASSGaplessAudioPlayer + - google-cast-sdk - Interpolate - MarqueeLabel - NapySlider @@ -23,7 +24,15 @@ PODS: - Fabric (1.10.2) - FastImageCache (1.5.1) - FaveButton (3.2.2) - - Interpolate (1.3.0) + - google-cast-sdk (4.5.3): + - google-cast-sdk/Core (= 4.5.3) + - GTMSessionFetcher/Core (~> 1.1) + - Protobuf (~> 3.13) + - google-cast-sdk/Core (4.5.3): + - GTMSessionFetcher/Core (~> 1.1) + - Protobuf (~> 3.13) + - GTMSessionFetcher/Core (1.5.0) + - Interpolate (1.3.1) - KASlideShow (3.0.0): - SDWebImage (~> 3.8) - KissXML (5.0.3): @@ -44,24 +53,25 @@ PODS: - PinpointKit/Core (= 1.5.0) - PinpointKit/Core (1.5.0) - PinpointKit/ScreenshotDetector (1.5.0) - - Realm (10.1.1): - - Realm/Headers (= 10.1.1) - - Realm/Headers (10.1.1) + - Protobuf (3.14.0) + - Realm (10.5.2): + - Realm/Headers (= 10.5.2) + - Realm/Headers (10.5.2) - RealmConverter (0.5.3): - CSwiftV - PathKit - Realm (~> 10.0) - SSZipArchive - TGSpreadsheetWriter - - RealmSwift (10.1.1): - - Realm (= 10.1.1) - - Reveal-SDK (26) + - RealmSwift (10.5.2): + - Realm (= 10.5.2) + - Reveal-SDK (27) - SDCloudUserDefaults (1.0.2) - SDWebImage (3.8.3): - SDWebImage/Core (= 3.8.3) - SDWebImage/Core (3.8.3) - - Siesta/Core (1.5.1) - - Siesta/UI (1.5.1): + - Siesta/Core (1.5.2) + - Siesta/UI (1.5.2): - Siesta/Core - SimulatorStatusMagic (2.4.1) - SINQ (0.7.0) @@ -74,7 +84,7 @@ PODS: - Texture/Core (3.0.0) - Texture/MapKit (3.0.0): - Texture/Core - - Wormholy (1.6.3) + - Wormholy (1.6.4) DEPENDENCIES: - ActionKit @@ -94,6 +104,7 @@ DEPENDENCIES: - Fabric - FastImageCache (from `https://github.com/mallorypaine/FastImageCache.git`) - FaveButton (from `https://github.com/farktronix/fave-button.git`) + - google-cast-sdk - KASlideShow - LastFm (from `https://github.com/farktronix/LastFm.git`) - LicensesViewController (from `https://github.com/tsukisa/LicenseGenerator-iOS.git`) @@ -132,6 +143,8 @@ SPEC REPOS: - DZNEmptyDataSet - EDColor - Fabric + - google-cast-sdk + - GTMSessionFetcher - Interpolate - KASlideShow - KissXML @@ -140,6 +153,7 @@ SPEC REPOS: - NapySlider - PathKit - PinpointKit + - Protobuf - Realm - RealmSwift - Reveal-SDK @@ -210,12 +224,12 @@ CHECKOUT OPTIONS: :commit: 7159a9cd67eacf8d49d4ad5f847623017e2ebaba :git: https://github.com/farktronix/Observable.git RealmConverter: - :commit: fc50dd4ad565af96362fc6da84bb44ce6937ed5a + :commit: 7620605946cc55910422246dade1a1c7745a7bc7 :git: https://github.com/farktronix/realm-cocoa-converter.git SPEC CHECKSUMS: ActionKit: c1b6427fd36a0fe2223555679bcc5dea437af5b3 - AGAudioPlayer: d1c572757f190502712aa2c6bfa74d646022fba6 + AGAudioPlayer: ebb639362e2112c7c561d0a45e418dd35a5835ff AXRatingView: b975cd1a11c6c2e76c8999c166e089ed26f54133 BASSGaplessAudioPlayer: 5b074495769769192b720c70aa2a60f6f33751f3 Cache: 4ca7e00363fca5455f26534e5607634c820ffc2d @@ -231,7 +245,9 @@ SPEC CHECKSUMS: Fabric: ea977e3cd9c20425516d3dafd3bf8c941c51223f FastImageCache: 9defcc791b9db343858b55ab2fadfd0139f5d529 FaveButton: 4c2ec413f2d31dc3ff50ed36ce0af8bc364160bd - Interpolate: 99edce3f72d84d1b9fdc3f769c775b6ade7f92e9 + google-cast-sdk: f94c5df87564f71d4342400b8487665e9bed27c6 + GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52 + Interpolate: 490b5a7bdaeb00f86c69b61aa87cab59f6f8d703 KASlideShow: d737c734ee603ed4fc7de09876d5193192e74ee4 KissXML: d19dd6dc65e0dc721ba92b3077b8ebdd240f1c1e LastFm: a624fa250bbda5950fccbd068ea7950dcba2da1f @@ -243,13 +259,14 @@ SPEC CHECKSUMS: Observable: bdfa770fc9d925b997d186b09860a0bcdd6f9690 PathKit: 364e0de7fb5adb142aecab4e112187e5548fc4b6 PinpointKit: 8599f60b7cff2b65e52a10293c220b6b81f14839 - Realm: 784ca1da1453e31a9c9adc14445421a81f316119 + Protobuf: 0cde852566359049847168e51bd1c690e0f70056 + Realm: 2e1bc0d28301006176692da234deff51f867d5ae RealmConverter: 763536a2d227b90d4d97a3c1056a81aca3c0ceb5 - RealmSwift: cc52fe0dcea56387274dff36e19219e055a3bb84 - Reveal-SDK: 5f94f14aff3d5f2a49f246edcd266fa4472679e9 + RealmSwift: a522ad39715e8b4e491af4460059bc32b84f5a9b + Reveal-SDK: 306e2880395ee396f5a8b4c485c3a86dd19866c7 SDCloudUserDefaults: cacf733d192160d94364efab8548ae3302615a65 SDWebImage: a72e880a8fe0f7fc31efe15aaed443c074d2a80c - Siesta: 0b689eff328778c754c4f9afe33ffd70af5ada3d + Siesta: d1e1966af43ffca170f658ad6d987228a5b40873 SimulatorStatusMagic: 28d4a9d1a500ac7cea0b2b5a43c1c6ddb40ba56c SINQ: 64cab7b7c73486da8f4442c25ccdd6ada7e67b95 SQLite.swift: d2b4642190917051ce6bd1d49aab565fe794eea3 @@ -257,8 +274,8 @@ SPEC CHECKSUMS: SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6 SwiftyJSON: 36413e04c44ee145039d332b4f4e2d3e8d6c4db7 Texture: 2f109e937850d94d1d07232041c9c7313ccddb81 - Wormholy: bfc1c8679eefd0edd92638758e21c3961b1b3b50 + Wormholy: 2e70f64227e010d363f8d33268369f77faf12471 -PODFILE CHECKSUM: bcd9a9870c6d6a515915037bea253b69475b4d77 +PODFILE CHECKSUM: 50377538c966d9ddb22f7b251b30d38a70ea98fd COCOAPODS: 1.10.0 diff --git a/RelistenTests/RelistenUITests.swift b/RelistenTests/RelistenUITests.swift index 9c3f4bbe..4af8b7d5 100644 --- a/RelistenTests/RelistenUITests.swift +++ b/RelistenTests/RelistenUITests.swift @@ -52,7 +52,7 @@ class RelistenUITests: XCTestCase { tablesQuery.buttons["years"].tap() // YearViewController - tablesQuery.cells.staticTexts["1966"].tap() + tablesQuery.cells.staticTexts["1966"].firstMatch.tap() // SourcesViewController tablesQuery.staticTexts["1966-01-08"].tap() diff --git a/Shared/Playback/PlaybackController.swift b/Shared/Playback/PlaybackController.swift index 6dc41d20..6cdfd447 100644 --- a/Shared/Playback/PlaybackController.swift +++ b/Shared/Playback/PlaybackController.swift @@ -198,6 +198,7 @@ extension PlaybackController : AGAudioPlayerViewControllerPresentationDelegate { public func fullPlayerDismissRequested(fromProgress: CGFloat) { self.viewController.viewWillDisappear(true) + self.viewController.switchToMiniPlayer(animated: true) UIView.animate(withDuration: 0.3, animations: { self.fullPlayerDismissProgress(1.0)