Giter VIP home page Giter VIP logo

launchatlogin's Introduction

LaunchAtLogin

Add “Launch at Login” functionality to your macOS app in seconds

If your app targets macOS 13 or later, check out this modern version instead.

It's usually quite a convoluted and error-prone process to add this (on macOS 12 and older). No more!

This package works with both sandboxed and non-sandboxed apps and it's App Store compatible and used in apps like Plash, Dato, Lungo, and Battery Indicator.

This package uses the new SMAppService on macOS 13+ and SMLoginItemSetEnabled on older macOS versions.

Why should I use this package now that SMAppService exists?

  • Backwards compatibility with older macOS versions
  • Nicer API
  • Included SwiftUI component

Requirements

macOS 10.13+

Install

Add https://github.com/sindresorhus/LaunchAtLogin-Legacy in the “Swift Package Manager” tab in Xcode.

Usage

Skip this step if your app targets macOS 13 or later.

Add a new “Run Script Phase” below (not into) “Copy Bundle Resources” in “Build Phases” with the following:

"${BUILT_PRODUCTS_DIR}/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh"

And uncheck “Based on dependency analysis”.

The build phase cannot run with "User Script Sandboxing" enabled. With Xcode 15 or newer where it is enabled by default, disable "User Script Sandboxing" in build settings.

(It needs some extra works to have our script to comply with the build phase sandbox.) (I would name the run script Copy “Launch at Login Helper”)

Use it in your app

No need to store any state to UserDefaults.

Note that the Mac App Store guidelines requires “launch at login” functionality to be enabled in response to a user action. This is usually solved by making it a preference that is disabled by default. Many apps also let the user activate it in a welcome screen.

As static property

import LaunchAtLogin

print(LaunchAtLogin.isEnabled)
//=> false

LaunchAtLogin.isEnabled = true

print(LaunchAtLogin.isEnabled)
//=> true

SwiftUI

This package comes with a LaunchAtLogin.Toggle view which is like the built-in Toggle but with a predefined binding and label. Clicking the view toggles “launch at login” for your app.

struct ContentView: View {
	var body: some View {
		LaunchAtLogin.Toggle()
	}
}

The default label is "Launch at login", but it can be overridden for localization and other needs:

struct ContentView: View {
	var body: some View {
		LaunchAtLogin.Toggle {
			Text("Launch at login")
		}
	}
}

Alternatively, you can use LaunchAtLogin.observable as a binding with @ObservedObject:

import SwiftUI
import LaunchAtLogin

struct ContentView: View {
	@ObservedObject private var launchAtLogin = LaunchAtLogin.observable

	var body: some View {
		Toggle("Launch at login", isOn: $launchAtLogin.isEnabled)
	}
}

Combine

Just subscribe to LaunchAtLogin.publisher:

import Combine
import LaunchAtLogin

final class ViewModel {
	private var isLaunchAtLoginEnabled = LaunchAtLogin.isEnabled
	private var cancellables = Set<AnyCancellable>()

	func bind() {
		LaunchAtLogin
			.publisher
			.assign(to: \.isLaunchAtLoginEnabled, on: self)
			.store(in: &cancellables)
	}
}

Swift Concurrency

Use LaunchAtLogin.publisher.values.

Storyboards

Bind the control to the LaunchAtLogin.kvo exposed property:

import Cocoa
import LaunchAtLogin

final class ViewController: NSViewController {
	@objc dynamic var launchAtLogin = LaunchAtLogin.kvo
}

How does it work?

On macOS 12 and earlier, the package bundles the helper app needed to launch your app and copies it into your app at build time. On macOS 13 and later, it calls the built-in API.

FAQ

I'm getting a “No such file or directory” error when archiving my app

Please ensure that the LaunchAtLogin run script phase is still below the “Embed Frameworks” phase. The order could have been accidentally changed.

The build error usually presents itself as:

cp: […]/Resources/LaunchAtLoginHelper.app: No such file or directory
rm: […]/Resources/copy-helper.sh: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code

My app doesn't show up in “System Preferences › Users & Groups › Login Items”

This is the expected behavior, unfortunately.

However, it will show there on macOS 13 and later.

My app doesn't launch at login when testing

This is usually caused by having one or more older builds of your app laying around somewhere on the system, and macOS picking one of those instead, which doesn't have the launch helper, and thus fails to start.

Some things you can try:

  • Bump the version & build of your app so macOS is more likely to pick it.
  • Delete the DerivedData directory.
  • Ensure you don't have any other builds laying around somewhere.

Some helpful Stack Overflow answers:

I can't see the LaunchAtLogin.bundle in my debug build or I get a notarization error for developer ID distribution

As discussed here, this package tries to determine if you're making a release or debug build and clean up its install accordingly. If your debug build is missing the bundle or, conversely, your release build has the bundle and it causes a code signing error, that means this has failed.

The script's determination is based on the “Build Active Architecture Only” flag in build settings. If this is set to YES, then the script will package LaunchAtLogin for a debug build. You must set this flag to NO if you plan on distributing the build with codesigning.

Related

launchatlogin's People

Contributors

arielelkin avatar boyvanamstel avatar davedelong avatar divinedominion avatar nicoeg avatar philippec avatar sergeykuryanov avatar sindresorhus avatar ueharayou avatar zackdotcomputer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

launchatlogin's Issues

Use new `SMAppService` for macOS 13

Apple finally answered my prayers!

We finally don't need a useless helper app 🎉

Docs: https://developer.apple.com/documentation/servicemanagement/smappservice/3945412-mainapp?changes=latest_minor

We need to check the old property too: https://developer.apple.com/documentation/servicemanagement/smappservice/4024717-statusforlegacyplist?changes=latest_minor


We need some migration step. My plan is to add a LaunchAtLogin.migrate() method. It would check if the old launch at login is enabled, if so, it would set the modern one to be enabled too, and then disable the old one.

Use UserDefaults to ensure the migration is only called once.

SwiftUI and Combine support

https://developer.apple.com/tutorials/swiftui/
https://developer.apple.com/documentation/combine

  • A Combine publisher that pushes updates when LaunchAtLogin.isEnabled is changed.
  • A SwiftUI Toggle button in checkbox style that toggles LaunchAtLogin.isEnabled and also comes with the default text of "Launch at login" (however, should be changable for localization purposes).
  • Not SwiftUI related, but relevant still: NSMenu#launchAtLoginItem() that returns a NSMenuItem that toggles LaunchAtLogin.isEnabled when checked, uses the correct checked state, and also comes with the default text of "Launch at Login" (note it's title-cased). And a NSMenu#addLaunchAtLoginItem() convenience method.
  • Docs
  • Tests

This issue requires you to have advanced Swift knowledge.

Rewrite LaunchAtLoginHelper in Objective-C

There are only 25 lines of code compiled into the app. The result is a 47kb app binary and 10mb of swift standard libraries that must be included for some reason. Rewriting in Objective-C would reduce the size by over 99%.

code object is not signed at all

Hello,

I'm encountering some problems with LaunchAtLogin that I can't figure out by myself:
I've integrated the framework using Carthage, added the script, and now whenever I try to compile I get this error:

code object is not signed at all
In subcomponent: Contents/Library/LoginItems/LaunchAtLoginHelper.app

Any ideas what I could try to solve this issue?

Deployment target can be set to OS X 10.9

I cloned the repo and set the deployment target to OS X 10.9. It builds without issues. Not tested it on 10.9 but I guess it should work.

