Skip to content

Commit

Permalink
Update to use modern swift and remove Carthage
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrobertson authored and Evan Robertson committed Aug 24, 2020
1 parent 6a60911 commit 7db0365
Show file tree
Hide file tree
Showing 20 changed files with 275 additions and 198 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
.DS_Store

# CocoaPods
#
Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Rosco
Native Mac OS X desktop music accessory written in Swift

![Rosco Desktop Image](http://i.imgur.com/0svAhU7.png)
![Rosco Desktop Image](preview.png)

Inspired by [Bowtie app](http://bowtieapp.com) and [Unnamed Theme](http://beautifulblood.deviantart.com/art/Unnamed-255040591).
Bowtie development stopped in early 2012 with a comment that it would be released on Github. While it has a great set of features I wanted to simplify the idea for my needs and introduce some new features.
Expand All @@ -11,29 +11,29 @@ Bowtie development stopped in early 2012 with a comment that it would be release
### Features
- [x] Modern styling using [NSVisualEffectView](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSVisualEffectView_Class/)
- [x] Light and Dark Vibrancy Themes
- [x] Spotify Scripting Bridge Support
- [ ] iTunes Scripting Bridge Support
- [ ] Mopidy Web Socket Support
- [x] Supports system now playing API

### Ideas
- [ ] Hide dock icon
- [ ] Show menu bar icon
- [ ] Show now playing application icon
- [ ] Allow for resizing/scaling
- [ ] Move to different points on the screen

### Requirements
* OS X 10.10 Yosemite
* Xcode 6.3 / Swift 1.2
* [Carthage](https://github.com/Carthage/Carthage)
* OS X 10.14 Yosemite
* Xcode 11 / Swift 5

### Install

Run in Xcode

1. Navigate to root directory in Terminal
2. Run `carthage update`
3. Run `open Rosco.xcodeproj`



To build and open from Terminal

1. Navigate to root directory
2. Run `carthage update`
3. Run `xcodebuild`
4. Run `open ./build/release/rosco.app`

Expand Down
74 changes: 46 additions & 28 deletions Rosco.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@

/* Begin PBXBuildFile section */
2017D4891AE4717D005C398A /* StringExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2017D4881AE4717D005C398A /* StringExtensions.swift */; };
202697EE1ADFBE67006DD45A /* Chronos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 202697ED1ADFBE67006DD45A /* Chronos.framework */; };
202697EF1ADFBE67006DD45A /* Chronos.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 202697ED1ADFBE67006DD45A /* Chronos.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
202697F31ADFCC4A006DD45A /* SpotifyApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 202697F21ADFCC4A006DD45A /* SpotifyApplication.swift */; };
202697F51ADFCE9B006DD45A /* Track.swift in Sources */ = {isa = PBXBuildFile; fileRef = 202697F41ADFCE9B006DD45A /* Track.swift */; };
203AEA501AE3677200B59120 /* SpotifyService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 203AEA4F1AE3677200B59120 /* SpotifyService.swift */; };
203AEA501AE3677200B59120 /* NowPlayingService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 203AEA4F1AE3677200B59120 /* NowPlayingService.swift */; };
20CE9AC61ADFA7DF00258EDA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CE9AC51ADFA7DF00258EDA /* AppDelegate.swift */; };
20CE9ACA1ADFA7DF00258EDA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 20CE9AC91ADFA7DF00258EDA /* Images.xcassets */; };
20CE9ACD1ADFA7DF00258EDA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 20CE9ACB1ADFA7DF00258EDA /* Main.storyboard */; };
20CE9AD91ADFA7DF00258EDA /* RoscoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CE9AD81ADFA7DF00258EDA /* RoscoTests.swift */; };
20CE9AE31ADFA80D00258EDA /* RoscoPanelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CE9AE21ADFA80D00258EDA /* RoscoPanelController.swift */; };
20CE9AE51ADFA85B00258EDA /* RoscoPanel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CE9AE41ADFA85B00258EDA /* RoscoPanel.swift */; };
20CE9AE71ADFA9E800258EDA /* RoscoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20CE9AE61ADFA9E800258EDA /* RoscoView.swift */; };
/* End PBXBuildFile section */

