My app contains Privileged Helper tool and when I build locally everything is work.
But when I'm doing this:
create a deployment file via Product - Archive
Install this app
Open
My app can not open, moreover it closed automatically I assume 'cause I can not find an offer window where I should to enter a password for accessing permission for my tool.
But If I run my build via Xcode and trying to open releasing version everything is fine. The window is show and after entered a password my tool is located in LauchDaemons folder and so forth. That is the problem.
Maybe I missed something in the distribution phase?
Related
I have an installer app that gets distributed inside of a notarized disk image. The app is a simple program that performs a few checks on the system and then launches the macOS installer to install a pkg that is contained with the app's bundle.
However, even though this app is inside a mounted disk image, and even though the file it's trying to open is inside its own signed and notarized bundle, it still triggers the "App would like to access files in your Downloads folder" if the dmg is located in the user's Downloads folder, which it almost always will be.
Is there any way to get this app to launch the installer without triggering this message? The entire point of the app is to try and make the installation process as smooth and seamless as possible. The explicit goal is that opening it will go directly into the mac installer with no warning messages, interruptions, or any other sort of dialog box that risks confusing or alarming the user.
Note: just distributing the pkg on its own is not an option, because the purpose of this app is to work around a bug in macOS's installer on Apple Silicon macs. The pkg is Intel only, and if I add a script to it that executes when the pkg opens, then it will confusingly display a warning message to the user twice, once when Installer.app opens as an arm64 process, and then again when it relaunches as an x86_64 process.
This is an annoyingly roundabout workaround, but I managed to do it using launchd.
The gist of the method is to create a plist file in the user's temporary folder specifying a launchd job that starts on demand and just calls /usr/bin/open to open the pkg file inside the application bundle, and then call launchctl to load it. Once the installer is open, remove the launchd job.
I have made a dmg file for my uploader desktop application. This dmg is ported on my website from where i download the same using the Safari Browser. However, when i try to execute it from the downloads folder, the system does not execute it and throws a message stating its from an unidentified developer. Hence, in Security & Privacy settings, i opted to allow download. I cannot expect all the users to do this setting. What modifications do i need to do inorder to make the dmg to run without any such errors/warnings. I am a novice at this, kindly requesting for some help.
Thanks.
You can install an unverified app on mac by right-clicking the DMG and selecting open, this will pop up a warning but as opposed to doubled clicking, there is an option to continue.
See this article for screenshots - http://osxdaily.com/2012/07/27/app-cant-be-opened-because-it-is-from-an-unidentified-developer/
The only other option is to pay Apple to become a verified developer, and then have your app reviewed and added to the Mac app store.
I'm trying to install my app from the Mac App Store now that it's been published. I'm using the same machine as the one I developed the app one. For some reason, the App Store claims "A newer version of this app is already installed on this computer." I haven't touched the version number since I submitted it so this is strange.
I've removed all references of the app from Applications, Library/Preferences, Library/Application Support, Library/Caches, /var, and Trash. I've also cleaned the Product from within Xcode.
Any suggestions?
Thanks!
I had this problem with CoBook on Mountain Lion and nothing out there seemed to work until I found this:
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
Source: http://web.archive.org/web/20130519023616/http://www.hacktheday.com/force-reinstall-application-downloaded-from-mac-app-store
To fix this problem, you need to perform two steps.
Delete all instances of your app. There are likely copies hiding in your home folder in ~/Library/Developer/Xcode/DerivedData/
Reset the user domain in the Launch Services database with
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain user
The lsregister command manages the Launch Service database, or the database that keeps track of applications installed on your Mac and what types of files they open.
It's only necessary to reset the user domain (unlike the other answer from Mat E. that also resets the system and local domain) since your XCode DerivedData exists in your individual user directory. Only resetting this domain will prevent unnecessary warnings about running an app for the first time from reappearing.
Go to ~/Library/Developer/Xcode/DerivedData/ and delete your app's build folder.
This happened again to me but unfortunately the other solutions didn't work. This is what ended up working:
Open the App Store. From the menu bar click Store > Sign In
Click Purchases from the top of the App Store window.
Select your app in the list. Then right or control click where you see Installed then click Install.
Make sure and use the same Apple ID used for the original purchase.
This also works for free apps.
I can run a FireMonkey Application on Mac OSX with PAServer. But now, I would like to deploy the application Mac OS (something like MSI under Windows). How can I do this?
You'll want to read more about Application Bundles.
Using the application bundle that Delphi creates and deploys via PAServer
Since you're using the PAServer, you'll find that it has already created an application bundle for you. After you run the program via the PAServer, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
Go ahead and run this application bundle directly on the Mac. If it complains about missing dylibs, such as libmidas.dylib, simply copy them from the PAServer folder into the application bundle's MacOS folder.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
Changing the icon
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peeking inside the bundle
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.
More about deployment
If your application can be self contained in an app bundle, the standard method is to put the application bundle inside a disk image .dmg file, which allows the user to drop the application into the applications folder.
If your application requires the installation of additional files, libraries, databases, or frameworks, etc., you should create a package. You can utilize PackageMaker to do this. A package is similar to the "msi" installer on Windows that you mention.
When the user double-clicks the package, it's run by Installer. It has a wizard style interface and walks the user through installing the application. You can also sign the package with your code signing certificate.
If you want to include your application bundle in the app store, you'll need to sign it. You'll also need to sandbox it.
Sandboxing and the Mac App Store - Nov 2, 2011
The vast majority of Mac users have been free from malware and we're
working on technologies to help keep it that way. As of March 1, 2012
all apps submitted to the Mac App Store must implement sandboxing.
Sandboxing your app is a great way to protect systems and users by
limiting the resources apps can access and making it more difficult
for malicious software to compromise users' systems. Learn more by
visiting the App Sandbox page.
You must create an Application Bundle in order to deploy you app on a OSX System .
Check these links for more information
Deploying Your Application (Mac OS X installers )
Application Bundle
Building Fancy DMG Images on Mac OS X
I created a simple testbed app in Delphi XE2, and compiled both a Win32 and OSX version of the application.
I zipped up the OSX version, along with a copy of the libcgunwind dylib runtime file and copied this files to a Mac i have access to.
When I unzipped the file, the mac recognized my OSX application and I double clicked it.
This, in turn, opened up a terminal window for some unknown reason along with my simple app's form.
The application itself ran and behaved just fine, but I'm curious why a terminal window would open up on the Mac?
There is a free tool available for Delphi XE2 that will create the OSX deployment app bundle for you, from Windows, without the need for PAServer.
http://enesce.com/delphiosx_bundler
Check the readme for instructions.
IIRC this happens if you execute the binary directly instead via a bundle
Lazarus/FPC apps had the same problem. IIRC the directly executed binary also didn't get events under those circumstances, but those apps were Carbon based. That problem also went away when running via a bundle setup (which is pretty much a manifest, a few dirs and a symlink)
Your application needs to be run from the application bundle. If you run it directly, you'll get the side effect of seeing the terminal window with the command line that is running the application.
You'll want to read more about Application Bundles.
If you're using PAServer, after you run the program for the first time on the Mac, look in the following folder on the Mac for the application bundle:
/Users/[username]/Applications/Embarcadero/PAServer/scratch-dir/[profilename]
If your project is named Project1, you'll see an application bundle in that folder named Project1.
If you read the above wiki article, you'll know that Project1 has a "hidden" extension of .app, and the whole thing is really a folder with all of the required files to run the application.
To the Mac OS user, the application bundle appears as a single program file, complete with an icon. The user can double-click the application bundle to run the application, drag it to their dock, etc.
The application bundle will have the Delphi icon by default, but you can replace it with your own icon. On the Mac, simply right-click on the application bundle in Finder, and select Show Package Contents. In there, look in the Contents/Resources folder for the .icns file.
Use the Icon Composer application that was installed with XCode to create your .icns icon file from existing image files.
Peek around inside at the rest of the contents. You'll see the required dylib, your program file, and the Info.plist file, which is a text file with things like application IDs, signatures, and other important things.