1

enter image description hereAs part of my project, I ship ‘Zipalign’ file along with other files and executes the zipalign command like below while generating the apk file.

zipalign -f 4 /app-debug.apk /aligned-app-debug.apk

It was working fine until MacOS version 10.14.x(Mojave). But when I run the same command in the latest MacOS version 10.15.x( Catalina ), I am getting error

‘zipalign cannot be opened because the developer cannot be verified’

Please suggest

1 Answers1

0

Solution #1:

  1. Open `System Preferences/Security & Privacy/Developer Tools.
  2. Allow Terminal app to run software locally that does not meet system's security policy

Solution #2:

As you are a developer, you should read the Apple third-party software requirements and sign your app accordingly.

Community
  • 1
  • 1
Aleksey Potapov
  • 3,683
  • 5
  • 42
  • 65
  • thanks for the quick suggestion, the zipalign file comes with AndroidStudio which is working fine in my system. But when I copy the same file in other systems it is throwing the error message. As my product is used by many customers instead of asking all the users to change their security permission is there anything I could do which should work on all the macOS systems? Thanks again. – ChandraSekhar Mar 05 '20 at 10:23
  • How do you distribute your `zipalign` file? In case of downloading it from the Internet try to use `curl` or `wget`. In this case there should be no error. Because `Gatekeeper` monitors files downloaded from the Internet through Internet browsers. Also, you could distribute `zipalign` for macOS users via [Homebrew](https://brew.sh) – Aleksey Potapov Mar 05 '20 at 10:52
  • yes, that is a good solution, but currently, I ship in a zip file as I have to ship some other files as well along with it. Things were working fine until 10.14 but issue is coming only with 10.15 Catalina OS. – ChandraSekhar Mar 05 '20 at 10:55
  • Yes, this is a Catalina issue. Here is the description of the [additional manipulations](https://support.apple.com/en-us/HT202491) to make an unsigned application run. The key here is: `by default, macOS Catalina also requires software to be notarized, so you can be confident that the software you run on your Mac doesn't contain known malware. Before opening downloaded software for the first time, macOS requests your approval to make sure you aren’t misled into running software you didn’t expect.` – Aleksey Potapov Mar 05 '20 at 12:32