From be2e7963bfd04ac40a9f0321079a605bf0c893d0 Mon Sep 17 00:00:00 2001 From: Dennis Oberhoff Date: Thu, 3 Mar 2022 16:41:40 +0100 Subject: [PATCH] Fixed a login issue with spotify --- MusaicFM.xcodeproj/project.pbxproj | 12 ++++++------ MusaicFM/PreferencesViewController.m | 12 ++++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/MusaicFM.xcodeproj/project.pbxproj b/MusaicFM.xcodeproj/project.pbxproj index d9ac311..01d9c87 100644 --- a/MusaicFM.xcodeproj/project.pbxproj +++ b/MusaicFM.xcodeproj/project.pbxproj @@ -529,12 +529,12 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_TEAM = YE33ZK7Z99; INFOPLIST_FILE = MusaicFM/Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 1.2.4; + MARKETING_VERSION = 1.2.5; PRODUCT_BUNDLE_IDENTIFIER = com.obrhoff.MusaicFM; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -548,12 +548,12 @@ CODE_SIGN_IDENTITY = "Developer ID Application: Dennis Oberhoff (YE33ZK7Z99)"; CODE_SIGN_STYLE = Manual; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 13; + CURRENT_PROJECT_VERSION = 14; DEVELOPMENT_TEAM = YE33ZK7Z99; INFOPLIST_FILE = MusaicFM/Info.plist; INSTALL_PATH = "$(HOME)/Library/Screen Savers"; MACOSX_DEPLOYMENT_TARGET = 10.12; - MARKETING_VERSION = 1.2.4; + MARKETING_VERSION = 1.2.5; PRODUCT_BUNDLE_IDENTIFIER = com.obrhoff.MusaicFM; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -642,8 +642,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/SDWebImage/SDWebImage"; requirement = { - kind = exactVersion; - version = 5.11.1; + kind = upToNextMajorVersion; + minimumVersion = 5.11.1; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/MusaicFM/PreferencesViewController.m b/MusaicFM/PreferencesViewController.m index 3e12013..9d40e50 100644 --- a/MusaicFM/PreferencesViewController.m +++ b/MusaicFM/PreferencesViewController.m @@ -193,10 +193,11 @@ - (void)controlTextDidChange:(NSNotification*)obj [self didChangeText]; } -- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler +- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction +decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { - NSURLComponents* components = [NSURLComponents componentsWithURL:webView.URL resolvingAgainstBaseURL:NO]; + NSURLComponents* components = [NSURLComponents componentsWithURL:[navigationAction request].URL resolvingAgainstBaseURL:NO]; NSURLComponents* callbackComponents = [NSURLComponents componentsWithString:spotifyRedirectUrl]; if (![components.scheme isEqualToString:callbackComponents.scheme]) { @@ -231,8 +232,11 @@ - (NSString*)windowNibName - (NSArray*)radioButtons { - return @[ self.lastfmPlayedAlbumsRadio, self.lastFmTagRadio, self.spotifyPlayedAlbumsRadio, - self.spotifyNewRadio, self.spotifyFavoriteSongsRadio]; + return @[ self.lastfmPlayedAlbumsRadio, + self.lastFmTagRadio, + self.spotifyPlayedAlbumsRadio, + self.spotifyNewRadio, + self.spotifyFavoriteSongsRadio]; } @end