Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1afaf8428b | ||
|
|
159c990131 | ||
|
|
1c796f0272 | ||
|
|
d31612c467 | ||
|
|
685cc1b6df | ||
|
|
fe7864b7ec | ||
|
|
1e6b409150 | ||
|
|
d9629a01da | ||
|
|
b18597c0ee | ||
|
|
d8d5b27d08 | ||
|
|
a255dc000c | ||
|
|
ac0fbec55d | ||
|
|
e8f96a07a4 | ||
|
|
61926815e2 | ||
|
|
903ab65593 | ||
|
|
66f701d357 | ||
|
|
b5fc3c2a2d | ||
|
|
00f88889a2 |
+1
-2
@@ -1,2 +1 @@
|
||||
* text=auto
|
||||
*.swift text eol=lf
|
||||
* text=auto eol=lf
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'LaunchAtLogin'
|
||||
s.version = '2.3.0'
|
||||
s.summary = 'Add "Launch at Login" functionality to your sandboxed macOS app in seconds'
|
||||
s.license = 'MIT'
|
||||
s.homepage = 'https://github.com/sindresorhus/LaunchAtLogin'
|
||||
s.social_media_url = 'https://twitter.com/sindresorhus'
|
||||
s.authors = { 'Sindre Sorhus' => 'sindresorhus@gmail.com' }
|
||||
s.source = { :git => 'https://github.com/sindresorhus/LaunchAtLogin.git', :tag => "v#{s.version}" }
|
||||
s.source_files = 'LaunchAtLogin', 'LaunchAtLoginHelper'
|
||||
s.resource = 'LaunchAtLogin/copy-helper.sh'
|
||||
s.swift_version = '4.2'
|
||||
s.platform = :macos, '10.12'
|
||||
end
|
||||
@@ -3,7 +3,7 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
E32E9B631EB87D7B000FEEE9 /* LaunchAtLogin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LaunchAtLogin.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E32E9B661EB87D7B000FEEE9 /* LaunchAtLogin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LaunchAtLogin.h; sourceTree = "<group>"; };
|
||||
E32E9B661EB87D7B000FEEE9 /* LaunchAtLogin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = LaunchAtLogin.h; sourceTree = "<group>"; usesTabs = 1; };
|
||||
E32E9B671EB87D7B000FEEE9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
E32E9B6E1EB87DC5000FEEE9 /* LaunchAtLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LaunchAtLogin.swift; sourceTree = "<group>"; };
|
||||
E32E9B6E1EB87DC5000FEEE9 /* LaunchAtLogin.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = LaunchAtLogin.swift; sourceTree = "<group>"; usesTabs = 1; };
|
||||
E32E9B741EB87EA3000FEEE9 /* LaunchAtLoginHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LaunchAtLoginHelper.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
E32E9B761EB87EA3000FEEE9 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
|
||||
E32E9B761EB87EA3000FEEE9 /* main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = main.swift; sourceTree = "<group>"; usesTabs = 1; };
|
||||
E32E9B7F1EB87EA3000FEEE9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
E32E9B831EB87F57000FEEE9 /* LaunchAtLoginHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LaunchAtLoginHelper.entitlements; sourceTree = "<group>"; };
|
||||
E32E9B921EB889AE000FEEE9 /* copy-helper.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "copy-helper.sh"; sourceTree = "<group>"; };
|
||||
E32E9B921EB889AE000FEEE9 /* copy-helper.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; lineEnding = 0; path = "copy-helper.sh"; sourceTree = "<group>"; usesTabs = 1; };
|
||||
E3B8C38A20C0003300272EC0 /* LaunchAtLoginHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = LaunchAtLoginHelper.entitlements; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -62,6 +62,7 @@
|
||||
E32E9B641EB87D7B000FEEE9 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
usesTabs = 1;
|
||||
};
|
||||
E32E9B641EB87D7B000FEEE9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
@@ -75,8 +76,8 @@
|
||||
E32E9B651EB87D7B000FEEE9 /* LaunchAtLogin */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E32E9B661EB87D7B000FEEE9 /* LaunchAtLogin.h */,
|
||||
E32E9B6E1EB87DC5000FEEE9 /* LaunchAtLogin.swift */,
|
||||
E32E9B661EB87D7B000FEEE9 /* LaunchAtLogin.h */,
|
||||
E32E9B921EB889AE000FEEE9 /* copy-helper.sh */,
|
||||
E32E9B671EB87D7B000FEEE9 /* Info.plist */,
|
||||
);
|
||||
@@ -88,7 +89,7 @@
|
||||
children = (
|
||||
E32E9B761EB87EA3000FEEE9 /* main.swift */,
|
||||
E32E9B7F1EB87EA3000FEEE9 /* Info.plist */,
|
||||
E32E9B831EB87F57000FEEE9 /* LaunchAtLoginHelper.entitlements */,
|
||||
E3B8C38A20C0003300272EC0 /* LaunchAtLoginHelper.entitlements */,
|
||||
);
|
||||
path = LaunchAtLoginHelper;
|
||||
sourceTree = "<group>";
|
||||
@@ -150,20 +151,16 @@
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0830;
|
||||
LastUpgradeCheck = 0900;
|
||||
LastUpgradeCheck = 0940;
|
||||
ORGANIZATIONNAME = "Sindre Sorhus";
|
||||
TargetAttributes = {
|
||||
E32E9B621EB87D7B000FEEE9 = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
DevelopmentTeam = YG56YK5RN5;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
LastSwiftMigration = "";
|
||||
};
|
||||
E32E9B731EB87EA3000FEEE9 = {
|
||||
CreatedOnToolsVersion = 8.3.2;
|
||||
DevelopmentTeam = YG56YK5RN5;
|
||||
LastSwiftMigration = 0900;
|
||||
ProvisioningStyle = Automatic;
|
||||
LastSwiftMigration = "";
|
||||
SystemCapabilities = {
|
||||
com.apple.Sandbox = {
|
||||
enabled = 1;
|
||||
@@ -173,7 +170,7 @@
|
||||
};
|
||||
};
|
||||
buildConfigurationList = E32E9B5D1EB87D7B000FEEE9 /* Build configuration list for PBXProject "LaunchAtLogin" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
@@ -252,6 +249,7 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
@@ -259,6 +257,7 @@
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
@@ -266,7 +265,7 @@
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
@@ -291,7 +290,9 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_COMPILATION_MODE = singlefile;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
VALID_ARCHS = x86_64;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
@@ -311,6 +312,7 @@
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
@@ -318,6 +320,7 @@
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
@@ -325,7 +328,7 @@
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@@ -342,7 +345,9 @@
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
VALID_ARCHS = x86_64;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
VERSION_INFO_PREFIX = "";
|
||||
};
|
||||
@@ -353,6 +358,7 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = YG56YK5RN5;
|
||||
@@ -362,13 +368,18 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
INFOPLIST_FILE = LaunchAtLogin/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.LaunchAtLogin;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_COMPILATION_MODE = singlefile;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -377,6 +388,7 @@
|
||||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = YG56YK5RN5;
|
||||
@@ -386,12 +398,16 @@
|
||||
FRAMEWORK_VERSION = A;
|
||||
INFOPLIST_FILE = LaunchAtLogin/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
"@loader_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.LaunchAtLogin;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@@ -399,15 +415,20 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = LaunchAtLoginHelper/LaunchAtLoginHelper.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = YG56YK5RN5;
|
||||
INFOPLIST_FILE = LaunchAtLoginHelper/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.LaunchAtLoginHelper;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@@ -415,15 +436,20 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_ENTITLEMENTS = LaunchAtLoginHelper/LaunchAtLoginHelper.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Mac Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
DEVELOPMENT_TEAM = YG56YK5RN5;
|
||||
INFOPLIST_FILE = LaunchAtLoginHelper/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.sindresorhus.LaunchAtLoginHelper;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 4.2;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "0940"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,7 +26,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
@@ -37,7 +36,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0900"
|
||||
LastUpgradeVersion = "0940"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -26,7 +26,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
@@ -46,7 +45,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -15,12 +13,10 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.0.0</string>
|
||||
<string>2.3.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>MIT © Sindre Sorhus</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -13,5 +13,5 @@ codesign --force --entitlements="$CODE_SIGN_ENTITLEMENTS" --sign="$EXPANDED_CODE
|
||||
|
||||
if [[ $CONFIGURATION == "Release" ]]; then
|
||||
rm -rf "$origin_helper_path"
|
||||
rm "$(dirname $origin_helper_path)/copy-helper.sh"
|
||||
rm "$(dirname "$origin_helper_path")/copy-helper.sh"
|
||||
fi
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
||||
@@ -7,7 +7,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
let mainBundleId = bundleId.replacingOccurrences(of: "-LaunchAtLoginHelper", with: "")
|
||||
|
||||
// Ensure the app is not already running
|
||||
if !NSRunningApplication.runningApplications(withBundleIdentifier: mainBundleId).isEmpty {
|
||||
guard NSRunningApplication.runningApplications(withBundleIdentifier: mainBundleId).isEmpty else {
|
||||
NSApp.terminate(nil)
|
||||
return
|
||||
}
|
||||
@@ -19,7 +19,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
let app = NSApplication.shared
|
||||
let delegate = AppDelegate()
|
||||
private let app = NSApplication.shared
|
||||
private let delegate = AppDelegate()
|
||||
app.delegate = delegate
|
||||
app.run()
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# Before and after
|
||||
|
||||
With `LaunchAtLogin`, you only have to do 2 steps instead of 13!
|
||||
|
||||
```diff
|
||||
- 1. Create a new target that will be the helper app that launches your app
|
||||
- 2. Set `LSBackgroundOnly` to true in the `Info.plist` file
|
||||
- 3. Set `Skip Install` to `YES` in the build settings for the helper app
|
||||
- 4. Enable sandboxing for the helper app
|
||||
- 5. Add a new `Copy Files` build phase to the main app
|
||||
- 6. Select `Wrapper` as destination
|
||||
- 7. Enter `Contents/Library/LoginItems` as subpath
|
||||
- 8. Add the helper build product to the build phase
|
||||
- 9. Copy-paste some boilerplate code into the helper app
|
||||
- 10. Remember to replace `bundleid.of.main.app` and `MainExectuableName` with your own values
|
||||
- 11. Copy-paste some code to register the helper app into your main app
|
||||
- 12. Make sure the main app and helper app use the same code signing certificate
|
||||
- 13. Manually verify that you did everything correctly
|
||||
+ 1. Install this package
|
||||
+ 2. Add a new "Run Script Phase"
|
||||
```
|
||||
@@ -2,27 +2,9 @@
|
||||
|
||||
> Add "Launch at Login" functionality to your sandboxed macOS app in seconds
|
||||
|
||||
It's usually quite a convoluted and error-prone process to add this. **No more!**
|
||||
It's usually quite a [convoluted and error-prone process](before-after.md) to add this. **No more!**
|
||||
|
||||
```diff
|
||||
- 1. Create a new target that will be the helper app that launches your app
|
||||
- 2. Set `LSBackgroundOnly` to true in the `Info.plist` file
|
||||
- 3. Set `Skip Install` to `YES` in the build settings for the helper app
|
||||
- 4. Enable sandboxing for the helper app
|
||||
- 5. Add a new `Copy Files` build phase to the main app
|
||||
- 6. Select `Wrapper` as destination
|
||||
- 7. Enter `Contents/Library/LoginItems` as subpath
|
||||
- 8. Add the helper build product to the build phase
|
||||
- 9. Copy-paste some boilerplate code into the helper app
|
||||
- 10. Remember to replace `bundleid.of.main.app` and `MainExectuableName` with your own values
|
||||
- 11. Copy-paste some code to register the helper app into your main app
|
||||
- 12. Make sure the main app and helper app use the same code signing certificate
|
||||
- 13. Manually verify that you did everything correctly
|
||||
+ 1. Install this package
|
||||
+ 2. Add a new "Run Script Phase"
|
||||
```
|
||||
|
||||
It's App Store compatible and used in my [Lungo](https://blog.sindresorhus.com/lungo-b364a6c2745f) app.
|
||||
It's App Store compatible and used in my [Lungo](https://blog.sindresorhus.com/lungo-b364a6c2745f) and [Battery Indicator](https://sindresorhus.com/battery-indicator) app.
|
||||
|
||||
You might also find my [`create-dmg`](https://github.com/sindresorhus/create-dmg) project useful.
|
||||
|
||||
@@ -30,25 +12,45 @@ You might also find my [`create-dmg`](https://github.com/sindresorhus/create-dmg
|
||||
## Requirements
|
||||
|
||||
- macOS 10.12+
|
||||
- Xcode 9+
|
||||
- Swift 4+
|
||||
- Xcode 10+
|
||||
- Swift 4.2+
|
||||
|
||||
|
||||
## Install with [Carthage](https://github.com/Carthage/Carthage#getting-started)
|
||||
## Install
|
||||
|
||||
#### Carthage
|
||||
|
||||
```
|
||||
github "sindresorhus/LaunchAtLogin"
|
||||
```
|
||||
|
||||
#### CocoaPods
|
||||
|
||||
```ruby
|
||||
pod 'LaunchAtLogin'
|
||||
```
|
||||
|
||||
<a href="https://www.patreon.com/sindresorhus">
|
||||
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
|
||||
</a>
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Add a new ["Run Script Phase"](http://stackoverflow.com/a/39633955/64949) below "Embed Frameworks" in "Build Phases" with the following:
|
||||
|
||||
Carthage:
|
||||
|
||||
```sh
|
||||
./Carthage/Build/Mac/LaunchAtLogin.framework/Resources/copy-helper.sh
|
||||
```
|
||||
|
||||
CocoaPods:
|
||||
|
||||
```sh
|
||||
./Pods/LaunchAtLogin/LaunchAtLogin/copy-helper.sh
|
||||
```
|
||||
|
||||
Use it in your app:
|
||||
|
||||
```swift
|
||||
@@ -71,6 +73,13 @@ print(LaunchAtLogin.isEnabled)
|
||||
The framework bundles the helper app needed to launch your app and copies it into your app at build time.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [Defaults](https://github.com/sindresorhus/Defaults) - Swifty and modern UserDefaults
|
||||
- [Preferences](https://github.com/sindresorhus/Preferences) - Add a preferences window to your macOS app in minutes
|
||||
- [DockProgress](https://github.com/sindresorhus/DockProgress) - Show progress in your app's Dock icon
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
|
||||
Reference in New Issue
Block a user