Although there is a Contents.json file (see below) associated with each item in xcassets that contains the filenames of that item's images, it does not appear to be accessible at the filesystem level. All images are placed in a single filesystem folder upon compilation. The json file is auto-generated and should not be edited, but it does provide a template for a workaround.
Name each file with a consistent suffix to match the corresponding idiom, scale and subtype appearing in the json file. This requires manual work by selecting the 'Show in Finder' option for each asset and renaming each file, but once completed, you can then use pathForResource in combination with a function to add the appropriate suffix to the base asset name to retrieve the appropriately-sized image.
Sample code to retrieve path:
NSString *imageName = @"Add to Cart";
NSString *imageSuffix = [self someMethodThatDeterminesSuffix]; // Example: "-iphone-2x-retina4"
NSString *imagePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@%@", imageName, imageSuffix] ofType:@"png"];
Example Contents.json file for the "Add to Cart" image asset:
{
"images" : [
{
"idiom" : "iphone",
"scale" : "1x",
"filename" : "Add to Cart-iphone-1x.png"
},
{
"idiom" : "iphone",
"scale" : "2x",
"filename" : "Add to Cart-iphone-2x.png"
},
{
"idiom" : "iphone",
"filename" : "Add to Cart-iphone-2x-retina4.png",
"subtype" : "retina4",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}