Skip to content

Commit 890b44c

Browse files
committed
Add Launch at login option
1 parent ce9636c commit 890b44c

File tree

3 files changed

+63
-5
lines changed

3 files changed

+63
-5
lines changed

pullBar.xcodeproj/project.pbxproj

+44-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
7629FBD02A4F713300081779 /* LaunchAtLogin in Frameworks */ = {isa = PBXBuildFile; productRef = 7629FBCF2A4F713300081779 /* LaunchAtLogin */; };
1011
768A4C5528AF253C004E557E /* BottomItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 768A4C5428AF253C004E557E /* BottomItemView.swift */; };
1112
769F4E1B2765A2B900594911 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769F4E1A2765A2B900594911 /* AboutView.swift */; };
1213
769F4E7B277B97B300594911 /* Notifications.swift in Sources */ = {isa = PBXBuildFile; fileRef = 769F4E7A277B97B300594911 /* Notifications.swift */; };
@@ -56,6 +57,7 @@
5657
files = (
5758
8CECBBF82742ABDA00A2802D /* Defaults in Frameworks */,
5859
8CECBBFB2742ABE600A2802D /* Alamofire in Frameworks */,
60+
7629FBD02A4F713300081779 /* LaunchAtLogin in Frameworks */,
5961
76D5F9E428D28958009EBD80 /* KeychainAccess in Frameworks */,
6062
);
6163
runOnlyForDeploymentPostprocessing = 0;
@@ -137,6 +139,7 @@
137139
8CECBBDB2742AAF800A2802D /* Sources */,
138140
8CECBBDC2742AAF800A2802D /* Frameworks */,
139141
8CECBBDD2742AAF800A2802D /* Resources */,
142+
7629FBD12A4F7AB700081779 /* Copy “Launch at Login Helper” */,
140143
);
141144
buildRules = (
142145
);
@@ -147,6 +150,7 @@
147150
8CECBBF72742ABDA00A2802D /* Defaults */,
148151
8CECBBFA2742ABE600A2802D /* Alamofire */,
149152
76D5F9E328D28958009EBD80 /* KeychainAccess */,
153+
7629FBCF2A4F713300081779 /* LaunchAtLogin */,
150154
);
151155
productName = pullBar;
152156
productReference = 8CECBBDF2742AAF800A2802D /* pullBar.app */;
@@ -180,6 +184,7 @@
180184
8CECBBF62742ABDA00A2802D /* XCRemoteSwiftPackageReference "Defaults" */,
181185
8CECBBF92742ABE600A2802D /* XCRemoteSwiftPackageReference "Alamofire" */,
182186
76D5F9E228D28958009EBD80 /* XCRemoteSwiftPackageReference "KeychainAccess" */,
187+
7629FBCE2A4F713300081779 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */,
183188
);
184189
productRefGroup = 8CECBBE02742AAF800A2802D /* Products */;
185190
projectDirPath = "";
@@ -202,6 +207,28 @@
202207
};
203208
/* End PBXResourcesBuildPhase section */
204209

