accessing a file using [NSBundle mainBundle] pathForResource: ofType:inDirectory:

前端 未结 10 1398
清酒与你
清酒与你 2020-12-02 07:56

I have a file paylines.txt added inside the folder named TextFiles which resides inside the Resources folder of my iOS project in Xcod

10条回答
  •  粉色の甜心
    2020-12-02 08:34

    Are you attempting to do this inside of an XCTest and on the verge of smashing your laptop? This is the thread for you: Why can't code inside unit tests find bundle resources?

提交回复
热议问题