This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -crB -x S SpotifyAPIExampleApp-main/SpotifyAPIExampleApp/Model/Spotify.swift SpotifyAPIExampleApp-PKCE/SpotifyAPIExampleApp/Model/Spotify.swift | |
*** SpotifyAPIExampleApp-main/SpotifyAPIExampleApp/Model/Spotify.swift Thu Feb 16 22:38:40 2023 | |
--- SpotifyAPIExampleApp-PKCE/SpotifyAPIExampleApp/Model/Spotify.swift Tue Jan 23 11:35:44 2024 | |
*************** | |
*** 22,35 **** | |
fatalError("Could not find 'CLIENT_ID' in environment variables") | |
}() | |
- private static let clientSecret: String = { | |
- if let clientSecret = ProcessInfo.processInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)ks_tryToMakeObjectsPerformSelector:(SEL)selector withObject:(id)object; | |
{ | |
for (id <NSObject> anObject in self) | |
{ | |
if ([anObject respondsToSelector:selector]) | |
{ | |
[anObject performSelector:selector withObject:object]; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (NSData *)dataWithBase64EncodedString:(NSString *)base64String | |
{ | |
NSData *retVal = nil; | |
if([base64String canBeConvertedToEncoding:NSASCIIStringEncoding]) | |
{ | |
NSData *stringData = [base64String dataUsingEncoding: NSASCIIStringEncoding]; | |
/* base64 decode | |
* in -- input data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) scrollToVisible:(id)unused | |
{ | |
// Only show bottom if we are already scrolled down at/near the bottom. | |
NSScrollView *scrollView = [oLog enclosingScrollView]; | |
NSPoint currentScrollPosition=[[scrollView contentView] bounds].origin; | |
float diff = oLog.frame.size.height - (scrollView.contentSize.height + currentScrollPosition.y); | |
if (diff < 50) // Seems like it's often 39 when we're at the bottom, so give some slack. | |
{ | |
// [oLog scrollRangeToVisible:NSMakeRange([[oLog textStorage] length], 0)]; |