App data file not being read in TestFlight

An app I'm developing uses a text data file to access some words. The app runs fine in all simulators and when directly hard-wired from my Mac to my iPhone. When I download it to App Store Connect and run the app in TestFlight the app runs fine except when it tries to access the data file. The error it gives me is that it can't access the same data that I access when running the app in the simulators.

Found the solution. My data file is located in the Preview Content folder in my project. For some reason this is OK when running the app in any simulator, however when running in TestFlight the data file must be in the man app folder. Once I moved it there the problem was solved.

App data file not being read in TestFlight
 
 
Q