Home > Software engineering >  How to disable SIP on macOS VMs for macOS UI testing in CI/CD environment?
How to disable SIP on macOS VMs for macOS UI testing in CI/CD environment?

Time:02-19

I have been trying to run my macOS UI tests on a remote machine(VM), and it does not work. On a local machine, it works after giving the permissions related to accessibility. After digging through, I realised that you need to have SIP disabled and add the relevant permission.

So, how can I disable SIP on a headless machine in a CI/CD?

CodePudding user response:

Unfortunately, it is not possible to disable SIP on a remote machine. You have to boot in safe mode and disable it from the terminal. And that requires direct access to the machine.

You can ask your provider if they can disable SIP for a specific machine for you, or you can look for providers that do.

There are a few out there, with Codemagic being one of them.

We released SIP disabled macOS images with the latest and beta Xcode versions so you can run macOS UI tests without any extra configuration.

It was frustrating not being able to test the UI of a Mac app, but I’m happy with what we managed to release.

I also wrote a blog post if you are interested in getting started with macOS UI testing.

Full disclosure - I’m a DevRel at Codemagic CI/CD, focusing on helping the community build for Apple platforms.

  • Related