ios资源文件加密保护

字数 43阅读 143
  • (NSSet *)certificatesInBundle:(NSBundle *)bundle {
    NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."];

    NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]];
    for (NSString *path in paths) {
    NSData *certificateData = [NSData dataWithContentsOfFile:path];
    [certificates addObject:certificateData];
    }

    return [NSSet setWithSet:certificates];
    }

推荐阅读更多精彩内容