NSBundle/其他Bundle的获取

#define D_SharkItOffViewControllerBundleName @"SharkItOffViewController.bundle"     //套装名称

//其他nsbundle都是在[[NSBundle mainBundle] resourcePath]目录下
        NSString *path = [[NSBundle mainBundle] resourcePath];
        NSString *path2 = [NSString stringWithFormat:@"%@/%@",path, D_SharkItOffViewControllerBundleName];
        NSBundle *bundle = [NSBundle bundleWithPath:path2];
        NSString *str = [bundle pathForResource:@"dance.mp3" ofType:nil];
        self.musicData = [NSData dataWithContentsOfFile:str];
原文地址:https://www.cnblogs.com/apem/p/4656363.html