Expand All @@ -39,7 +35,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
202697EF1ADFBE67006DD45A /* Chronos.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -49,9 +44,9 @@
/* Begin PBXFileReference section */
2017D4881AE4717D005C398A /* StringExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringExtensions.swift; sourceTree = "<group>"; };
202697ED1ADFBE67006DD45A /* Chronos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Chronos.framework; path = ../Carthage/Build/Mac/Chronos.framework; sourceTree = "<group>"; };
202697F21ADFCC4A006DD45A /* SpotifyApplication.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpotifyApplication.swift; sourceTree = "<group>"; };
202697F41ADFCE9B006DD45A /* Track.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Track.swift; sourceTree = "<group>"; };
203AEA4F1AE3677200B59120 /* SpotifyService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpotifyService.swift; sourceTree = "<group>"; };
203AEA4F1AE3677200B59120 /* NowPlayingService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NowPlayingService.swift; sourceTree = "<group>"; };
209E954124F34EFF00B17970 /* Rosco.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Rosco.entitlements; sourceTree = "<group>"; };
20CE9AC01ADFA7DF00258EDA /* Rosco.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rosco.app; sourceTree = BUILT_PRODUCTS_DIR; };
20CE9AC41ADFA7DF00258EDA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
20CE9AC51ADFA7DF00258EDA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -61,7 +56,6 @@
20CE9AD71ADFA7DF00258EDA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
20CE9AD81ADFA7DF00258EDA /* RoscoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoscoTests.swift; sourceTree = "<group>"; };
20CE9AE21ADFA80D00258EDA /* RoscoPanelController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoscoPanelController.swift; sourceTree = "<group>"; };
20CE9AE41ADFA85B00258EDA /* RoscoPanel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoscoPanel.swift; sourceTree = "<group>"; };
20CE9AE61ADFA9E800258EDA /* RoscoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoscoView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -70,7 +64,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
202697EE1ADFBE67006DD45A /* Chronos.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -100,18 +93,10 @@
name = Frameworks;
sourceTree = "<group>";
};
202697F11ADFCC26006DD45A /* Script Bridges */ = {
isa = PBXGroup;
children = (
202697F21ADFCC4A006DD45A /* SpotifyApplication.swift */,
);
name = "Script Bridges";
sourceTree = "<group>";
};
203AEA511AE3677B00B59120 /* Services */ = {
isa = PBXGroup;
children = (
203AEA4F1AE3677200B59120 /* SpotifyService.swift */,
203AEA4F1AE3677200B59120 /* NowPlayingService.swift */,
);
name = Services;
sourceTree = "<group>";
Expand All @@ -137,14 +122,13 @@
20CE9AC21ADFA7DF00258EDA /* Rosco */ = {
isa = PBXGroup;
children = (
209E954124F34EFF00B17970 /* Rosco.entitlements */,
20CE9AC91ADFA7DF00258EDA /* Images.xcassets */,
2017D4871AE47164005C398A /* Extensions */,
202697F11ADFCC26006DD45A /* Script Bridges */,
203AEA511AE3677B00B59120 /* Services */,
20CE9ACB1ADFA7DF00258EDA /* Main.storyboard */,
20CE9AC51ADFA7DF00258EDA /* AppDelegate.swift */,
20CE9AE21ADFA80D00258EDA /* RoscoPanelController.swift */,
20CE9AE41ADFA85B00258EDA /* RoscoPanel.swift */,
20CE9AE61ADFA9E800258EDA /* RoscoView.swift */,
202697F41ADFCE9B006DD45A /* Track.swift */,
20CE9AC31ADFA7DF00258EDA /* Supporting Files */,
Expand Down Expand Up @@ -223,21 +207,23 @@
20CE9AB81ADFA7DE00258EDA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = "Evan Robertson";
TargetAttributes = {
20CE9ABF1ADFA7DF00258EDA = {
CreatedOnToolsVersion = 6.3;
LastSwiftMigration = 1160;
};
20CE9AD11ADFA7DF00258EDA = {
CreatedOnToolsVersion = 6.3;
LastSwiftMigration = 1160;
TestTargetID = 20CE9ABF1ADFA7DF00258EDA;
};
};
};
buildConfigurationList = 20CE9ABB1ADFA7DE00258EDA /* Build configuration list for PBXProject "Rosco" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -279,11 +265,9 @@
buildActionMask = 2147483647;
files = (
2017D4891AE4717D005C398A /* StringExtensions.swift in Sources */,
202697F31ADFCC4A006DD45A /* SpotifyApplication.swift in Sources */,
20CE9AE51ADFA85B00258EDA /* RoscoPanel.swift in Sources */,
20CE9AE31ADFA80D00258EDA /* RoscoPanelController.swift in Sources */,
20CE9AC61ADFA7DF00258EDA /* AppDelegate.swift in Sources */,
203AEA501AE3677200B59120 /* SpotifyService.swift in Sources */,
203AEA501AE3677200B59120 /* NowPlayingService.swift in Sources */,
20CE9AE71ADFA9E800258EDA /* RoscoView.swift in Sources */,
202697F51ADFCE9B006DD45A /* Track.swift in Sources */,
);
Expand Down Expand Up @@ -327,19 +311,30 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -355,7 +350,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
Expand All @@ -371,13 +366,23 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
Expand All @@ -393,17 +398,20 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
};
name = Release;
};
20CE9ADD1ADFA7DF00258EDA /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Rosco/Rosco.entitlements;
COMBINE_HIDPI_IMAGES = YES;
ENABLE_HARDENED_RUNTIME = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Rosco",
Expand All @@ -412,15 +420,19 @@
INFOPLIST_FILE = Rosco/Info.plist;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.evanrobertson.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
20CE9ADE1ADFA7DF00258EDA /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Rosco/Rosco.entitlements;
COMBINE_HIDPI_IMAGES = YES;
ENABLE_HARDENED_RUNTIME = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Rosco",
Expand All @@ -429,7 +441,9 @@
INFOPLIST_FILE = Rosco/Info.plist;
LD_DYLIB_INSTALL_NAME = "";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.evanrobertson.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -448,7 +462,9 @@
);
INFOPLIST_FILE = RoscoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.evanrobertson.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rosco.app/Contents/MacOS/Rosco";
};
name = Debug;
Expand All @@ -464,7 +480,9 @@
);
INFOPLIST_FILE = RoscoTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.evanrobertson.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rosco.app/Contents/MacOS/Rosco";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
11 changes: 5 additions & 6 deletions Rosco/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {

var spotifyService: SpotifyService?
var nowPlayingService: NowPlayingService?

func applicationDidFinishLaunching(aNotification: NSNotification) {
spotifyService = SpotifyService()
func applicationDidFinishLaunching(_ notification: Notification) {
nowPlayingService = NowPlayingService()
}

func applicationWillTerminate(aNotification: NSNotification) {
// Insert code here to tear down your application
}

@IBAction func toggleLightDark(sender: NSMenuItem) {
NSNotificationCenter.defaultCenter().postNotificationName("RoscoToggleLightDark", object: nil)
@IBAction func toggleLightDark(_ sender: Any) {
NotificationCenter.default.post(name: Notification.Name("RoscoToggleLightDark"), object: nil)
}

}

Loading

0 comments on commit 7db0365

Please sign in to comment.