Frameworkないでリソースを参照剃る場合 "NSBundle *bundle = [NSBundle bundleForClass:[self class]];" を使う

t_furut_furu のブックマーク 2015/08/25 14:51

その他

このブックマークにはスターがありません。
最初のスターをつけてみよう!

Why can't code inside unit tests find bundle resources?

    Some code I am unit testing needs to load a resource file. It contains the following line: NSString *path = [[NSBundle mainBundle] pathForResource:@"foo" ofType:@"txt"]; In the app it runs just fin...

    \ コメントが サクサク読める アプリです /

    • App Storeからダウンロード
    • Google Playで手に入れよう