MobileNativeFoundation / bluepill

Bluepill is a reliable iOS testing tool that runs UI tests using multiple simulators on a single machine
BSD 2-Clause "Simplified" License
3.19k stars 232 forks source link

Trust the Custom Certs #393

Closed yashwanth-l closed 2 years ago

yashwanth-l commented 4 years ago

This is a continuation of #363 where we would be able to install the Certs using iotrust

Any insights what xcode OR simctl commands?

yashwanth-l commented 4 years ago

Basically how to we turn the plug on for the Certs as Trusted in Settings --> About --> Certificate Trust Settings after using iostrust to install the certs on the simulator?

ob commented 4 years ago

You could run iotrust from a shell script and pass it on to bluepill via the --script-file flag/config option.

ob commented 4 years ago

Ah, I missed you're already installing them, now you want to trust them? Hmm... I'm don't know how to do that...

ob commented 4 years ago

I've been asking around and there seems to be no way of doing that via any xcrun simctl command. Your best option is to file a ticket with Apple using Feedback Assistant and ask for the feature. I also got pointed at https://github.com/ADVTOOLS/ADVTrustStore but I've never used it so I don't know if it offers more functionality than iotrust or if it also has the same problem.

yashwanth-l commented 3 years ago

Is there any other alternate?

timsutton commented 2 years ago

Sometime around Xcode 11 or 12 they added this:

~ xcrun simctl keychain -h
Manipulate a device's keychain
Usage: simctl keychain <device> <action> [arguments]

    add-root-cert [path]
        Add a certificate to the trusted root store.

    add-cert [path]
        Add a certificate to the keychain.

    reset
        Reset the keychain.