Why not lower this requirement so that more people can use this for their projects?

File size for LaunchAtLoginHelper

Hi there, noticing when looking at "Show Package Contents" for my application and then going to Contents/Frameworks/LaunchAtLogin.framework/Versions/A/Resources/LaunchAtLoginHelper - the file is 10.4mb. Is this correct, or am I importing it incorrectly? Thanks!

Codesign question

Thanks for project, it looks very simple but it simply just doesn't work for me.
How can I debug it? After setting LaunchAtLogin.isEnabled = true it resets to false.
App exported, signed with Developer ID and placed in /Applications.

The most unknown part for me - how to codesign helper on export? Do I need to create separate app id and provision profile for it?

I'm exporting with "Developer ID" signing to test it (only main app signed), I haven't pushed it to App Store yet.
Tried exporting "for App Store" - can't even continue without creating provisioning profile for helper app.

copy-helper.sh script "No such file or directory" when profiling

Issuehunt badges

Love the update and simplification, it pushed me to learn and reimplement my app in swift

Its has been working great, but when I try to profile the copy-helper.sh script cant be found.. any ideas?

Showing All Issues
PhaseScriptExecution Launch\ At\ Login\ script /Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Script-5B9CE72B1FD2258700CA8BFE.sh
    cd /Users/jacobrosenthal/Downloads/untitled/memoryio
    export ACTION=build
    export ALTERNATE_GROUP=staff
    export ALTERNATE_MODE=u+w,go-w,a+rX
    export ALTERNATE_OWNER=jacobrosenthal
    export ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO
    export ALWAYS_SEARCH_USER_PATHS=NO
    export ALWAYS_USE_SEPARATE_HEADERMAPS=NO
    export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
    export APPLE_INTERNAL_DIR=/AppleInternal
    export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
    export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
    export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
    export APPLICATION_EXTENSION_API_ONLY=NO
    export APPLY_RULES_IN_COPY_FILES=NO
    export ARCHS=x86_64
    export ARCHS_STANDARD=x86_64
    export ARCHS_STANDARD_32_64_BIT="x86_64 i386"
    export ARCHS_STANDARD_32_BIT=i386
    export ARCHS_STANDARD_64_BIT=x86_64
    export ARCHS_STANDARD_INCLUDING_64_BIT=x86_64
    export ASSETCATALOG_COMPILER_APPICON_NAME=AppIcon
    export AVAILABLE_PLATFORMS="appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator"
    export BITCODE_GENERATION_MODE=marker
    export BUILD_ACTIVE_RESOURCES_ONLY=NO
    export BUILD_COMPONENTS="headers build"
    export BUILD_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products
    export BUILD_ROOT=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products
    export BUILD_STYLE=
    export BUILD_VARIANTS=normal
    export BUILT_PRODUCTS_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release
    export CACHE_ROOT=/var/folders/hv/syzcx3w10850txk2z6tbnb9m0000gn/C/com.apple.DeveloperTools/9.2-9C40b/Xcode
    export CCHROOT=/var/folders/hv/syzcx3w10850txk2z6tbnb9m0000gn/C/com.apple.DeveloperTools/9.2-9C40b/Xcode
    export CHMOD=/bin/chmod
    export CHOWN=/usr/sbin/chown
    export CLANG_ANALYZER_NONNULL=YES
    export CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION=YES_AGGRESSIVE
    export CLANG_CXX_LANGUAGE_STANDARD=gnu++14
    export CLANG_CXX_LIBRARY=libc++
    export CLANG_ENABLE_MODULES=YES
    export CLANG_ENABLE_OBJC_ARC=YES
    export CLANG_MODULES_BUILD_SESSION_FILE=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/ModuleCache/Session.modulevalidation
    export CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING=YES
    export CLANG_WARN_BOOL_CONVERSION=YES
    export CLANG_WARN_COMMA=YES
    export CLANG_WARN_CONSTANT_CONVERSION=YES
    export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR
    export CLANG_WARN_DOCUMENTATION_COMMENTS=YES
    export CLANG_WARN_EMPTY_BODY=YES
    export CLANG_WARN_ENUM_CONVERSION=YES
    export CLANG_WARN_INFINITE_RECURSION=YES
    export CLANG_WARN_INT_CONVERSION=YES
    export CLANG_WARN_NON_LITERAL_NULL_CONVERSION=YES
    export CLANG_WARN_OBJC_LITERAL_CONVERSION=YES
    export CLANG_WARN_OBJC_ROOT_CLASS=YES_ERROR
    export CLANG_WARN_RANGE_LOOP_ANALYSIS=YES
    export CLANG_WARN_STRICT_PROTOTYPES=YES
    export CLANG_WARN_SUSPICIOUS_MOVE=YES
    export CLANG_WARN_UNGUARDED_AVAILABILITY=YES_AGGRESSIVE
    export CLANG_WARN_UNREACHABLE_CODE=YES
    export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
    export CLASS_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/JavaClasses
    export CLEAN_PRECOMPS=YES
    export CLONE_HEADERS=NO
    export CODESIGNING_FOLDER_PATH=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/memoryio.app
    export CODE_SIGNING_ALLOWED=YES
    export CODE_SIGN_ENTITLEMENTS=memoryio/memoryio.entitlements
    export CODE_SIGN_IDENTITY=-
    export CODE_SIGN_STYLE=Manual
    export COLOR_DIAGNOSTICS=NO
    export COMBINE_HIDPI_IMAGES=YES
    export COMMAND_MODE=legacy
    export COMPILER_INDEX_STORE_ENABLE=Default
    export COMPOSITE_SDK_DIRS=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/CompositeSDKs
    export COMPRESS_PNG_FILES=NO
    export CONFIGURATION=Release
    export CONFIGURATION_BUILD_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release
    export CONFIGURATION_TEMP_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release
    export CONTENTS_FOLDER_PATH=memoryio.app/Contents
    export COPYING_PRESERVES_HFS_DATA=NO
    export COPY_HEADERS_RUN_UNIFDEF=NO
    export COPY_PHASE_STRIP=NO
    export COPY_RESOURCES_FROM_STATIC_FRAMEWORKS=YES
    export CP=/bin/cp
    export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
    export CURRENT_ARCH=x86_64
    export CURRENT_VARIANT=normal
    export DEAD_CODE_STRIPPING=NO
    export DEBUGGING_SYMBOLS=YES
    export DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
    export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
    export DEFAULT_KEXT_INSTALL_PATH=/Library/Extensions
    export DEFINES_MODULE=NO
    export DEPLOYMENT_LOCATION=NO
    export DEPLOYMENT_POSTPROCESSING=NO
    export DEPLOYMENT_TARGET_CLANG_ENV_NAME=MACOSX_DEPLOYMENT_TARGET
    export DEPLOYMENT_TARGET_CLANG_FLAG_NAME=mmacosx-version-min
    export DEPLOYMENT_TARGET_SETTING_NAME=MACOSX_DEPLOYMENT_TARGET
    export DERIVED_FILES_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/DerivedSources
    export DERIVED_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/DerivedSources
    export DERIVED_SOURCES_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/DerivedSources
    export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
    export DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    export DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
    export DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export DEVELOPMENT_LANGUAGE=en
    export DOCUMENTATION_FOLDER_PATH=memoryio.app/Contents/Resources/en.lproj/Documentation
    export DO_HEADER_SCANNING_IN_JAM=NO
    export DSTROOT=/tmp/memoryio.dst
    export DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export DWARF_DSYM_FILE_NAME=memoryio.app.dSYM
    export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
    export DWARF_DSYM_FOLDER_PATH=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release
    export EMBEDDED_CONTENT_CONTAINS_SWIFT=NO
    export EMBEDDED_PROFILE_NAME=embedded.provisionprofile
    export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE=NO
    export ENABLE_BITCODE=NO
    export ENABLE_DEFAULT_HEADER_SEARCH_PATHS=YES
    export ENABLE_HEADER_DEPENDENCIES=YES
    export ENABLE_NS_ASSERTIONS=NO
    export ENABLE_ON_DEMAND_RESOURCES=NO
    export ENABLE_STRICT_OBJC_MSGSEND=YES
    export ENABLE_TESTABILITY=NO
    export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
    export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
    export EXECUTABLES_FOLDER_PATH=memoryio.app/Contents/Executables
    export EXECUTABLE_FOLDER_PATH=memoryio.app/Contents/MacOS
    export EXECUTABLE_NAME=memoryio
    export EXECUTABLE_PATH=memoryio.app/Contents/MacOS/memoryio
    export EXPANDED_CODE_SIGN_IDENTITY=-
    export EXPANDED_CODE_SIGN_IDENTITY_NAME=-
    export EXPANDED_PROVISIONING_PROFILE=
    export FILE_LIST=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Objects/LinkFileList
    export FIXED_FILES_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/FixedFiles
    export FRAMEWORKS_FOLDER_PATH=memoryio.app/Contents/Frameworks
    export FRAMEWORK_FLAG_PREFIX=-framework
    export FRAMEWORK_SEARCH_PATHS="/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release  /Users/jacobrosenthal/Downloads/untitled/memoryio/Carthage/Build/Mac"
    export FRAMEWORK_VERSION=A
    export FULL_PRODUCT_NAME=memoryio.app
    export GCC3_VERSION=3.3
    export GCC_C_LANGUAGE_STANDARD=gnu11
    export GCC_DYNAMIC_NO_PIC=NO
    export GCC_INLINES_ARE_PRIVATE_EXTERN=YES
    export GCC_NO_COMMON_BLOCKS=YES
    export GCC_PFE_FILE_C_DIALECTS="c objective-c c++ objective-c++"
    export GCC_SYMBOLS_PRIVATE_EXTERN=YES
    export GCC_TREAT_WARNINGS_AS_ERRORS=NO
    export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
    export GCC_VERSION_IDENTIFIER=com_apple_compilers_llvm_clang_1_0
    export GCC_WARN_64_TO_32_BIT_CONVERSION=YES
    export GCC_WARN_ABOUT_RETURN_TYPE=YES_ERROR
    export GCC_WARN_UNDECLARED_SELECTOR=YES
    export GCC_WARN_UNINITIALIZED_AUTOS=YES_AGGRESSIVE
    export GCC_WARN_UNUSED_FUNCTION=YES
    export GCC_WARN_UNUSED_VARIABLE=YES
    export GENERATE_MASTER_OBJECT_FILE=NO
    export GENERATE_PKGINFO_FILE=YES
    export GENERATE_PROFILING_CODE=NO
    export GENERATE_TEXT_BASED_STUBS=NO
    export GID=20
    export GROUP=staff
    export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
    export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
    export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
    export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
    export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
    export HEADERMAP_USES_VFS=NO
    export HEADER_SEARCH_PATHS="/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/include "
    export HIDE_BITCODE_SYMBOLS=YES
    export HOME=/Users/jacobrosenthal
    export ICONV=/usr/bin/iconv
    export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
    export INFOPLIST_FILE=memoryio/Info.plist
    export INFOPLIST_OUTPUT_FORMAT=same-as-input
    export INFOPLIST_PATH=memoryio.app/Contents/Info.plist
    export INFOPLIST_PREPROCESS=NO
    export INFOSTRINGS_PATH=memoryio.app/Contents/Resources/en.lproj/InfoPlist.strings
    export INLINE_PRIVATE_FRAMEWORKS=NO
    export INSTALLHDRS_COPY_PHASE=NO
    export INSTALLHDRS_SCRIPT_PHASE=NO
    export INSTALL_DIR=/tmp/memoryio.dst/Applications
    export INSTALL_GROUP=staff
    export INSTALL_MODE_FLAG=u+w,go-w,a+rX
    export INSTALL_OWNER=jacobrosenthal
    export INSTALL_PATH=/Applications
    export INSTALL_ROOT=/tmp/memoryio.dst
    export JAVAC_DEFAULT_FLAGS="-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"
    export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
    export JAVA_ARCHIVE_CLASSES=YES
    export JAVA_ARCHIVE_TYPE=JAR
    export JAVA_COMPILER=/usr/bin/javac
    export JAVA_FOLDER_PATH=memoryio.app/Contents/Resources/Java
    export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
    export JAVA_JAR_FLAGS=cv
    export JAVA_SOURCE_SUBDIR=.
    export JAVA_USE_DEPENDENCIES=YES
    export JAVA_ZIP_FLAGS=-urg
    export JIKES_DEFAULT_FLAGS="+E +OLDCSO"
    export KASAN_DEFAULT_CFLAGS="-DKASAN=1 -fsanitize=address -mllvm -asan-globals-live-support -mllvm -asan-force-dynamic-shadow"
    export KEEP_PRIVATE_EXTERNS=NO
    export LD_DEPENDENCY_INFO_FILE=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Objects-normal/x86_64/memoryio_dependency_info.dat
    export LD_GENERATE_MAP_FILE=NO
    export LD_MAP_FILE_PATH=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/memoryio-LinkMap-normal-x86_64.txt
    export LD_NO_PIE=NO
    export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
    export LD_RUNPATH_SEARCH_PATHS=" @executable_path/../Frameworks"
    export LEGACY_DEVELOPER_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
    export LEX=lex
    export LIBRARY_FLAG_NOSPACE=YES
    export LIBRARY_FLAG_PREFIX=-l
    export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
    export LIBRARY_SEARCH_PATHS="/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release "
    export LINKER_DISPLAYS_MANGLED_NAMES=NO
    export LINK_FILE_LIST_normal_x86_64=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Objects-normal/x86_64/memoryio.LinkFileList
    export LINK_WITH_STANDARD_LIBRARIES=YES
    export LOCALIZABLE_CONTENT_DIR=
    export LOCALIZED_RESOURCES_FOLDER_PATH=memoryio.app/Contents/Resources/en.lproj
    export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
    export LOCAL_APPS_DIR=/Applications
    export LOCAL_DEVELOPER_DIR=/Library/Developer
    export LOCAL_LIBRARY_DIR=/Library
    export LOCROOT=
    export LOCSYMROOT=
    export MACH_O_TYPE=mh_execute
    export MACOSX_DEPLOYMENT_TARGET=10.13
    export MAC_OS_X_PRODUCT_BUILD_VERSION=17C88
    export MAC_OS_X_VERSION_ACTUAL=101302
    export MAC_OS_X_VERSION_MAJOR=101300
    export MAC_OS_X_VERSION_MINOR=1302
    export METAL_LIBRARY_FILE_BASE=default
    export METAL_LIBRARY_OUTPUT_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/memoryio.app/Contents/Resources
    export MODULE_CACHE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/ModuleCache
    export MTL_ENABLE_DEBUG_INFO=NO
    export NATIVE_ARCH=i386
    export NATIVE_ARCH_32_BIT=i386
    export NATIVE_ARCH_64_BIT=x86_64
    export NATIVE_ARCH_ACTUAL=x86_64
    export NO_COMMON=YES
    export OBJECT_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Objects
    export OBJECT_FILE_DIR_normal=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Objects-normal
    export OBJROOT=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex
    export ONLY_ACTIVE_ARCH=NO
    export OS=MACOS
    export OSAC=/usr/bin/osacompile
    export PACKAGE_TYPE=com.apple.package-type.wrapper.application
    export PASCAL_STRINGS=YES
    export PATH="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/bin:/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/usr/local/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/local/bin:/Applications/Xcode.app/Contents/Developer/Tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms"
    export PBDEVELOPMENTPLIST_PATH=memoryio.app/Contents/pbdevelopment.plist
    export PKGINFO_FILE_PATH=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/PkgInfo
    export PKGINFO_PATH=memoryio.app/Contents/PkgInfo
    export PLATFORM_DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export PLATFORM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export PLATFORM_DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
    export PLATFORM_DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    export PLATFORM_DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
    export PLATFORM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export PLATFORM_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
    export PLATFORM_DISPLAY_NAME=macOS
    export PLATFORM_NAME=macosx
    export PLATFORM_PREFERRED_ARCH=x86_64
    export PLATFORM_PRODUCT_BUILD_VERSION=9C40b
    export PLIST_FILE_OUTPUT_FORMAT=same-as-input
    export PLUGINS_FOLDER_PATH=memoryio.app/Contents/PlugIns
    export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
    export PRECOMP_DESTINATION_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/PrefixHeaders
    export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
    export PRIVATE_HEADERS_FOLDER_PATH=memoryio.app/Contents/PrivateHeaders
    export PRODUCT_BUNDLE_IDENTIFIER=com.augmentous.memoryio
    export PRODUCT_MODULE_NAME=memoryio
    export PRODUCT_NAME=memoryio
    export PRODUCT_SETTINGS_PATH=/Users/jacobrosenthal/Downloads/untitled/memoryio/memoryio/Info.plist
    export PRODUCT_TYPE=com.apple.product-type.application
    export PROFILING_CODE=NO
    export PROJECT=memoryio
    export PROJECT_DERIVED_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/DerivedSources
    export PROJECT_DIR=/Users/jacobrosenthal/Downloads/untitled/memoryio
    export PROJECT_FILE_PATH=/Users/jacobrosenthal/Downloads/untitled/memoryio/memoryio.xcodeproj
    export PROJECT_NAME=memoryio
    export PROJECT_TEMP_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build
    export PROJECT_TEMP_ROOT=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex
    export PUBLIC_HEADERS_FOLDER_PATH=memoryio.app/Contents/Headers
    export RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS=YES
    export REMOVE_CVS_FROM_RESOURCES=YES
    export REMOVE_GIT_FROM_RESOURCES=YES
    export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
    export REMOVE_HG_FROM_RESOURCES=YES
    export REMOVE_SVN_FROM_RESOURCES=YES
    export REZ_COLLECTOR_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/ResourceManagerResources
    export REZ_OBJECTS_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/ResourceManagerResources/Objects
    export REZ_SEARCH_PATHS="/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release "
    export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
    export SCRIPTS_FOLDER_PATH=memoryio.app/Contents/Resources/Scripts
    export SCRIPT_INPUT_FILE_COUNT=0
    export SCRIPT_OUTPUT_FILE_COUNT=0
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
    export SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
    export SDK_DIR_macosx10_13=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
    export SDK_NAME=macosx10.13
    export SDK_NAMES=macosx10.13
    export SDK_PRODUCT_BUILD_VERSION=17C76
    export SDK_VERSION=10.13
    export SDK_VERSION_ACTUAL=101300
    export SDK_VERSION_MAJOR=101300
    export SDK_VERSION_MINOR=1300
    export SED=/usr/bin/sed
    export SEPARATE_STRIP=NO
    export SEPARATE_SYMBOL_EDIT=NO
    export SET_DIR_MODE_OWNER_GROUP=YES
    export SET_FILE_MODE_OWNER_GROUP=NO
    export SHALLOW_BUNDLE=NO
    export SHARED_DERIVED_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/DerivedSources
    export SHARED_FRAMEWORKS_FOLDER_PATH=memoryio.app/Contents/SharedFrameworks
    export SHARED_PRECOMPS_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/PrecompiledHeaders
    export SHARED_SUPPORT_FOLDER_PATH=memoryio.app/Contents/SharedSupport
    export SKIP_INSTALL=NO
    export SOURCE_ROOT=/Users/jacobrosenthal/Downloads/untitled/memoryio
    export SRCROOT=/Users/jacobrosenthal/Downloads/untitled/memoryio
    export STRINGS_FILE_OUTPUT_ENCODING=UTF-16
    export STRIP_BITCODE_FROM_COPIED_FILES=NO
    export STRIP_INSTALLED_PRODUCT=YES
    export STRIP_PNG_TEXT=NO
    export STRIP_STYLE=all
    export STRIP_SWIFT_SYMBOLS=YES
    export SUPPORTED_PLATFORMS=macosx
    export SUPPORTS_TEXT_BASED_API=NO
    export SWIFT_OBJC_BRIDGING_HEADER=memoryio/memoryio-Bridging-Header.h
    export SWIFT_OPTIMIZATION_LEVEL=-Owholemodule
    export SWIFT_PLATFORM_TARGET_PREFIX=macosx
    export SWIFT_VERSION=4.0
    export SYMROOT=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products
    export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
    export SYSTEM_APPS_DIR=/Applications
    export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
    export SYSTEM_DEMOS_DIR=/Applications/Extras
    export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"
    export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"
    export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"
    export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"
    export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"
    export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"
    export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools
    export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
    export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
    export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities
    export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation
    export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions
    export SYSTEM_LIBRARY_DIR=/System/Library
    export TAPI_VERIFY_MODE=ErrorsOnly
    export TARGETNAME=memoryio
    export TARGET_BUILD_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release
    export TARGET_NAME=memoryio
    export TARGET_TEMP_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build
    export TEMP_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build
    export TEMP_FILES_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build
    export TEMP_FILE_DIR=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build
    export TEMP_ROOT=/Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex
    export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
    export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
    export UID=501
    export UNLOCALIZED_RESOURCES_FOLDER_PATH=memoryio.app/Contents/Resources
    export UNSTRIPPED_PRODUCT=NO
    export USER=jacobrosenthal
    export USER_APPS_DIR=/Users/jacobrosenthal/Applications
    export USER_LIBRARY_DIR=/Users/jacobrosenthal/Library
    export USE_DYNAMIC_NO_PIC=YES
    export USE_HEADERMAP=YES
    export USE_HEADER_SYMLINKS=NO
    export VALIDATE_PRODUCT=NO
    export VALID_ARCHS="i386 x86_64"
    export VERBOSE_PBXCP=NO
    export VERSIONPLIST_PATH=memoryio.app/Contents/version.plist
    export VERSION_INFO_BUILDER=jacobrosenthal
    export VERSION_INFO_FILE=memoryio_vers.c
    export VERSION_INFO_STRING="\"@(#)PROGRAM:memoryio  PROJECT:memoryio-\""
    export WRAPPER_EXTENSION=app
    export WRAPPER_NAME=memoryio.app
    export WRAPPER_SUFFIX=.app
    export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
    export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
    export XCODE_PRODUCT_BUILD_VERSION=9C40b
    export XCODE_VERSION_ACTUAL=0920
    export XCODE_VERSION_MAJOR=0900
    export XCODE_VERSION_MINOR=0920
    export XPCSERVICES_FOLDER_PATH=memoryio.app/Contents/XPCServices
    export YACC=yacc
    export arch=x86_64
    export variant=normal
    /bin/sh -c /Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Intermediates.noindex/memoryio.build/Release/memoryio.build/Script-5B9CE72B1FD2258700CA8BFE.sh

