I've never had anything but trouble with xcappdata, but I got what I wanted working in the previous xcode version, I could specify the xcappdata in my testplan and it would work on the simulators.
Now, on XCode 27, the xcappdata doesn't load.
I look in the xcode 27 release notes and see there is indeed an issue with xcappdata, and a workaround.
Workaround: To make a .xcappdata bundle for use in Xcode’s Run scheme action do the following. Add .xcappdata to the folder created by Device Hub when downloading app data containers. Inside that folder make a new folder named AppData. Move the other content in that folder into AppData. For example,
com.example.MyApp/{Documents,Library,tmp}
becomes:
com.example.MyApp.xcappdata/AppData/{Documents,Library,tmp}
<endquote>
This is completely unhelpful.
When am I downloading app data containers? What folder is created by Device Hub? Where is it? How does this apply to my testplan? What if I have multiple xcappdata bundles for different test plans?
It looks to me like this workaround would be part of a script where at some magic moment I inject my app data into a simulator. Which might not be too bad
So if I wanted to build this script it I imagine it looks like
create a simulator install the app on the simulator find the folder related to the simulator copy in my xcappdata? Then I can run my tests?