• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: getting path for files in test bundle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting path for files in test bundle


  • Subject: Re: getting path for files in test bundle
  • From: Fritz Anderson <email@hidden>
  • Date: Thu, 14 Jul 2011 06:30:12 -0500

On 14 Jul 2011, at 2:11 AM, Wilker wrote:

> I'm trying to do some tests here, but in case my tests have some fixture
> files (video files), I added them to a group Fixtures on Test target, they
> are also already on Copy Resources Bundle phase, but I can't get the path
> for them... I'm trying with:
>
>      NSString *dexterPath = [[NSBundle mainBundle] pathForResource:
> @"dexter" ofType:@"mp4"];

[NSBundle bundleForClass: [self class]]. The test suite runs in the context of the application under test, and is not in the main bundle.

Also, the group in which a file appears in the Project navigator has no influence over its role in the product; that's a matter for the build phases.

	— F

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: getting path for files in test bundle
      • From: Wilker <email@hidden>
References: 
 >getting path for files in test bundle (From: Wilker <email@hidden>)

  • Prev by Date: Re: getting last accessed date
  • Next by Date: perform a NSFecthRequest on Self
  • Previous by thread: getting path for files in test bundle
  • Next by thread: Re: getting path for files in test bundle
  • Index(es):
    • Date
    • Thread