210+
/* Begin PBXShellScriptBuildPhase section */
211+
7629FBD12A4F7AB700081779 /* Copy “Launch at Login Helper” */ = {
212+
isa = PBXShellScriptBuildPhase;
213+
alwaysOutOfDate = 1;
214+
buildActionMask = 2147483647;
215+
files = (
216+
);
217+
inputFileListPaths = (
218+
);
219+
inputPaths = (
220+
);
221+
name = "Copy “Launch at Login Helper”";
222+
outputFileListPaths = (
223+
);
224+
outputPaths = (
225+
);
226+
runOnlyForDeploymentPostprocessing = 0;
227+
shellPath = /bin/sh;
228+
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${BUILT_PRODUCTS_DIR}/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh\"\n";
229+
};
230+
/* End PBXShellScriptBuildPhase section */
231+
205232
/* Begin PBXSourcesBuildPhase section */
206233
8CECBBDB2742AAF800A2802D /* Sources */ = {
207234
isa = PBXSourcesBuildPhase;
@@ -362,7 +389,7 @@
362389
CODE_SIGN_IDENTITY = "-";
363390
CODE_SIGN_STYLE = Automatic;
364391
COMBINE_HIDPI_IMAGES = YES;
365-
CURRENT_PROJECT_VERSION = 1;
392+
CURRENT_PROJECT_VERSION = 10;
366393
DEVELOPMENT_TEAM = UV3HUS49VJ;
367394
ENABLE_HARDENED_RUNTIME = YES;
368395
GENERATE_INFOPLIST_FILE = YES;
@@ -374,7 +401,7 @@
374401
"$(inherited)",
375402
"@executable_path/../Frameworks",
376403
);
377-
MARKETING_VERSION = 1.6;
404+
MARKETING_VERSION = 1.7;
378405
PRODUCT_BUNDLE_IDENTIFIER = debug.com.pavelmakhov.pullBar;
379406
PRODUCT_NAME = "$(TARGET_NAME)";
380407
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -391,7 +418,7 @@
391418
CODE_SIGN_IDENTITY = "-";
392419
CODE_SIGN_STYLE = Automatic;
393420
COMBINE_HIDPI_IMAGES = YES;
394-
CURRENT_PROJECT_VERSION = 1;
421+
CURRENT_PROJECT_VERSION = 10;
395422
DEVELOPMENT_TEAM = UV3HUS49VJ;
396423
ENABLE_HARDENED_RUNTIME = YES;
397424
GENERATE_INFOPLIST_FILE = YES;
@@ -403,7 +430,7 @@
403430
"$(inherited)",
404431
"@executable_path/../Frameworks",
405432
);
406-
MARKETING_VERSION = 1.6;
433+
MARKETING_VERSION = 1.7;
407434
PRODUCT_BUNDLE_IDENTIFIER = com.pavelmakhov.pullBar;
408435
PRODUCT_NAME = "$(TARGET_NAME)";
409436
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -435,6 +462,14 @@
435462
/* End XCConfigurationList section */
436463

437464
/* Begin XCRemoteSwiftPackageReference section */
465+
7629FBCE2A4F713300081779 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */ = {
466+
isa = XCRemoteSwiftPackageReference;
467+
repositoryURL = "https://github.com/sindresorhus/LaunchAtLogin";
468+
requirement = {
469+
branch = main;
470+
kind = branch;
471+
};
472+
};
438473
76D5F9E228D28958009EBD80 /* XCRemoteSwiftPackageReference "KeychainAccess" */ = {
439474
isa = XCRemoteSwiftPackageReference;
440475
repositoryURL = "https://github.com/kishikawakatsumi/KeychainAccess";
@@ -462,6 +497,11 @@
462497
/* End XCRemoteSwiftPackageReference section */
463498

464499
/* Begin XCSwiftPackageProductDependency section */
500+
7629FBCF2A4F713300081779 /* LaunchAtLogin */ = {
501+
isa = XCSwiftPackageProductDependency;
502+
package = 7629FBCE2A4F713300081779 /* XCRemoteSwiftPackageReference "LaunchAtLogin" */;
503+
productName = LaunchAtLogin;
504+
};
465505
76D5F9E328D28958009EBD80 /* KeychainAccess */ = {
466506
isa = XCSwiftPackageProductDependency;
467507
package = 76D5F9E228D28958009EBD80 /* XCRemoteSwiftPackageReference "KeychainAccess" */;

pullBar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

+9
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
"revision" : "84e546727d66f1adc5439debad16270d0fdd04e7",
2727
"version" : "4.2.2"
2828
}
29+
},
30+
{
31+
"identity" : "launchatlogin",
32+
"kind" : "remoteSourceControl",
33+
"location" : "https://github.com/sindresorhus/LaunchAtLogin",
34+
"state" : {
35+
"branch" : "main",
36+
"revision" : "7ad6331f9c38953eb1ce8737758e18f7607e984a"
37+
}
2938
}
3039
],
3140
"version" : 2

pullBar/Views/PreferencesView.swift

+10-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import SwiftUI
99
import Defaults
1010
import KeychainAccess
11+
import LaunchAtLogin
1112

1213
struct PreferencesView: View {
1314

@@ -27,7 +28,8 @@ struct PreferencesView: View {
2728
@State private var showGhAlert = false
2829

2930
@StateObject private var githubTokenValidator = GithubTokenValidator()
30-
31+
@ObservedObject private var launchAtLogin = LaunchAtLogin.observable
32+
3133
var body: some View {
3234
Form {
3335
Section {
@@ -134,6 +136,13 @@ struct PreferencesView: View {
134136
.pickerStyle(MenuPickerStyle())
135137
.frame(width: 100)
136138
}
139+
140+
HStack(alignment: .center) {
141+
Text("Launch at login:").frame(width: 120, alignment: .trailing)
142+
Toggle("", isOn: $launchAtLogin.isEnabled)
143+
144+
}
145+
137146
}
138147
}
139148
.padding()

0 commit comments

Comments
 (0)