Not Finding the iOS element using xpath constructed runtime

if i store all elements into a List using findElementsbyClass it finds, but performance is low, code given below.

      String value = "Smith, John";
      List<MobileElement> elements = iDriver.findElementsByClassName("XCUIElementTypeStaticText");
       for(MobileElement element : elements)
      {
            if ((element.getAttribute("name").toString.equalsIgnoreCase(value)))
               {
                     element.click();
              }
      } 

But I am not a able to find the element using the below code…

                            String value = "Smith, John";
                            iDriver.findElement(By.xpath("//XCUIElementTypeStaticText[@name='"+value+"']")).click();

Tried —
with
iDriver.findElement(By.id(value)))
iDriver.findElement(MobileFindBy.accessibilityId)))
wait.until(ExpectedConditions.visibilityOf(element))

No Luck.

org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 5.23 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘dhcp-10-176-250-54.in.oracle.com’, ip: ‘2606:b400:c10:4168:dde8:4cce:ea13:2e62’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.12.6’, java.version: ‘1.8.0_131’
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities [{app=/Users/xstoreisc/Documents/workspace/iOS_Android_Automation_v1.3//app//app.ipa, networkConnectionEnabled=false, noReset=true, xcodeOrgId=VYAKS7W7VC, databaseEnabled=false, deviceName=ios Device, updatedWDABundleId=ios.appium.WebDriverAgentRunner101, xcodeSigningId=iPhone Developer, platform=MAC, showXcodeLog=true, platformVersion=10.3, webStorageEnabled=false, locationContextEnabled=false, automationName=XCUITest, browserName=, takesScreenshot=true, javascriptEnabled=true, platformName=iOS, udid=a83748dksdhjfdjc02937237823kdwewhjw1}]
Session ID: 4c4bc848-9342-4da7-9283-25105af925e8
*** Element info: {Using=xpath, value=//XCUIElementTypeStaticText[@name=“Smith, John”]}
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:272)
at io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.execute(IOSElement.java:1)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:175)
at io.appium.java_client.DefaultGenericMobileElement.findElement(DefaultGenericMobileElement.java:65)
at io.appium.java_client.MobileElement.findElement(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.findElement(IOSElement.java:1)
at org.openqa.selenium.remote.RemoteWebElement.findElementById(RemoteWebElement.java:208)
at io.appium.java_client.DefaultGenericMobileElement.findElementById(DefaultGenericMobileElement.java:73)
at io.appium.java_client.MobileElement.findElementById(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.findElementById(IOSElement.java:1)
at org.openqa.selenium.By$ById.findElement(By.java:218)
at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:171)
at io.appium.java_client.DefaultGenericMobileElement.findElement(DefaultGenericMobileElement.java:61)
at io.appium.java_client.MobileElement.findElement(MobileElement.java:1)
at io.appium.java_client.ios.IOSElement.findElement(IOSElement.java:1)
at io.appium.java_client.pagefactory.ElementInterceptor.getObject(ElementInterceptor.java:40)
at io.appium.java_client.pagefactory.interceptors.InterceptorOfASingleElement.intercept(InterceptorOfASingleElement.java:62)
at io.appium.java_client.ios.IOSElement$$EnhancerByCGLIB$$184e91dc.findElement()
at pageObjects.BasePage.selectListValueXpath(BasePage.java:745)
at pageObjects.LoginPage.selectAssociateFromList(LoginPage.java:557)
at testCases.AttachCustomerToTransaction.attachCustomerToTrans(AttachCustomerToTransaction.java:76)