mobile:installCertificate broken on iOS 12.2 (but fixable)
See original GitHub issueThe problem
iOS 12.2 changed the alerts and UI for installing downloaded certificates. After downloading, now you need to dismiss an alert and open Settings > General > Profile, and install the profile. Then the step of going into Security and trusting the certificate.
We’ll have to automate the settings app differently if ios version >= 12.2
Environment
- Appium version (or git revision) that exhibits the issue: 1.12.1
- Last Appium version that did not exhibit the issue (if applicable): unrelated, it’s iOS version
- Desktop OS/version used to run Appium: MacOS 10.14.4
- Node.js version (unless using Appium.app|exe): 11.6.0
- Npm or Yarn package manager: npm
- Mobile platform/version under test: ios
- Real device or emulator/simulator: sim
- Appium CLI or Appium.app|exe: cli
Code To Reproduce Issue [ Good To Have ]
String IOS_APP = "https://github.com/cloudgrey-io/the-app/releases/download/v1.6.1/TheApp-v1.6.1.app.zip";
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platformName", "iOS");
caps.setCapability("platformVersion", "12.2");
caps.setCapability("deviceName", "iPhone Xs");
caps.setCapability("automationName", "XCUITest");
caps.setCapability("app", IOS_APP);
driver = new IOSDriver(new URL("http://0.0.0.0:4723/wd/hub"), caps);
Path certificatePath = Paths.get(System.getProperty("user.home"), ".mitmproxy", "mitmproxy-ca-cert.pem");
Map<String, Object> args = new HashMap<>();
byte[] byteContent = Files.readAllBytes(certificatePath);
args.put("content", Base64.getEncoder().encodeToString(byteContent));
driver.executeScript("mobile: installCertificate", args);
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Intro to certificate management for Apple devices
Root certificates on iPhone and iPad The user can then trust the certificate on the device by going to Settings > General >...
Read more >2 proven ways to fix error “Cannot Verify Server Identity” in ...
Cannot Verify Server Identity” is caused by iPhone's and iOS's strict validation of mail server certificates. Here are 2 proven ways to fix...
Read more >Why won't Safari open that web page?
Open Safari. ... Click “Show Certificate” in the window that opens. Select “ISRG Root X1 Certificate” from the hierarchical list. You must select ......
Read more >How to Fix Security Certificate Error on Android
The reason the above error appears is that your phone's unable to validate the certificate. This happens when something's wrong with that site's ......
Read more >When i try to install my certificate in keychain, the error says ...
Still relevant for macOS 12.2 in 2022. Got the same issue when installing Charles Proxy's root certs: developer.apple.com/forums/thread/… – oligofren. Jan ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Feel free to fix it, then.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.