Need a Partial XPath using name

I saw some topics in the chat but none seem to work for me. I have a guid-IsPending. It is also the Accessibility Id but again I need just the IsPending to show as displayed so I elected to use XPath but I am open to suggestions I use C# to write the code so some of the Java examples of how to do this with code will not work for me. This is my assertion: FindElementByXPath("//XCUIElementTypeImage[contains[@name, ‘IsPending’)]");
Assert.AreEqual(true, IsPending.Displayed);
The XPath is //XCUIElementTypeImage[@name=“guid-IsPending”] using the above XPath in Appium Inspector the element can be found just not when running tests.

xPath id dead slow for iOS. use better something like:

driver.findElement(AppiumBy.iOSNsPredicateString("type == 'XCUIElementTypeImage' AND name CONTAINS[cd] 'IsPending'"));

also note that this search happens fast by default until you set implicitlyWait ->

// If this command is never sent, the driver should default to an implicit wait of 0ms

I am not familiar with AppiumBy. Appium Driver does not contain a definition for

from Appium 2.0, Previously it was MobileBy:


I am using Appium 2.0 but AppiumBy is not recognized and neither is MobileBy when it comes to IosNSPredicate does not exist in the current context. Not sure if its a C# limitation or not.