Rename a Mac application

Hi, it is possible to rename a mac app created with xojo via another app
If so, how?
Mario

Renaming by changing the filename? That would depend on the other app wouldn’t it?

I created an automatic installer for the updates of my software, images, files, any libraries, etc. and application, for window no problem, for mac I only have problems with the application. I can delete the application, the one inside the Contents / MacOS folder and restore it with the new one, restore permissions
dim p as new Permmission (& o755)
p.OwnerExecute = true
P.OwenrRead = true
Permissions = P
in some Macs everything is ok, in others not. I found that passing the whole application with TeamViewer or AnyDesk the same thing happens, not in all macs it works, but if I compress the application (zippata) it always works. Here is if I can rename the application I would insert the new zipped one and I would have it decompress in autoamatico, remove the compressed file it is possible then the user will have to remove the renamed one. Excuse my bad English
Mario

Okay. If I understand you correctly, my response would be don’t do this.

For apps to run on customer machines, it has to be code signed. This involves creating a hash of all the containing files of an application, with the intention to detect when an application has been modified.

Which is exactly what this process is doing, it is modifying parts of the app, and thus invalidating the code signature, which will result in future versions of the macOS refusing to run the application. I appreciate your intention and wish that there was a way how we could simply update our application by only replacing the parts that have changed. But those days are long gone.

The simplest way to provide users with a secure update mechanism is to supply an Apple installer made form the entire application. The Apple installer will replace the application on the customers hard drive BEFORE it considers installing it in the Applications folder. This will keep the code signature intact and allow the customer to run your application.

I hope that this makes some sense.

2 Likes

You don’t need to rename the app. You need to use authorisation to delete and then install the new version. For >= Crapolina you need to use authorisation anyways.

But using a macOS installer is way easier.

I understood, thanks. Sorry for my ignorance, for the first installation on windows I use Inno setup, on mac I have always released the entire application (App, file, images and so on) in a zipped file with instructions for correct operation inside. For the first start of the Open right mouse application, with the new versions of macos it is a little more complicated but not impossible. (unknown author) How to register? how much? where I download macOS installer and instructions to use it. Thanks
Mario

MacOS usually doesn’t have use installers. Many apps use a dmg instead.

Do you know anything about codesigning on macOS? Notarisation? Dmgs?

You need a developer account at Apple (100$). Then you need XCode. This makes certificates. Then do yourself a favour and buy AppWrapper from ohanaware.com. This makes codesigning less painful.

2 Likes

No need to apologize. The Mac has been changing dramatically in the last decade (change of management), if you haven’t been building Mac Apps in this time, you wouldn’t know.

You need to pay Apple $100 a year to be able to release apps on the Mac without getting the unknown developer message. Then as @Beatrix_Willius says you will need to download Apple’s Xcode to get all the tools needed installed on your computer.

After that, you can use App Wrapper (which I wrote) to code sign your apps, create the Apple installer and then submit your application to Apple for them to approve it (Notarization).

Once Apple have approved your application, customers will be able to open it without using the right click option.

There are two Apple websites involved. One is the developer site, where you sign up as a developer and get a developer id. Then you need to get some certificates that you install (using keychain) on your machine. You also need an app-specific password. All this info is needed by AppWrapper.The other Apple site is appleid.apple.com.

I can’t at this point remember which items you get from each site, just that both sites are involved.

The appleid.apple.com site is involved, because you need to set an application-specific password for notarisation.

Yes, and the trick here is not to forget your appleid and need to change it to another. Doing so invalidates all app-specific passwords.

Apple: the easy way to do things :wink:

1 Like

Thanks to all of you, if I find any problems doing this I will ask you for help
Mario