Working with xcappdata files in unit tests

I created a unit test goal to test the transfer of existing application data to my new version of the application. To do this, I saved the package .xcappdatafrom a real device containing some typical real-world data, and now I want to configure my unit test for this data.

I added the file to Xcode (but not for any purpose) and changed the "application test data" for this unit test migration to point to this package.

However, when I run unit tests, I get the following error dialog:

Application data packet not copied to simulator

It seems you are launching "MyApp.app" on the iPhone 5s Simulator for the first time and therefore have not yet created a data folder. The application data package will be installed the next time your application is launched in the simulator.

(And the sandbox directory does not contain the contents of the .xcappdata package).

I just do not understand this error message or how to fix it. I do not want the application data to be in my main application (this is how I interpret the sentence in the error dialog), since the data is intended for only one unit test package. Looking at the "Edit Schema ..." dialog, I get the impression that I can use different data sets for each test goal, which I intend to do. Didn’t I understand how to do this?

+4
1

Xcode 5, - Xcode 6. , ?

0

All Articles