Skip to content

Commit 28f0ee0

Browse files
first commit
0 parents  commit 28f0ee0

43 files changed

Lines changed: 3582 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
# Created by https://www.gitignore.io/api/macos,swift
3+
# Edit at https://www.gitignore.io/?templates=macos,swift
4+
5+
### macOS ###
6+
# General
7+
.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
11+
# Icon must end with two \r
12+
Icon
13+
14+
# Thumbnails
15+
._*
16+
17+
# Files that might appear in the root of a volume
18+
.DocumentRevisions-V100
19+
.fseventsd
20+
.Spotlight-V100
21+
.TemporaryItems
22+
.Trashes
23+
.VolumeIcon.icns
24+
.com.apple.timemachine.donotpresent
25+
26+
# Directories potentially created on remote AFP share
27+
.AppleDB
28+
.AppleDesktop
29+
Network Trash Folder
30+
Temporary Items
31+
.apdisk
32+
33+
### Swift ###
34+
# Xcode
35+
#
36+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
37+
38+
## Build generated
39+
build/
40+
DerivedData/
41+
42+
## Various settings
43+
*.pbxuser
44+
!default.pbxuser
45+
*.mode1v3
46+
!default.mode1v3
47+
*.mode2v3
48+
!default.mode2v3
49+
*.perspectivev3
50+
!default.perspectivev3
51+
xcuserdata/
52+
53+
## Other
54+
*.moved-aside
55+
*.xccheckout
56+
*.xcscmblueprint
57+
58+
## Obj-C/Swift specific
59+
*.hmap
60+
*.ipa
61+
*.dSYM.zip
62+
*.dSYM
63+
64+
## Playgrounds
65+
timeline.xctimeline
66+
playground.xcworkspace
67+
68+
# Swift Package Manager
69+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
70+
# Packages/
71+
# Package.pins
72+
# Package.resolved
73+
.build/
74+
75+
# CocoaPods
76+
# We recommend against adding the Pods directory to your .gitignore. However
77+
# you should judge for yourself, the pros and cons are mentioned at:
78+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
79+
# Pods/
80+
# Add this line if you want to avoid checking in source code from the Xcode workspace
81+
# *.xcworkspace
82+
83+
# Carthage
84+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
85+
# Carthage/Checkouts
86+
87+
Carthage/Build
88+
89+
# fastlane
90+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
91+
# screenshots whenever they are needed.
92+
# For more information about the recommended setup visit:
93+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
94+
95+
fastlane/report.xml
96+
fastlane/Preview.html
97+
fastlane/screenshots/**/*.png
98+
fastlane/test_output
99+
100+
# Code Injection
101+
# After new code Injection tools there's a generated folder /iOSInjectionProject
102+
# https://github.com/johnno1962/injectionforxcode
103+
104+
iOSInjectionProject/
105+
106+
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
107+
*.xcscmblueprint
108+
*.xccheckout
109+
110+
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
111+
build/
112+
DerivedData/
113+
*.moved-aside
114+
*.pbxuser
115+
!default.pbxuser
116+
*.mode1v3
117+
!default.mode1v3
118+
*.mode2v3
119+
!default.mode2v3
120+
*.perspectivev3
121+
!default.perspectivev3
122+
123+
### Xcode Patch ###
124+
*.xcodeproj/*
125+
!*.xcodeproj/project.pbxproj
126+
!*.xcodeproj/xcshareddata/
127+
!*.xcworkspace/contents.xcworkspacedata
128+
/*.gcno
129+
**/xcshareddata/WorkspaceSettings.xcsettings
130+
131+
# End of https://www.gitignore.io/api/macos,swift
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
//
2+
// AppDelegate.swift
3+
// LauncherApplication
4+
//
5+
// Created by Thanh Nguyen on 1/28/19.
6+
// Copyright © 2019 Thanh Nguyen. All rights reserved.
7+
//
8+
9+
import Cocoa
10+
11+
12+
extension Notification.Name {
13+
static let killLauncher = Notification.Name("killLauncher")
14+
}
15+
16+
@NSApplicationMain
17+
class AppDelegate: NSObject, NSApplicationDelegate {
18+
19+
@objc func terminate() {
20+
NSApp.terminate(nil)
21+
}
22+
23+
func applicationDidFinishLaunching(_ aNotification: Notification) {
24+
let mainAppIdentifier = "com.dwarvesv.hidden"
25+
let runningApps = NSWorkspace.shared.runningApplications
26+
let isRunning = !runningApps.filter { $0.bundleIdentifier == mainAppIdentifier }.isEmpty
27+
28+
if !isRunning {
29+
DistributedNotificationCenter.default().addObserver(self,
30+
selector: #selector(self.terminate),
31+
name: .killLauncher,
32+
object: mainAppIdentifier)
33+
34+
let path = Bundle.main.bundlePath as NSString
35+
var components = path.pathComponents
36+
components.removeLast(3)
37+
components.append("MacOS")
38+
components.append("Hidden") //main app name
39+
let _ = NSString.path(withComponents: components)
40+
41+
NSWorkspace.shared.launchApplication("Hidden")
42+
}
43+
else {
44+
self.terminate()
45+
}
46+
}
47+
48+
func applicationWillTerminate(_ aNotification: Notification) {
49+
// Insert code here to tear down your application
50+
}
51+
52+
53+
}
54+
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "mac",
5+
"size" : "16x16",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "mac",
10+
"size" : "16x16",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "mac",
15+
"size" : "32x32",
16+
"scale" : "1x"
17+
},
18+
{
19+
"idiom" : "mac",
20+
"size" : "32x32",
21+
"scale" : "2x"
22+
},
23+
{
24+
"idiom" : "mac",
25+
"size" : "128x128",
26+
"scale" : "1x"
27+
},
28+
{
29+
"idiom" : "mac",
30+
"size" : "128x128",
31+
"scale" : "2x"
32+
},
33+
{
34+
"idiom" : "mac",
35+
"size" : "256x256",
36+
"scale" : "1x"
37+
},
38+
{
39+
"idiom" : "mac",
40+
"size" : "256x256",
41+
"scale" : "2x"
42+
},
43+
{
44+
"idiom" : "mac",
45+
"size" : "512x512",
46+
"scale" : "1x"
47+
},
48+
{
49+
"idiom" : "mac",
50+
"size" : "512x512",
51+
"scale" : "2x"
52+
}
53+
],
54+
"info" : {
55+
"version" : 1,
56+
"author" : "xcode"
57+
}
58+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}

0 commit comments

Comments
 (0)