cp: /Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/memoryio.app/Contents/Frameworks/LaunchAtLogin.framework/Resources/LaunchAtLoginHelper.app: No such file or directory
rm: /Users/jacobrosenthal/Library/Developer/Xcode/DerivedData/memoryio-dlcrfdgchgsogtdsjkkyjanigonw/Build/Products/Release/memoryio.app/Contents/Frameworks/LaunchAtLogin.framework/Resources/copy-helper.sh: No such file or directory

IssueHunt Summary

Backers (Total: $80.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

Gatekeeper assessment damaged with Carthage + Cocoapods

I think this is more of a request for help than anything else. If someone has the time I'd appreciate that.
So basically I have this dependency with Carthage and everything else is in Cocoapods.
I followed Carthage's guide: adding their build phase, setup Cartfile, etc. Then I followed LaunchAtLogin's and also added a build phase to copy the helper.

The problem is when I archive and export the app as copy (no signing) and try to validate the .app with RB App Checker Lite it points out the following:

Gatekeeper assessment: FAIL (damaged).  
	➤ Requirements and resources didn't pass static validation.  

And this prevents the app from being opened saying the app is damaged and it should be deleted being the only two options to cancel or move to trash.
Looking for more info one why is damaged:

raw assessment: {
    damaged = "/Users/aribeiro/Desktop/Timetracker 2020-04-15 08-12-41/Timetracker.app/: a sealed resource is missing or invalid";
}

And the details:

Error details: “-67054: a sealed resource is missing or invalid” {
	Resources missing: 
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Info.plist
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreFoundation.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDispatch.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/copy-helper.sh
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftIOKit.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/PkgInfo
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDarwin.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftFoundation.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreGraphics.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftObjectiveC.dylib
		Contents/Frameworks/LaunchAtLogin.framework/Versions/Current/Resources/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCore.dylib
	Error in subcomponent: Contents/Frameworks/LaunchAtLogin.framework
}

So it seems like, to me, that the .app is being generated and only after it is being changed to include LaunchAtLogin assets because all the resources missing are in the .app file. If I remove this dependency (the only one I have in Carthage) it RB just complains about being an unknown developer — which is OK because I didn't pay Apple the subscription.

Library not loaded

Hi @sindresorhus

I've been following your installation instructions, point by point. But cant seem to get it working out of the box.

I got the Carthage stuff installed, in the root folder.

But when I add "import LaunchAtLogin" to my AppDelegate.swift, it cannot see the library, and thus I cannot build the project.

Thanks in advance,

Regards

Apple notarization fails

When I upload my app to notarise, it shows these errors:

{
  "logFormatVersion": 1,
  "jobId": "bbffa242-cee3-4322-829d-40d9304987ba",
  "status": "Invalid",
  "statusSummary": "Archive contains critical validation errors",
  "statusCode": 4000,
  "archiveFilename": "Only_Switch.dmg",
  "uploadDate": "2022-01-18T18:46:46Z",
  "sha256": "49413569a787e1bb79851f55dddcad27322e74b5bad8280b2624138d894eefb6",
  "ticketContents": null,
  "issues": [
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The signature of the binary is invalid.",
      "docUrl": null,
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": null,
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The executable requests the com.apple.security.get-task-allow entitlement.",
      "docUrl": null,
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The signature of the binary is invalid.",
      "docUrl": null,
      "architecture": "arm64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The signature does not include a secure timestamp.",
      "docUrl": null,
      "architecture": "arm64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper",
      "message": "The executable requests the com.apple.security.get-task-allow entitlement.",
      "docUrl": null,
      "architecture": "arm64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/MacOS/OnlySwitch",
      "message": "The signature of the binary is invalid.",
      "docUrl": null,
      "architecture": "x86_64"
    },
    {
      "severity": "error",
      "code": null,
      "path": "Only_Switch.dmg/Only Switch.app/Contents/MacOS/OnlySwitch",
      "message": "The signature of the binary is invalid.",
      "docUrl": null,
      "architecture": "arm64"
    }
  ]
}

