Command line app fails to run if first run was attempted without internet connection

Assuming this is happening because command line-only apps cannot be stapled but i would assume that once the machine is connected to the internet it should be checked and allowed to run.

Steps to reproduce problem:

  1. Download signed and notarized command-line only app from internet
  2. disconnect machine from internet
  3. run command-line app
  4. app is prevented from running with "this app cannot be checked for malware error"
  5. connect machine to internet
  6. run app again
  7. app is still prevented from running with same error

If you re-download the app and make sure machine is connected to internet on first run then app can run with machine is not connected to internet.

It does sound like the trusted execution system is caching the negative result from step 4.

IMO the best way around this is to package your command-line tool in a container that can be stapled, that is, a disk image or an installer package. For advice on how to do that, see Packaging Mac Software for Distribution.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unfortunately this is not possible in our case. Why can't Apple fix this bug? Or better yet why can't we just staple command line apps?

Unfortunately this is not possible in our case.

Why is that?

Why can't Apple fix this bug?

I’m not entirely sure this is a bug. Did you file a bug report about it? If so, what was the bug number?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I’m not entirely sure this is a bug. 

you said: "It does sound like the trusted execution system is caching the negative result from step 4."

that sure sounds like not intended behavior which most people would interpret to be a bug ;)

Did you file a bug report about it? If so, what was the bug number?

Could you let me know how to file a bug?

Could you let me know how to file a bug?

You do that using Feedback Assistant.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Command line app fails to run if first run was attempted without internet connection
 
 
Q