You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Bypass the signed .pkg file from apple gatekeeeper

I have built a macOS app. First I was distributing Unsigned .pkg. So whenever client try to install it



for opening the app, the client has to open through the following steps

System Preference >> Security and Privacy >> General tab >> Allow app downloaded from section >> click on Open anyway.


So he asked me to create the signed .pkg file. So users don't fear opening malicious software. So with the following steps, I created signed .app and .pkg both.


So basically I follow these steps:


  1. First I created the signed .app file using Apple Notarization and I exported my archive.
  2. After getting my signed .app file I use Packages to create a .pkg file which is actually unsigned .pkg.


So with help of the following command, I create a signed .pkg

productsign -sign “Developer ID Installer: Your Apple Account Name (**********)” ~/Desktop/example.pkg ~/Desktop/signed-example.pkg


So finally I created my signed .pkg file.


So before distributing the app I thought of testing. So I uploaded the .pkg file to my google drive and downloaded it. I was trying to do as the user will do like download the .pkg file and open it.

So did I but when I opened it, it again showing the same above pop up when it was unsigned.


I didn't get the point even my signed .pkg file is blocked by the Apple gatekeeper.


How to remove this pop-up so users can directly install it without fear.

Any suggestions...



Posted on Jul 26, 2021 5:25 AM

Reply

Similar questions

1 reply

Jul 26, 2021 1:24 PM in response to ravindra132

ravindra132 wrote:

So with help of the following command, I create a signed .pkg

That web site is really, really wrong. In addition, it doesn't say anything about notarization. For notarization, the outermost package is the one that needs to be notarized.


If you have a stand-alone app, you don't need an installer. Just zip the app. If your app is already notarized, then you should be done.


However, I have to say, I've seen many, many similar reports of problems with notarization. In absolutely every single case, problems are self-inflicted. It may be that you could just skip the installer package and be done. Or maybe you could notarize the installer package and be done. But based on my past experience, there is probably much, much more that you will need to do. What that might be, I can't say.


Generally, then notarization process is very easy. Here it is:

1) Use Xcode to generate an archive. Go to the "Product" menu and choose "Archive".

2) When the archive is complete, it will open the "Organizer" window. I think the archive will already be selected for you.

3) Select on your archive and click the "Distribute App" button.

4) Click the "Developer ID" checkbox and then click the "Next" button.

5) Click the "Upload" checkbox and then click the "Next" button.

6) You might need to click "Next" a couple more times to confirm that everything looks good.

7) You should get to a point where it says "Waiting for notarization" or something similar. Just let it sit there. After a couple of minutes, an "Export" button will appear in this dialog where you can export a notarized version of your app. Zip that up and post it on the internet.

7a) Another option is to go back to the Organizer at any time later and it will say "Ready to distribute" in the Status column. If you hover over this status with your mouse, an "Export" button will be revealed. This is the same export as above.

8) After posting your zip file to the internet, download it from the internet and confirm that it is properly notarized.


Total elapsed time, around 3-4 minutes.


Unfortunately, people often get tripped up at step #1. Maybe they used "Homebrew" or "QT" or something even worse and they aren't using Xcode. If this is the case, God help you my friend. You're on your own.


It is also possible to use the "altool" to notarize from the command line. I think that Apple is has a newer, easier-to-use version of command line notarization now but I think it is still in beta.


Those people who do need to use "altool" will often get tripped up on #8. In many cases, they won't even attempt it. They just assume that going through the motions is the same as having achieved a desired end result. Like that ever happens in software development. It isn't "Notarized" until you succeed at #8, so don't bother getting confused when you have "notarized" but "notarization" isn't working. There are only two possible states - successfully notarized and all screwed up. There is no such thing as "partially notarized".


If you aren't using Xcode and are getting tripped up on #8, the most likely cause is something crazy going on in the open-source libraries you are using. There are a number of settings to relax various aspects of notarization so that these things will run. You may need to run Console.app while you launch the app to find out which of these dynamic library or runtime settings is failing. You might even need to try to app in a factory-fresh virtual machine to ensure that you aren't linking to some Homebrew dylibs that only exist on your development machine.


You might also want to consider using a DTS ticket to get Apple to help.



Bypass the signed .pkg file from apple gatekeeeper

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.