I tested the signature:

codesign -vvv --deep --strict /Applications/Only\ Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
/Applications/Only Switch.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper: invalid Info.plist (plist or signature have been modified)
In architecture: x86_64

helper crashing: `The code signature is not valid: The operation couldn’t be completed. (OSStatus error -67030.)`

happens on Big Sur 11.5.2 and Catalina 10.15.7.

Xcode 12.5.1 and 12.4.
Swift 5.4.2 and 5.3.2.
targeting macOS 10.15.
LaunchAtLogin 4.1.0.

from console.log:

Process:               LaunchAtLoginHelper [19238]
Path:                  /Applications/kindaVim.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
Identifier:            LaunchAtLoginHelper
Version:               1.0.1 (2)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           LaunchAtLoginHelper [19238]
User ID:               501

Date/Time:             2021-08-23 01:45:21.795 +0800
OS Version:            macOS 11.5.2 (20G95)
Report Version:        12
Bridge OS Version:     5.5 (18P4759a)
Anonymous UUID:        DE278BD3-EA41-0AA3-ED68-FC6386296036


Time Awake Since Boot: 1500 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [19238]

Application Specific Information:
dyld: launch, running initializers
/usr/lib/libSystem.B.dylib
The code signature is not valid: The operation couldn’t be completed. (OSStatus error -67030.)

