diff --git a/Podfile b/Podfile
index 6c27b71..9584a2f 100644
--- a/Podfile
+++ b/Podfile
@@ -8,5 +8,6 @@ target 'flowcus' do
# Pods for flowcus
pod 'Aperture'
+ pod 'Swifter', '~> 1.5.0'
end
diff --git a/Podfile.lock b/Podfile.lock
index 9a43ee2..a6f1ac9 100644
--- a/Podfile.lock
+++ b/Podfile.lock
@@ -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
diff --git a/Template - Icon - App copy.sketch b/Template - Icon - App copy.sketch
deleted file mode 100644
index 881101d..0000000
Binary files a/Template - Icon - App copy.sketch and /dev/null differ
diff --git a/flowcus.xcodeproj/project.pbxproj b/flowcus.xcodeproj/project.pbxproj
index cc7d96c..7d65fc4 100644
--- a/flowcus.xcodeproj/project.pbxproj
+++ b/flowcus.xcodeproj/project.pbxproj
@@ -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;
@@ -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;
@@ -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;
diff --git a/flowcus.xcworkspace/xcuserdata/alfonso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/flowcus.xcworkspace/xcuserdata/alfonso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
index 1987703..22b65b1 100644
--- a/flowcus.xcworkspace/xcuserdata/alfonso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+++ b/flowcus.xcworkspace/xcuserdata/alfonso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -15,8 +15,8 @@
timestampString = "578756299.730584"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "34"
- endingLineNumber = "34"
+ startingLineNumber = "35"
+ endingLineNumber = "35"
landmarkName = "ap"
landmarkType = "24">
diff --git a/flowcus/AppDelegate+Handlers.swift b/flowcus/AppDelegate+Handlers.swift
index 7383e0a..74b5459 100644
--- a/flowcus/AppDelegate+Handlers.swift
+++ b/flowcus/AppDelegate+Handlers.swift
@@ -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
@@ -105,7 +105,6 @@ extension AppDelegate {
self.sound?.play()
self.mState.setBar(bar: kBarStateComplete)
self.renderMenu(state: self.mState.getState())
-
}
}
}
diff --git a/flowcus/AppDelegate.swift b/flowcus/AppDelegate.swift
index c71a49e..f1dd9b2 100644
--- a/flowcus/AppDelegate.swift
+++ b/flowcus/AppDelegate.swift
@@ -9,6 +9,7 @@
import Cocoa
import AVFoundation
import Aperture
+import Swifter
let kBarStateInitial = "initial"
let kBarStateComplete = "complete"
@@ -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
@@ -97,7 +113,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
window.contentView?.addSubview(v)
renderMenu(state: mState.getState())
setStatusItemIcon()
-
+ startHttpServer()
CGDisplayRegisterReconfigurationCallback(coregraphicsReconfiguration, nil)
// appcenter.ms
diff --git a/flowcus/flowcus.entitlements b/flowcus/flowcus.entitlements
index 7e7616f..a35accc 100644
--- a/flowcus/flowcus.entitlements
+++ b/flowcus/flowcus.entitlements
@@ -8,5 +8,9 @@
com.apple.security.device.audio-input
+ com.apple.security.network.client
+
+ com.apple.security.network.server
+