Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ target 'flowcus' do

# Pods for flowcus
pod 'Aperture'
pod 'Swifter', '~> 1.5.0'

end
10 changes: 7 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
PODS:
- Aperture (0.2.0)
- Swifter (1.5.0)

DEPENDENCIES:
- Aperture
- Swifter (~> 1.5.0)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
trunk:
- Aperture
- Swifter

SPEC CHECKSUMS:
Aperture: ccc6c1ce5c82b9a96664dc5aafeab914d1d86fc3
Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e

PODFILE CHECKSUM: 2952d9fdf9e3ed60bb421dfe07ed335e58b1a039
PODFILE CHECKSUM: 7d3bedb0c4dd90325f016a45088751633b1da6fc

COCOAPODS: 1.10.1
COCOAPODS: 1.11.3
Binary file removed Template - Icon - App copy.sketch
Binary file not shown.
6 changes: 4 additions & 2 deletions flowcus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,12 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-flowcus/Pods-flowcus-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Aperture/Aperture.framework",
"${BUILT_PRODUCTS_DIR}/Swifter/Swifter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Aperture.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Swifter.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -379,7 +381,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8UB63GVU76;
DEVELOPMENT_TEAM = 29F3MVTSX5;
INFOPLIST_FILE = flowcus/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
Expand All @@ -402,7 +404,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 8UB63GVU76;
DEVELOPMENT_TEAM = 29F3MVTSX5;
INFOPLIST_FILE = flowcus/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.12;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
timestampString = "578756299.730584"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "34"
endingLineNumber = "34"
startingLineNumber = "35"
endingLineNumber = "35"
landmarkName = "ap"
landmarkType = "24">
</BreakpointContent>
Expand Down
3 changes: 1 addition & 2 deletions flowcus/AppDelegate+Handlers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Aperture
extension AppDelegate {

@objc func updateMenuTime() {
return
// return
// let useTime = resumeTime > 0 ? resumeTime : self.timeStarts
if mState.getBar() == kBarStateInProgress {
let animationLeft = Int(CACurrentMediaTime()) - self.timeStarts
Expand Down Expand Up @@ -105,7 +105,6 @@ extension AppDelegate {
self.sound?.play()
self.mState.setBar(bar: kBarStateComplete)
self.renderMenu(state: self.mState.getState())

}
}
}
Expand Down
20 changes: 18 additions & 2 deletions flowcus/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import Cocoa
import AVFoundation
import Aperture
import Swifter

let kBarStateInitial = "initial"
let kBarStateComplete = "complete"
Expand Down Expand Up @@ -83,7 +84,22 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
button.image = NSImage(named: NSImage.Name("f"))
}
}


func startHttpServer () {
do {
let server = HttpServer()
server["/hello"] = { [self] in
print("here we can do our thing");
startRestart()
return .ok(.htmlBody("You asked for \($0)"))
}
try server.start(8080, forceIPv4: false, priority: DispatchQoS.QoSClass.userInteractive)
print("server started!")
} catch {
print("failed to start ")
}
}

func applicationDidFinishLaunching(_ aNotification: Notification) {
makeWindowTransparentAndAlwaysOnTop()
let visibleFrame = NSScreen.main!.visibleFrame
Expand All @@ -97,7 +113,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
window.contentView?.addSubview(v)
renderMenu(state: mState.getState())
setStatusItemIcon()

startHttpServer()
CGDisplayRegisterReconfigurationCallback(coregraphicsReconfiguration, nil)

// appcenter.ms
Expand Down
4 changes: 4 additions & 0 deletions flowcus/flowcus.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
</dict>
</plist>