Unable to locate certain xcuitest elements when using simulator build

I have built an .app for use on iOS simulator on appium. My tests fail because they are unable to locate specific xcuitest elements which are missing from a collection view. If i build an .ipa for real device, then the collection view loads these xcuitest elements


I have logged this with the Appium project but they tell me its a third party issue


I have done a comparison of the app source code on the simulator app vs the .ipa real device app and found that there are collection views missing see https://www.diffchecker.com/PF4y3OhU
I have built the simulator app via the following command: e.g.

xcodebuild -workspace '/Users/.../apps_ios/<app>.xcworkspace' -scheme 'dev' -arch x86_64 -sdk iphonesimulator10.3

I am trying to locate the ‘Sort’ and ‘Filter’ buttons as per screenshots attached


Simulator build:

https://user-images.githubusercontent.com/1721580/27862852-a6dce43e-6187-11e7-8874-b36d00152b9b.png


Real device build:

Here I am able to inspect the sort button

https://user-images.githubusercontent.com/1721580/27862851-a6cc342c-6187-11e7-8a54-55473b45452c.png

Unable to locate certain xcuitest elements when using simulator build
 
 
Q