Thatās what an installer does or (manually a DMG file you are providing). Most users would not like that someone is moving whatsoever automatically into their app filter.
well in this case they will and it is a mandatory option so I guess the best way to doit would be a helper or something doing that.
You will be amazed to see a lot of users just double clicking on the app in the DMG and not even moving it to the apps folder so dumping the app anywhere in the Mac and then searching for it so trying to avoid all this mess by putting it in the right place where it should be.
Yes, I understand where you are coming from. Issue is that Apple sees this differently and suggests using an installation tool for that. But it is uncommon that you are starting an app and that this app will copy itself or other stuff into the app folder ā¦ and chances are very high that Apple will be even more restrictive on what will be possible in future and what not. I personally suggest not starting that fight ;-). If this a business app (more than a family & friends app) you should follow the guidelines. https://www.ohanaware.com/appwrapper/ gives you a good starting point for more information, notarization, sandbox, etc.
In the old days I did notice myself, but recently? I am not aware of any program copying itself ā¦ unless it is installing itself via pkg ā¦ but this is not saying that Iām right. Perhaps pure coincidence
And then provides an installer that happily installs a new version into the Trash, if that is where you dragged a previous version before installing the new one.
Or installs into iCloud if it finds an old copy of the app over there.
At least with a DMG, they drag the app into Applications.
If they only double click while in the DMG, thatās āOKā ā¦ no install has to happen, but it may run slowly.
yup, Iām only using DMG for my Apps. I am suspicious when Iām seeing an installer ā¦ if not from a big brand it is almost always rubbish on macOS and doing silly things.
thanks guys, for us is a special case and the app must be in Applications folder and 80 % of the users donāt even move the app in the DMG even if they have clear instructions to do so, they simply double click on it and the app itself has to be in Applications folder for many reasons so because we donāt do MAS I care less about Apple guidelines and I do what I need to do and done.
Thanks again and if I find a way Iāll post it here
Just to be clear, MAS is not the only place where this is important. Applications that are not dragged to Applications are quarantined in recent versions of macOS and will run in a restricted way anyway.
It might be simpler to detect where the app is running from and refuse to launch if the app isnāt in /Applications.
You can check Application.Executablefile, and if the app is not in /Applications, launch a shell from within the application, copying itself in SpecialFolder.Applications.
Sub Open() Handles Open
Dim f As folderitem = app.ExecutableFile.parent.parent.Parent
If f.ShellPath.IndexOf("/Applications") <> 0 Then
Dim s as new shell
Dim cmd As String = "cp -R "+ f.shellpath + " /Applications/"
s.Execute(cmd)
End If
End Sub
The applications I know that copy themselves to the Applications folder all ask the user prior to do the copy. Iād say it must be done.
If running from the Applications folder is mandatory, Iād suggest the dialog to show āThis application must be started from the āApplicationsā folder. Would you like me to copy myself there?ā with buttons {āCopy&restartā,āQuitā}.
I agree that good ethical business practice should endorse such a behavior. But I understood the OP that he has to deal with ādumbā end users within a company or a restricted business context. In this case (but only in this case) I would agree that you can do nasty things, but I still prefert your way showing a popup and asking, but if users are to dumb to move a file from a dmg icon into the applications folder then there is little hope ā¦ I know a very few similar customers ;-).
Even if the dialog mentions āIt will be a great experience for you to move me in the apps folder! Enjoy by clicking this nice āGet joy and move meā blue button below and youāll be satisfied for the rest of your day!
You donāt have alternatives as I wonāt run otherwise, so do it and be pleased!ā would a user not do it, as dumb as (s)he can be?
I have (unfortunately) seen the utmost incredible things. I currently have a customer ā¦ opening tickets again, and again about similar topics. When she opens the app, she get a popup after 1 second if there is an update. She only needs to click it. Current version is 4.3.2. She ist using 3.8.9 ā¦ sometimes I see little hope for the human race
well agree what you said as well but not in this case and it is a mandatory thing and taking in consideration that they hate popups the idea came from the users to avoid putting them in trouble so I guess this is what it will be done.