that looks like this closed issue #35 but as advised, i'm using SPM, not Carthage.

what i've tried:

  • made sure i don't have other copies of my app around (confirmed by /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump|grep .kindaVim.app)
  • deleted DerivedData
  • set Build Active Architecture Only to NO
  • set Build Active Architecture Only to YES
  • thoughts and prayers
  • increased build number irrationally
  • cried in the shower
  • switched from manual signing + Developer ID to automatic signing

any hint on where i may be fucking *p?

Hardened Runtime is not enabled when Archive

Hi.
'm using this library for a while and it works perfectly. Till yesterday(

Yesterday I try to archive a new build of my application. And suddenly I receive the error: Hardened Runtime is not enabled.

At the beginning I run carthage build, but it not help. After I remove all carthage files and build all from scratch. It not help, the same error appears.

After I make a clean project in swift and add LaunchAtLogin. And on archive stage, I receive the same problem.

I check if copy-helper.sh works by adding an exit 1 at the end of the file. When the archive process stops on exit code 1. I go and verify if LaunchAtLoginHelper.app is signed. And it was signed with the correct ID.

MacOS version: 10.15.3/10.15.4
Xcode version: 11.4 (11E146)

The output from Archive:

Hardened Runtime is not enabled.

"LaunchAtLoginHelper.app" must be rebuilt with support for the Hardened Runtime. Enable the Hardened Runtime capability in the project editor, test your app, rebuild your archive, and upload again.

And critical.log:

