Super very long verification when starting app

Compared to other apps - like for instance Xojo - my app has a super very long verification when starting the app the first time.

I did some experimentation and removed the uninstaller app that is also in the dmg. The app started much faster. But I want to keep the uninstaller in case the user - well - wants to uninstall the app.

Is there anything I can do to improve verification? Is this something that Apple needs to address?

Disable internet access on the machine.

1 Like

Yes, an app that archives emails from IMAP accounts doesn’t need internet access.

Joking aside it really takes much longer than for other apps. I just don’t know what I can do to improve that.

Most of Apple’s process is opaque, so this is all guess work.

  1. Application size.
  2. Application complexity.
  3. Supported Architectures (also covers point 1).

The easiest thing you can try is to NOT to build a UB and just one platform, cutting down application size and complexity.

My experience is that the problem is not starting your app the first time but opening the dmg in order to install your app.
The verification takes forever.

In my case I have a self-written installer which is typically opened directly from the dmg. Starting the installer from the dmg takes forever. Opening the dmg isn’t the problem.

The problem already shows up for Intel build only.

I think the problem may be the app complexity because the installer contains the app and the uninstaller. I’ll try to remove the uninstaller from the installer app first.

The self-written installer is there for historical purposes in the times before AppWrapper.

I see. For a period of time I used an Apple Script application as an installer, it would simply tell Finder to copy the application from the DMG to the Applications folder.

I used to have a technology I called “Install Easy”. When the application was first launched and detected it wasn’t in the applications folder, it would ask the user if they’d like it to be moved/copied there automagically.

Repeated breakages due to OS updates and I gave up with both of these. Pretty sums up how a lot of macOS developers feel at the moment, the more Apple breaks their apps the more they’re inclined to just give up.

Apple could really do with someone at the helm who gives a damn about the products and not just their personal multi-million dollar bonuses.

1 Like

@Emile_Schwarz : no.

Download dmg: as fast an internet connection.
Open dmg: fast enough.
Double-click installer: super super slow.
Install app: fast enough.

Just out of curiosity
 Is your installer signed & notarized?

Are you notarizing the app or the DMG? It sounds like you may have a notarized app on an un-notarized DMG?

Of course, my app and the dmg signed and notarised.

An app that is not in the Applications folder will be translocated.
(A mini-sandboxed environment)
And verrrryyyy slow.
Dont run an installer or an app from inside a DMG.
Copy it to Applications first.

The speed of the installer app is not the problem. Just the verification. I can’t tell my users “Copy the installer to some folder first”.

Then I suspect the best approach is to change the install method.
(I appreciate you may not want to do that, so dont shoot the messenger.)

Does installation of your app need more than ‘put the app into Applications’ (ie is it creating databases in applicationdata and so on?)

if not, a DMG with ‘drag from here to Applications’ seems to be the (current) best route.

Second is a PKG file (second because if the user has dragged an older version into the trash, the dumb PKG will install an update into the trash too!)

The self-written installer is there for historical reasons. Yes, a new installation method might make sense.

I need some installation method because I have a helper app that needs to be restarted after installation.

Sadly, you can hardly mix “historical reasons” with “Apple’s recent changes”; that’s rather incompatible.

Restarted before the main app is launched? Isn’t that somehow “backward” (in other word, “unsupported”)?

My app Mail Archiver has a feature called schedule. Emails can be archived automatically once a day, week and so on. There is a helper app which is basically a timer. The helper app has a launch agent which makes sure that the app is started after a restart. But the helper app also needs to be started after a new version has been installed.

I can’t do that with only a dmg where the app is “installed” by drag-and-drop.

Thsi sounds more like the kind of thing you need for that.
I personally dont know how to set up a launch daemon, but it may be possible with a small app.

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html

A launcd daemon using launchd can run automatically after a restart, run all the time (launchd watches for it), or even launch at regular intervals for you.

As I wrote in the post above I already have a launch agent. But the launch agent needs to be reloaded after a new version. Which can only be done by an installer.

As a user, I would fairly understand that this helper ceases to run automatically after installing a new version of the app.
But yes, I understand. You’re in the rare edge cases where an installer makes sense (I guess).

Now, perhaps all installers are just slow to open because there’s a lot from Apple to check and you can’t do anything against that?
Choose your “best problem” :wink: