Load files in xcode unit tests

前端 未结 7 1901
失恋的感觉
失恋的感觉 2021-02-02 05:17

I have an Xcode 5 unit test project and some test xml files related to it. I\'ve tried a bunch of approaches but I can\'t seem to load the xml files.

I\'ve tried the fol

7条回答
  •  不知归路
    2021-02-02 05:58

    One thing to note is(It waste me serval minutes to figure it out):

    Don't forget to add the test file to "Copy Bundle Resources" section of Build Phases

    Without it, you couldn't load the file successfully.

提交回复
热议问题