2020-04-07 15:43:22 +0000  Distribution items ineligible: Error Domain=IDEDistributionMethodDeveloperIDErrorDomain Code=1 "Hardened Runtime is not enabled." UserInfo={NSLocalizedDescription=Hardened Runtime is not enabled., NSLocalizedRecoverySuggestion="LaunchAtLoginHelper.app" must be rebuilt with support for the Hardened Runtime. Enable the Hardened Runtime capability in the project editor, test your app, rebuild your archive, and upload again.}

Apple notarization fails

I've just switched from Carthage to SPM and I'm using v4.0.0

Everything works fine except Apple won't notarize the app, throwing a "Package Invalid" error with the following messages:

  • The binary is not signed with a valid developer id certificate
  • The signature does not include a secure timestamp
  • The executable requests the com.apple.security.get-task-allow entitlement

macOS version: 10.15.7
Xcode version: 12.0.1

More info about affected files:


- The binary is not signed with a valid developer id certificate
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftAppKit.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreImage.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftObjectiveC.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftXPC.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCore.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreGraphics.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftMetal.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreData.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDispatch.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftos.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreFoundation.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDarwin.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftQuartzCore.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftIOKit.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftFoundation.dylib

- The signature does not include a secure timestamp
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftAppKit.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreImage.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftObjectiveC.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftXPC.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCore.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreGraphics.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftMetal.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreData.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDispatch.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftos.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftCoreFoundation.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftDarwin.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftQuartzCore.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftIOKit.dylib
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/Frameworks/libswiftFoundation.dylib

- The executable requests the com.apple.security.get-task-allow entitlement
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
  - MyApp.zip/MyApp.app/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper

Apps not showing up in System Preferences Login Items

Apps using LaunchAtLogin are not showing up in System Preferences › Users & Groups › Login Items, while apps using approaches not based on the ServiceManagement framework do (e.g. using LoginServiceKit).

Bildschirmfoto 2020-01-17 um 15 00 25

Using ServiceManagement seems to be recommended by Apple tho, as also seen in the compiler warning for kLSSharedFileListSessionLoginItems.

Is there any insight on this? Seems to me like a bug on Apple's side.

Where to add script?

Hi! After nearly one year and I found that README.md has been updated:

Add a new “Run Script Phase” below (not into) “Copy Bundle Resources” in “Build Phases” with the following

Bear with me but I'm still confused about how can I add this script? 😓

Here's what I've done:

image

Don't know if I'm doing this right... Does this mean that I can continue to use this framework or am I missing something? Thanks for your patience!

ERROR ITMS-90334: "Invalid Code Signature Identifier."

While uploading an app to iTunes Connect I receive the following error message within Xcode:

ERROR ITMS-90334: Invalid Code Signature Identifier. The identifier "com.sindresorhus.LaunchAtLoginHelper" in your code signature for "LaunchAtLoginHelper" must match its Bundle Identifier "io.frogg.my.app"

Screenshot 2020-08-28 at 23 55 40

Any idea what's going on here?

App Notarization: Enable Hardened Runtime in Helper

While the LaunchAtLoginHelper target's ENABLE_HARDENED_RUNTIME is set to "Yes", Xcode rejects my app's binary for upload:

"LaunchAtLoginHelper.app" must be rebuilt with support for the Hardened Runtime. Enable the Hardened Runtime capability in the project editor, then test your app, rebuild your archive, and upload again.

The folks at Sparkle suffered from a similar problem: sparkle-project/Sparkle#1266

Code-signing after embedding the framework did the trick for them: sparkle-project/Sparkle#1266 (comment)

The difference to this framework here is that they did sign both the app and the framework. But neither worked for me with regard to LaunchAtLogin.

From what I gather, the current settings or the addition of an additional codesign call to the framework should do the trick, but no such luck.

Signing framework and app again

For reference, I modified the script to

  1. reuse the path to LaunchAtLogin.framework and sign the framework at the end
  2. add the --deep option to the helper signing steps
#!/bin/bash

framework_path="$BUILT_PRODUCTS_DIR/$FRAMEWORKS_FOLDER_PATH/LaunchAtLogin.framework"
origin_helper_path="$framework_path/Resources/LaunchAtLoginHelper.app"
helper_dir="$BUILT_PRODUCTS_DIR/$CONTENTS_FOLDER_PATH/Library/LoginItems"
helper_path="$helper_dir/LaunchAtLoginHelper.app"

rm -rf "$helper_path"
mkdir -p "$helper_dir"
cp -rf "$origin_helper_path" "$helper_dir/"

defaults write "$helper_path/Contents/Info" CFBundleIdentifier -string "$PRODUCT_BUNDLE_IDENTIFIER-LaunchAtLoginHelper"

if [[ -z ${CODE_SIGN_ENTITLEMENTS} ]];
then
    codesign --verbose --force -o runtime --deep --sign="$EXPANDED_CODE_SIGN_IDENTITY_NAME" "$helper_path"
else
    codesign --verbose --force --entitlements="$CODE_SIGN_ENTITLEMENTS" -o runtime --deep --sign="$EXPANDED_CODE_SIGN_IDENTITY_NAME" "$helper_path"
fi

if [[ $CONFIGURATION == "Release" ]]; then
	rm -rf "$origin_helper_path"
	rm "$(dirname "$origin_helper_path")/copy-helper.sh"
fi

codesign --verbose --force -o runtime --sign "$EXPANDED_CODE_SIGN_IDENTITY_NAME" "$framework_path/Versions/A"

Invalid bundle name: bundle ID must not contain tools provided by Apple

I submitted an app last week with your wonderful LaunchAtLogin, no issues, went straight through. Yesterday I added the framework to a second app and it promptly failed AppStore validation with the following error:

I checked the . dSYM and indeed it has a bundle ID that starts with com.apple. Easy fix then. In my case because I needed the app to process quickly, I just removed the dSYM.

Fix TODO in Sources/LaunchAtLoginHelper/main.swift

I saw the TODO at
https://github.com/sindresorhus/LaunchAtLogin/blob/0f39982b9d6993eef253b81219d3c39ba1e680f3/Sources/LaunchAtLoginHelper/main.swift#L6

I think the "solution" is the following:

        let bundleId = Bundle.main.bundleIdentifier!
        guard bundleId.hasSuffix("-LaunchAtLoginHelper") else {
            NSApp.terminate(nil)
            return
        }
        let mainBundleId = bundleId.dropLast(20)

Maybe the guard statement isn't even necessary.

I hesitated about making a Pull Request for this, because I wasn't sure if I should also update the .zip files. Therefore, I decided to make an Issue.

Helper needs com.apple.security.automation.apple-events entitlement

Trying the LaunchAtLogin helper in another app of mine today. Got this when I triggered the setting:

Prompting policy for hardened runtime; service: kTCCServiceAppleEvents requires entitlement com.apple.security.automation.apple-events but it is missing for ACC:{ID: de.christiantietze.WorkBreak-LaunchAtLoginHelper, PID[2079], auid: 501, euid: 501, binary path: '/Applications/Move!.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper'}, REQ:{ID: com.apple.appleeventsd, PID[51], auid: 55, euid: 55, binary path: '/System/Library/CoreServices/appleeventsd'}

Looks like the helper needs com.apple.security.automation.apple-events hardened runtime resource access.

Building app with fastlane fails with LaunchAtLogin.entitlements error

Hi! I'm using LaunchAtLogin in my app and I'm trying to build it using fastlane. I have basically set up a basic build action, but it fails with a LaunchAtLogin.entitlements path error:

