I am trying to get the path of an image while UITesting. I've tried multiple ways as shown under here, but none are working?
Name of image file is: TestImage.fff
NSBundle* testBundle = [NSBundle bundleForClass: [self class]];
NSString* testImage = [testBundle pathForResource:@"TestImage.fff" ofType:@"fff"];
NSString* testImage2 = [testBundle pathForImageResource:@"TestImage"];
NSURL* testImage3 = [testBundle URLForResource:@"TestImage" withExtension:@"fff"];
Can someone tell me where I am going wrong?
Inside XCode, select your test target inside the target list. Then select the Build Phases
tab and inside the Copy Bundle Resources
phase, add the required resources.