Cannot convert from 'OpenQA.Selenium.Remote.DesiredCapabilities' to 'OpenQA.Selenium.DriverOptions

The code below creates the issue.
DesiredCapabilities cap = new DesiredCapabilities();
cap.SetCapability(“platformName”, “iOS”);
cap.SetCapability(“platformVersion”, “14.7”);
cap.SetCapability(“username”, “username”);
cap.SetCapability(“accessKey”, “key”);
cap.SetCapability(“app”, “storage:filename=app.iOS.ipa”);

        _IOSdriver = new IOSDriver<IOSElement>(new Uri("https://username:[email protected]:443/wd/hub"), cap);

I get this issue under the new Uri and cap is also not liked with the same argument from the title. I have tried also tried the below approach but still get errors

    Uri url = new Uri("http://127.0.0.1:4723/wd/hub");

    driver = new IOSDriver<IOSElement>(url, options);