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.
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.