A sample project that demonstrates how to move a running Mac OS X application to the Applications folder.
Builds and runs on Mac OS X 10.6 or higher. Does NOT support sandboxed applications.
Build then embed LetsMove.framework into your app.
Copy the following files into your project:
If your project has ARC enabled, you'll want to disable ARC on the above files. You can do so by adding -fno-objc-arc compiler flag to your PFMoveApplication.m source file. See http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project/6658549#6658549
If your application is localized, also copy the 'MoveApplication.string' files into your project.
Link your application against Security.framework.
In your app delegate's "-[applicationWillFinishLaunching:]" method, call the PFMoveToApplicationsFolderIfNecessary function at the very top.
- Added Greek and Vietnamese localizations
- Update project for Xcode 11.5
- Add PFMoveIsInProgress function
- Update project for Xcode 9.1
- Fix localization not being used when built as a framework
- Fix backwards compatibility with OS X 10.9 and earlier being broken
- Make usable for Electron based apps or other apps that do not have access to the main thread dispatch queue
- Update Russian localization
- Fix not deleting or trashing itself after copying to /Applications in macOS Sierra
- Support for Carthage added
- Project now support OS X 10.6 and higher
- Support for applications bundled inside another application
- Brazilian Portuguese localization slightly updated
- Build warnings fixed
- Slovak localization added
- Catalan localization added
- Tranditional Chinese localization added.
- Deprecation warning that appears when minimum deployment target is set to OS X 10.10 taken care of
- Swedish localization added
- Hugarian, Serbian, and Turkish localizations added
- Macedonian localization added
- Polish localization added
- Use country code based .lproj directories
- Make it compile for projects that don't use precompiled headers to import AppKit.framework
- Minor adjustment to Dutch localization
- Warning fixes in example project
- Objective-C++ compatibility
- Fixed deprecation warnings that show up when building against the OS X 10.9 SDK.
- Removed OS X 10.4 support
- Properly detect if the running app is in a disk image
- Fixed a bug where if the app's name contained a quote, the app could not be moved
- After a successful move, delete the application instead of moving it to the Trash.
- Other fixes and improvements
- If the app is already there in the Applications folder but not writable, request authentication from user
- Added Korean localization
- Fixed an exception that could happen.
- Only move to ~/Appilcations directory if an app is already in there.
- Function calls deprecated in 10.7 no longer cause compile time warnings.
- Added Simplified Chinese and European Portuguese localizations
- Garbage collection compatibility added
- Use a new method to check if an application is already running on Mac OS X 10.6 systems or higher
- Use exit(0) to terminate the app before relaunching instead of [NSApp terminate:]. We don't want applicationShouldTerminate or applicationWillTerminate NSApplication delegate methods to be called, possibly introducing side effects.
- Resolve any aliases when finding the Applications directory
- Cleaned up the code a bit. Almost functionally equivalent to 1.5.1.
- Fixed a bug with clearing the quarantine file attribute on Mac OS X 10.5
- Don't prompt to move the application if it has "Applications" in its path somewhere
- Mac OS X 10.5 compatibility fixes
- Fixed a rare bug in the shell script that checks to see if the app is already running
- Clear quarantine flag after copying
- Compile time option to show normal sized alert supress checkbox button
- German, Danish, and Norwegian localizations added
- Copy application from disk image then unmount disk image
- Spanish, French, Dutch, and Russian localizations
- Prefers ~/Applications over /Applications if it exists
- Escape key pushes the "Do Not Move" button
- First release
- Andy Kim
- John Brayton
- Chad Sellers
- Kevin LaCoste
- Rasmus Andersson
- Timothy J. Wood
- Matt Gallagher
- Whitney Young
- Nick Moore
- Nicholas Riley
- Matt Prowse
- Maxim Ananov
- Charlie Stigler
- Eita Hayashi (Japanese)
- Gleb M. Borisov, Maxim Ananov (Russian)
- Wouter Broekhof (Dutch)
- Rasmus Andersson / Spotify (French and Spanish)
- Markus Kirschner (German)
- Fredrik Nannestad (Danish)
- Georg Alexander Bøe (Norwegian)
- Marco Improda (Italian)
- Venj Chu (Simplified Chinese)
- Sérgio Miranda (European Portuguese)
- Victor Figueiredo and BR Lingo (Brazilian Portuguese)
- AppLingua (Korean)
- Czech X Team (Czech)
- Marek Telecki (Polish)
- Petar Vlahu (Macedonian)
- Václav Slavík (Hungarian, Serbian, and Turkish)
- Erik Vikström (Swedish)
- Inndy Lin (Traditional Chinese)
- aONe (Catalan)
- Marek Hrusovsky (Slovak)
- Sotirios Papathanasiou (Greek)
- Minh-Ton (Vietnamese)