Appium install ios self signed app issues(trust certificate, new driver hang up))

Hi appium experts,

Now i am using appium to install self-signed iphone app, but i encouter two issues, struggle with them:
Public code:
final DesiredCapabilities capabilities = DesiredCapabilities.iphone();

capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");
capabilities.setCapability("browsertype", "iOS");
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "testios1");
capabilities.setCapability(MobileCapabilityType.UDID, "3004b8dd0e186dff2abee4f4d2555a37397b7cf8");
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "12.1.2");
capabilities.setCapability("autoAcceptAlerts", true);
capabilities.setCapability("waitForQuiescence", "false");
capabilities.setCapability("newCommandTimeout", "1800");

issue 1.
If install ipa with below two lines, the second line will hang up, never return the driver.The live.ipa is a self-signed app. How to fix it?
capabilities.setCapability(MobileCapabilityType.APP, “live.ipa”); //live.ipa is a self-signed app.
final IOSDriver driver = new IOSDriver(new URL(“”),capabilities);

issue 2.
i temporarily work around above hang up issue, so i just open settings page instead, after it return the driver, call driver.installApp(“live.ipa”) and then install certificate. But iphone popup error, like picture error.png. How to fix it?
As says, Appium has a built-in HTTP server, but i do not find releated documentation explain it.

    capabilities.setCapability(MobileCapabilityType.APP, "settings");
    final IOSDriver driver = new IOSDriver(new URL(""),capabilities);
    Map<String, Object> args = new HashMap<>();
    byte[] byteContent = Files.readAllBytes(new File("~/Certificates.pem").toPath());
    IOSDriver wd = (IOSDriver) getWebDriver().getDriver();
    args.put("content", Base64.getEncoder().encodeToString(byteContent));
    wd.executeScript("mobile: installCertificate", args);

@lzus have you fixed this issue, can you help me with this how to fix.

May be fixed but i am not sure because i left the firm and did not trace this issue later.
That time i got an idea: workaround it by kill the hangup process and reopen it again, but not try much.
i remember later i added one Capability but not remember if it valid:
capabilities.setCapability(“useNewWDA”, “true”);

so were you able to ever access and install that certificate using executeScript, even if you weren’t able to trust that root CA