[21:46:07]: $ set -o pipefail && xcodebuild -workspace ./macos/sol.xcworkspace -scheme macOS -destination 'generic/platform=macOS' -archivePath /Users/osp/Library/Developer/Xcode/Archives/2022-05-05/sol\ 2022-05-05\ 21.46.07.xcarchive archive | tee /Users/osp/Library/Logs/gym/sol-macOS.log | xcpretty
[21:46:07]: ▸ objc[16713]: Class AppleTypeCRetimerRestoreInfoHelper is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfdeb0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc4f8). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ objc[16713]: Class AppleTypeCRetimerFirmwareAggregateRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfdf00) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc548). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ objc[16713]: Class AppleTypeCRetimerFirmwareRequestCreator is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfdf50) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc598). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ objc[16713]: Class ATCRTRestoreInfoFTABFile is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfdfa0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc5e8). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ objc[16713]: Class AppleTypeCRetimerFirmwareCopier is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfdff0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc638). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ objc[16713]: Class ATCRTRestoreInfoFTABSubfile is implemented in both /usr/lib/libauthinstall.dylib (0x1e3cfe040) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1047dc688). One of the two will be used. Which one is undefined.
[21:46:07]: ▸ 2022-05-05 21:46:07.753 xcodebuild[16713:190096] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
[21:46:07]: ▸ 2022-05-05 21:46:07.754 xcodebuild[16713:190096] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
[21:46:10]: ▸ Copying /Users/osp/Library/Developer/Xcode/DerivedData/sol-fgshdhettiwowogbdjmzkrqsdwfg/Build/Intermediates.noindex/ArchiveIntermediates/macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper.zip
[21:46:10]: ▸ Copying /Users/osp/Library/Developer/Xcode/DerivedData/sol-fgshdhettiwowogbdjmzkrqsdwfg/Build/Intermediates.noindex/ArchiveIntermediates/macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh
[21:46:10]: ▸ Copying /Users/osp/Library/Developer/Xcode/DerivedData/sol-fgshdhettiwowogbdjmzkrqsdwfg/Build/Intermediates.noindex/ArchiveIntermediates/macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLoginHelper-with-runtime.zip
[21:46:10]: ▸ Copying /Users/osp/Library/Developer/Xcode/DerivedData/sol-fgshdhettiwowogbdjmzkrqsdwfg/Build/Intermediates.noindex/ArchiveIntermediates/macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin.entitlements
[21:46:10]: ▸ ❌  error: '/Users/osp/Library/Developer/Xcode/DerivedData/sol-fgshdhettiwowogbdjmzkrqsdwfg/Build/Intermediates.noindex/ArchiveIntermediates/macOS/IntermediateBuildFilesPath/UninstalledProducts/macosx/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/LaunchAtLogin.entitlements' is longer than filepath buffer size (1025). (in target 'LaunchAtLogin_LaunchAtLogin' from project 'LaunchAtLogin')
[21:46:10]: ▸ Processing empty-LaunchAtLogin_LaunchAtLogin.plist
[21:47:01]: ▸ 2022-05-05 21:47:01.279 xcodebuild[16713:190099]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-20038/DTDeviceKitBase/DTDKRemoteDeviceData.m:373
[21:47:01]: ▸ Details:  (null) deviceType from 00008006-000671090E62802E was NULL when -platform called.
[21:47:01]: ▸ Object:   <DTDKMobileDeviceToken: 0x138375380>
[21:47:01]: ▸ Method:   -platform
[21:47:01]: ▸ Thread:   <NSThread: 0x120707a00>{number = 3, name = (null)}
[21:47:01]: ▸ Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.

Do you have any idea what could be the issue? I would much appreciate any help. Just in case you want to check it out, here is the repo of the app: https://github.com/ospfranco/sol/tree/fastlane

Carthage isn't importing properly?

I followed your steps and installed this. But, when I Cmd+click LaunchAtLogin from my class, it just shows this instead of proper data.

Did I miss something?

screen shot 2018-05-29 at 5 00 45 pm

Mac Catalyst Login Item

Hello! Has anyone implemented this project with a Mac Catalyst app so far?

Would be grateful for any tips!

Detect manual launch attempt by user

Is it possible to detect if the user manually attempts to launch the app (e.g. via Applications folder, or if the icon is visible in dock)?

My idea is, that I want to open some settings panel if that happens, even if the app is actually already running (e.g., in the menu bar).

Launch at Login Toggle not working

The launch at login toggle does not work when I package the app for distribution, however it does work when I run the app from XCode. Is there any reason for this? Is there any fix?

Cocoapods: Could not locate login item

Edited with new information:

When you install the cocoapod, this module doesn't actually work. But it works when you use Carthage.

Original bug:

First off, thanks for kicking off a project like this. It looks really helpful and seems super easy to use. But when I integrate it. And try to toggle the LaunchAtLogin.isEnabled, it just shows me this as an error.

2018-12-24 01:19:21.312633-0800 YoctoChat[7479:335659] Could not locate login item renebrandel.YoctoChat-LaunchAtLoginHelper in the caller's bundle
2018-12-24 01:19:21.313307-0800 YoctoChat[7479:335659] Could not enable login item: renebrandel.YoctoChat-LaunchAtLoginHelper: 3: No such process
2018-12-24 01:19:21.325436-0800 YoctoChat[7479:335659] Could not enable login item: renebrandel.YoctoChat-LaunchAtLoginHelper: 3: No such process

-Rene
I've enabled codesigning and tried other solution of resolved issues but no luck so far. Any idea on how to debug this?

Specify Usage Instruction is only for Carthage

I was getting error #7 when I pasted the script path in Build Phase & I was using Podfile so as a Swift noob I installed the pod but also did this as shown in the README👇

Add a new "Run Script Phase" below "Embed Frameworks" in "Build Phases" with the following:
./Carthage/Build/Mac/LaunchAtLogin.framework/Resources/copy-helper.sh

It works fine without it so I think it should be specified it is only required for Carthage & not needed for CocoaPods as it may confuse beginners like me.

Indicate whether the app was launched at login

Sometimes you would want different behavior if the app was launched at login vs. normally. For example, you want a window to show when launched normally, but not when launched at login.

We could add a property LaunchAtLogin.wasLaunchedAtLogin for this.

The helper app will have to somehow pass a message to the main app, which we'll read and use in the .wasLaunchedAtLogin property.

One possible solution here: https://blog.timschroeder.net/2014/01/25/detecting-launch-at-login-revisited/ But I was hoping for a simpler solution.


I have tried checking keySenderPIDAttr at applicationDidFinishLaunching, but it just pointed at the main app.

Code Signature Invalid. LaunchAtLogin crashes and starts again every minute

LaunchAtLoginHelper.app crashes and restarts infinitely after enabling it in parent app. I tried everything: clean derived data, ensured there's no build anywhere, restart my Mac

Signed with Developer ID. Notarization doesn't help

Screen Shot 2020-03-22 at 16 09 57

Screen Shot 2020-03-22 at 16 28 22

MacOS: 10.15.3
Xcode: 11.3.1
LaunchAtLogin: 3.0

Process: LaunchAtLoginHelper [741]
Path: /Users/USER/Library/Developer/Xcode/DerivedData/myapp-brgstowqtjknyydmuxizgaocwzvk/Build/Products/Debug/myapp.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app/Contents/MacOS/LaunchAtLoginHelper
Identifier: LaunchAtLoginHelper
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: LaunchAtLoginHelper [741]
User ID: 501

