ios - What is interpretation for bundleForClass returns nil and how that can be corrected? -
i preparing xctest , perform test need load resource test bundle. therefore use:
nsbundle *bundle = [nsbundle bundleforclass:[self class]]; nsstring *path = [bundle pathforresource:@"item" oftype:@"plist"];
the problem bundleforclass
returns nil
. how can happening, every class tied bundle loaded from? there setting corrected make working?
you can like,
nsstring *path = [[nsbundle mainbundle] pathforresource:@"item" oftype:@"plist"];
Comments
Post a Comment