How to distribute custom macOs app without App Store

94 views Asked by At

I've created a macOS app (test.app) using third-party software, without using Xcode, and it's operating smoothly. However, when attempting to launch it for the first time, an error message appears stating, "can’t be opened because Apple cannot check it for malicious software." I have also an Apple Developer ID and a .crt certificate file. How I can add verification in my custom app so that I can distribute it without any warning message without using App Store.

I have tried "codesign" command, but upon installing same error occurs.

2

There are 2 answers

1
fschlegelone On

Unfortunately, you have to submit your app to the Apple Developer Hub to get it notarized. (https://developer.apple.com/developer-id/)

But no worries, that's the case with many apps. You can work around this issue if you go to /Applications and right click the app and then press "open". Than it will open. You only have to do this the first time you're running the app on your device. I think you can also bypass this by building a .pkg installer but I'm not quite sure.

btw - if the app is good, publish it on github so that you can get it on brew. That's not really hard but it will help you a lot with finding new users. And keep in mind that you have to build apps for arm64 architecture for the new mac devices, otherwise you have to run it with rosetta which sucks or it will crash.

0
soundflix On

If you do not want the Gatekeeper security mechanism to block your app with this warning, you need to upload your app for notarization. This can be generally done with notarytool, a CLI executable that you get from „command line tools“ in your Apple Developer account.

I would recommend to read the documentation from Apple.

It is also advisable to staple your notarization ticket to make it available offline, using the CLI stapler.