Skip to content

Commit

Permalink
cleanup. provided icon and .app bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
schenkty committed Jan 21, 2018
1 parent 471b3bc commit f113077
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 43 deletions.
8 changes: 8 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use_frameworks!

target 'RaiMoon' do

# Pods for RaiMoon
pod 'Alamofire', '~> 4.5'

end
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# RaiMoon
# RaiMoon - Forked

![](https://d2ffutrenqvap3.cloudfront.net/items/3E0z1J1E362n3y2x2g0z/Screen%20Shot%202017-12-28%20at%2011.04.16%20PM.png?v=e6b57b8f)

Current XRB price in ya menu bar, gets price every 60s from [coinmarketcap](https://coinmarketcap.com).

I have no idea how to make OSX apps, or how to use Swift, so no idea how you can run this yourself. 🤷‍

`xrb_3xpaubaeuz8wg1zi1tdkxf8pwb6ngkud9eff9g1bb99mo3fmrzn7gs389yr1`
Current XRB price in menu bar, gets price every 5mins to match data refresh rate of [coinmarketcap](https://coinmarketcap.com).
99 changes: 91 additions & 8 deletions RaiMoon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
3020848B1FF60BD300F3EDCB /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3020848A1FF60BD300F3EDCB /* Alamofire.framework */; };
3020848C1FF60BD300F3EDCB /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3020848A1FF60BD300F3EDCB /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16E6DDC41FEB72104ED9C5F7 /* Pods_RaiMoon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A61ACE72E921A4DAF87C5030 /* Pods_RaiMoon.framework */; };
304F00351FF6030100A51ED2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 304F00341FF6030100A51ED2 /* AppDelegate.swift */; };
304F00391FF6030100A51ED2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 304F00381FF6030100A51ED2 /* Assets.xcassets */; };
304F003C1FF6030100A51ED2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 304F003A1FF6030100A51ED2 /* Main.storyboard */; };
32BA0DB02014651C0079DFC8 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 32BA0DAF2014651C0079DFC8 /* README.md */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -21,41 +21,53 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3020848C1FF60BD300F3EDCB /* Alamofire.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
3020848A1FF60BD300F3EDCB /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/Mac/Alamofire.framework; sourceTree = "<group>"; };
304F00311FF6030100A51ED2 /* RaiMoon.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RaiMoon.app; sourceTree = BUILT_PRODUCTS_DIR; };
304F00341FF6030100A51ED2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
304F00381FF6030100A51ED2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
304F003B1FF6030100A51ED2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
304F003D1FF6030100A51ED2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
304F003E1FF6030100A51ED2 /* RaiMoon.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RaiMoon.entitlements; sourceTree = "<group>"; };
32BA0DAF2014651C0079DFC8 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
93B68CFE8832533F46D1CE33 /* Pods-RaiMoon.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaiMoon.release.xcconfig"; path = "Pods/Target Support Files/Pods-RaiMoon/Pods-RaiMoon.release.xcconfig"; sourceTree = "<group>"; };
A61ACE72E921A4DAF87C5030 /* Pods_RaiMoon.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RaiMoon.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B67F235E50E0E683D855CF85 /* Pods-RaiMoon.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RaiMoon.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RaiMoon/Pods-RaiMoon.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
304F002E1FF6030100A51ED2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
3020848B1FF60BD300F3EDCB /* Alamofire.framework in Frameworks */,
16E6DDC41FEB72104ED9C5F7 /* Pods_RaiMoon.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1BBF47BF32CB69DB02E1E560 /* Pods */ = {
isa = PBXGroup;
children = (
B67F235E50E0E683D855CF85 /* Pods-RaiMoon.debug.xcconfig */,
93B68CFE8832533F46D1CE33 /* Pods-RaiMoon.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
304F00281FF6030100A51ED2 = {
isa = PBXGroup;
children = (
3020848A1FF60BD300F3EDCB /* Alamofire.framework */,
304F00331FF6030100A51ED2 /* RaiMoon */,
304F00321FF6030100A51ED2 /* Products */,
1BBF47BF32CB69DB02E1E560 /* Pods */,
49895F91FF257D47A888062A /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -75,21 +87,33 @@
304F003A1FF6030100A51ED2 /* Main.storyboard */,
304F003D1FF6030100A51ED2 /* Info.plist */,
304F003E1FF6030100A51ED2 /* RaiMoon.entitlements */,
32BA0DAF2014651C0079DFC8 /* README.md */,
);
path = RaiMoon;
sourceTree = "<group>";
};
49895F91FF257D47A888062A /* Frameworks */ = {
isa = PBXGroup;
children = (
A61ACE72E921A4DAF87C5030 /* Pods_RaiMoon.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
304F00301FF6030100A51ED2 /* RaiMoon */ = {
isa = PBXNativeTarget;
buildConfigurationList = 304F00411FF6030100A51ED2 /* Build configuration list for PBXNativeTarget "RaiMoon" */;
buildPhases = (
743F572DADC38289C9F87B1A /* [CP] Check Pods Manifest.lock */,
304F002D1FF6030100A51ED2 /* Sources */,
304F002E1FF6030100A51ED2 /* Frameworks */,
304F002F1FF6030100A51ED2 /* Resources */,
3020848D1FF60BD300F3EDCB /* Embed Frameworks */,
198EE3188F977DFF91453ABA /* [CP] Embed Pods Frameworks */,
6C8ADA9216D4EC9DB65D26C6 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -139,13 +163,68 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
32BA0DB02014651C0079DFC8 /* README.md in Resources */,
304F00391FF6030100A51ED2 /* Assets.xcassets in Resources */,
304F003C1FF6030100A51ED2 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
198EE3188F977DFF91453ABA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RaiMoon/Pods-RaiMoon-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaiMoon/Pods-RaiMoon-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6C8ADA9216D4EC9DB65D26C6 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RaiMoon/Pods-RaiMoon-resources.sh\"\n";
showEnvVarsInLog = 0;
};
743F572DADC38289C9F87B1A /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RaiMoon-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
304F002D1FF6030100A51ED2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -277,37 +356,41 @@
};
304F00421FF6030100A51ED2 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B67F235E50E0E683D855CF85 /* Pods-RaiMoon.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RaiMoon/RaiMoon.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 8AYF758EP8;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = RaiMoon/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.dannytatom.RaiMoon;
PRODUCT_BUNDLE_IDENTIFIER = com.tschenk.RaiMoon;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
304F00431FF6030100A51ED2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 93B68CFE8832533F46D1CE33 /* Pods-RaiMoon.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = RaiMoon/RaiMoon.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 8AYF758EP8;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
INFOPLIST_FILE = RaiMoon/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = me.dannytatom.RaiMoon;
PRODUCT_BUNDLE_IDENTIFIER = com.tschenk.RaiMoon;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
};
Expand Down
15 changes: 8 additions & 7 deletions RaiMoon/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {

fetchPrice()

Timer.scheduledTimer(timeInterval: 60.0, target: self, selector: #selector(fetchPrice), userInfo: nil, repeats: true)
// Pull every 5 mins. Data Source only updates every 5 mins
Timer.scheduledTimer(timeInterval: 300, target: self, selector: #selector(fetchPrice), userInfo: nil, repeats: true)
}

@objc func fetchPrice() {
Expand All @@ -61,14 +62,14 @@ class AppDelegate: NSObject, NSApplicationDelegate {
if let dictionaryArray = data as? Array<Dictionary<String, AnyObject?>> {
let usd = dictionaryArray[0]["price_usd"] as? String

self.item?.title = "XRB $\(usd ?? "???")"
self.item?.title = "XRB: $\(usd ?? "???")"

self.btc?.title = "\(dictionaryArray[0]["price_btc"] as? String ?? "???") BTC"
self.percentChange1h?.title = "1h \(dictionaryArray[0]["percent_change_1h"] as? String ?? "???")%"
self.percentChange24h?.title = "24h \(dictionaryArray[0]["percent_change_24h"] as? String ?? "???")%"
self.percentChange7d?.title = "7d \(dictionaryArray[0]["percent_change_7d"] as? String ?? "???")%"
self.marketCap?.title = "Market Cap $\(dictionaryArray[0]["market_cap_usd"] as? String ?? "???")"
self.rank?.title = "Rank \(dictionaryArray[0]["rank"] as? String ?? "???")"
self.percentChange1h?.title = "1h: \(dictionaryArray[0]["percent_change_1h"] as? String ?? "???")%"
self.percentChange24h?.title = "24h: \(dictionaryArray[0]["percent_change_24h"] as? String ?? "???")%"
self.percentChange7d?.title = "7d: \(dictionaryArray[0]["percent_change_7d"] as? String ?? "???")%"
self.marketCap?.title = "Market Cap: $\(dictionaryArray[0]["market_cap_usd"] as? String ?? "???")"
self.rank?.title = "Rank: \(dictionaryArray[0]["rank"] as? String ?? "???")"
}
}
} else {
Expand Down
40 changes: 25 additions & 15 deletions RaiMoon/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,68 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"images" : [
{
"idiom" : "mac",
"filename" : "icon_16x16.png",
"size" : "16x16",
"idiom" : "mac",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "icon_16x16@2x.png",
"size" : "16x16",
"idiom" : "mac",
"scale" : "2x"
},
{
"idiom" : "mac",
"filename" : "icon_32x32.png",
"size" : "32x32",
"idiom" : "mac",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "icon_32x32@2x.png",
"size" : "32x32",
"idiom" : "mac",
"scale" : "2x"
},
{
"idiom" : "mac",
"filename" : "icon_128x128.png",
"size" : "128x128",
"idiom" : "mac",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "icon_128x128@2x.png",
"size" : "128x128",
"idiom" : "mac",
"scale" : "2x"
},
{
"idiom" : "mac",
"filename" : "icon_256x256.png",
"size" : "256x256",
"idiom" : "mac",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "icon_256x256@2x.png",
"size" : "256x256",
"idiom" : "mac",
"scale" : "2x"
},
{
"idiom" : "mac",
"filename" : "icon_512x512.png",
"size" : "512x512",
"idiom" : "mac",
"scale" : "1x"
},
{
"idiom" : "mac",
"filename" : "icon_512x512@2x.png",
"size" : "512x512",
"idiom" : "mac",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
]
}
4 changes: 2 additions & 2 deletions RaiMoon/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
}
}
8 changes: 5 additions & 3 deletions RaiMoon/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>2</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.finance</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 Danny Tatom. All rights reserved.</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>LSUIElement</key>
<true/>
</dict>
</plist>

0 comments on commit f113077

Please sign in to comment.