Date/Time: 2020-03-22 16:06:18.630 +0300
OS Version: Mac OS X 10.15.3 (19D76)
Report Version: 12
Bridge OS Version: 4.2 (17P3050)
Anonymous UUID: 7B9504BD-E7E4-32D2-F641-BB2C2FC5CC69

Time Awake Since Boot: 59 seconds

System Integrity Protection: enabled

Crashed Thread: Unknown

Exception Type: EXC_CRASH (Code Signature Invalid)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

CocoaPods does not build LaunchAtLoginHelper.app (and can't)

I could never get LaunchAtLogin to work when I consumed via CocoaPods so I had some time this weekend to dig in and here is what I found...

Short Version

The podspec is only producing the LaunchAtLogin.framework, not the Helper.app so consuming LaunchAtLogin via CocoaPods is busted... and also, the fix is not straightforward. I would recommend removing LaunchAtLogin from CocoaPods and updating the documentation to only support Carthage as the way to distribute your library.

Long Version

Your repo builds 2 targets (the LaunchAtLoginHelper.app and then the LaunchAtLogin.framework). The current podspec is just building 1 target (a framework), so there is no .app to copy when copyhelper.sh is called. You wouldn't know that from the build output because the script mistakenly returns a success exit code even though it can't find the LaunchAtLoginHelper.app.

screen shot 2019-02-04 at 7 28 14 am

I tried to update the podspec with 2 subspecs so that it would first build the .app and then the .framework but I don't think it's possible to get CocoaPods to build a .app. It always assume you are building a .framework. CocoaPods tries to figure out your build config, so it generates its own xcconfig and info.plist (there was discussion here about using the xcodeproj settings but that never materialized). After much searching online I failed to find any example or documentation about generating a .app from CocoaPods... it kind of always assumes you are distributing libraries. I tried copying the .app's info.plist and setting the INFOPLIST_FILE in the xcconfig to point to it but I never could get it working. Carthage works because it uses your actual build config and info.plist. I do believe there are ways to make CocoaPods work, but it's probably easier to just tell people to use Carthage. Which leads me to...

Options to fix this

  1. Give up on CocoaPods and just recommend people use Carthage to consume LaunchAtLogin. I know some people (like me) only like to use CocoaPods for getting their dependencies and mixing podfiles with cartfiles sounds like it could cause issues, but in practice it should be fine for this library. LaunchAtLogin does not have any dependencies so it's not like consumers would run into dependency collisions between what CocoaPods and Carthage are pulling down. This is now how I'm consuming the library (mixing podfile and Cartfile) and I haven't run into any issues yet.

  2. Make a build script to build the Helper.app that would run before executing copyhelper.sh. You could use xcodebuild in a script to make sure you build the Helper.app and maybe it wouldn't be too hard to do. Just have to make sure the script is building the correct version of the helper.app (debug or release - or maybe just always build release?). It would be one more script to write and debug if people have issues, but it's do-able.

  3. Checkin the Helper.app binary and have CocoaPods pull it down with the source. I came across a blog post talking about distributing binaries with CocoaPods so it seems do-able.

Next Steps

@sindresorhus I'll leave you to decide which option to go with (or maybe there is another option I'm missing). If it were me maintaining this I would keep it simple and go with option 1. If you do want to go that route I can make a pull request to update the README and fix the copyhelper.sh script to set the exit code on error. All you would need to do (besides reviewing and merging that PR) is pod trunk deprecate LaunchAtLogin.

BTW, you can probably resolve #21 and #7 as dupes of this (and maybe #11? Although the original post was using Carthage so maybe it's not a dupe, just some of the comments are from people hitting the CocoaPods issue).

Any way to reduce LaunchAtLoginHelper.app size?

Currently it adds an additional overload of 11MB & I was checking out similar menubar apps which have much less size.

Like f.lux is only 3.3MB & it has Launch At Login functionality. Is there any way to achieve this or do we need to go the difficult route & configure manually?

SwiftUI related properties not available

Looks like LaunchAtLogin.Toggle(), LaunchAtLogin.observable and LaunchAtLogin.publisher are not available in v3.0.2 yet.
Would like to see a new release to expose them. Thanks! 🙏

Why is LaunchAtLogin.swift implemented as enum (and not as class or struct)?

Hi @sindresorhus . First of all I think your design of LaunchAtLogin is great!

But I'm just curious why is it implemented as enum?

My impression was that enums should be used to define a common type for a group of related values (case items). I occasionally keep seeing enum being used as much more, like in your example.

I was just wondering what is the benefit? Were there any limitations to implementing logic via class or struct approach?

I have a feel that using enums in the way you did is kind of abusing enums. But it may be well since I come from the Java world originally. Or if you can point to some article were it is justified or encouraged to use enums the way you did.

Note: I'm aware this question is not an Issue in classical sence, I was just curious in the discussion.

Thank you.

Compile LaunchAtLoginHelper.app to Universal app?

I'm using SPM to integrate this package, looks like the LaunchAtLoginHelper.app bundled in Contents/Library/LoginItems is still an Intel-based app.

Do you think it is a good idea to recompile it to a universal app? Thanks!

Don't know where to add script

I've installed this framework with Swift Package Manager and included it in my project. However, I can't seem to make it work after I set .isEnabled = true since I restart my system and nothing happened. I followed the instructions to remove Xcode's Derived Data and double-checked there're no duplicated files of my app. So I figured this might caused by adding the script mistakenly.

Here're steps I took:

  1. Targets(AppName) -> Build Phases -> Run Script
  2. I left everything else as default and copied "${BUILT_PRODUCTS_DIR}/LaunchAtLogin_LaunchAtLogin.bundle/Contents/Resources/copy-helper-swiftpm.sh" (with quote) to the textfield below to replace # Type a script or drag a script file from your workspace to insert its path.
  3. In my project, import framework and set .isEnabled = true. Build and run, then restart system

I don't know where did I get wrong, can anybody give me some advice? Much appreciated.

App won't start at login

Created a new project with a fresh bundle id to avoid zombie instances of the app.

This is my code:

@IBAction func onBtn(_ sender: NSButton) {
        LaunchAtLogin.isEnabled = true
    }    
    
    @IBAction func offBtn(_ sender: NSButton) {
        LaunchAtLogin.isEnabled = false
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        if(LaunchAtLogin.isEnabled){
            status.stringValue = "ON"
        }
        else
        {
            status.stringValue = "OFF"
        }        
    }

I've run it in debugging mode.
I can see that isEnabled returns true even after restarting the app.
Also, running /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump will include the fresh bundle id but yet when restarting my machine, the app won't launch.

How else can I debug this?

Edit: Seems like the issue is when compiled on Xcode Version 13.0 beta 5

App doesn't start on login

I installed the framework using Carthage and set LaunchAtLogin.isEnabled = true on button click. But my app doesn't start at login. Is there something I am missing?

Suggestion: Add ITSAppUsesNonExemptEncryption in helper's info.plist

First, thanks for such a wonderful framework.

Currently the LaunchAtLoginHelper doesn't contain ITSAppUsesNonExemptEncryption:No in it's info.plist. Since App Store checks each info.plist in the uploaded app, unless every app's info.plist includes ITSAppUsesNonExemptEncryption:No, App Store Connect prompts the App Uses Non-Exempt Encryption confirmation every time when selecting a new build.

So maybe we could add it in the LaunchAtLoginHelper's info.plist?

Install without Carthage

Can you provide instructions in the README on how to install this without using Carthage or CocoaPods?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.