X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/3215be951cbc1e5e8bad14701507b68ebf380ab5..0768987a841ee4bc1839b2e6843e1a87c98054ad:/ITCategory-NSBundle.m diff --git a/ITCategory-NSBundle.m b/ITCategory-NSBundle.m index c7acbcc..fdc2151 100644 --- a/ITCategory-NSBundle.m +++ b/ITCategory-NSBundle.m @@ -1,6 +1,6 @@ #import "ITCategory-NSBundle.h" -@implementation NSBundle (ITCategory) +@implementation NSBundle (ITFoundationCategory) + (NSBundle *)bundleForFrameworkWithIdentifier:(NSString *)frameworkIdentifier { NSMutableArray *frameworksPaths = [NSMutableArray array]; @@ -11,7 +11,7 @@ [frameworksPaths addObject:[[self mainBundle] privateFrameworksPath]]; [frameworksPaths addObject:[[self mainBundle] sharedFrameworksPath]]; - while (libraryPath = [libraryEnumerator nextObject]) { + while ((libraryPath = [libraryEnumerator nextObject])) { [frameworksPaths addObject:[libraryPath stringByAppendingPathComponent:@"Frameworks"]]; [frameworksPaths addObject:[libraryPath stringByAppendingPathComponent:@"PrivateFrameworks"]]; } @@ -19,12 +19,12 @@ NSEnumerator *frameworksEnumerator = [frameworksPaths objectEnumerator]; NSString *frameworksPath; - while (frameworksPath = [frameworksEnumerator nextObject]) { + while ((frameworksPath = [frameworksEnumerator nextObject])) { NSArray *frameworkPaths = [NSBundle pathsForResourcesOfType:@"framework" inDirectory:frameworksPath]; NSEnumerator *frameworkEnumerator = [frameworkPaths objectEnumerator]; NSString *frameworkPath; - while (frameworkPath = [frameworkEnumerator nextObject]) { + while ((frameworkPath = [frameworkEnumerator nextObject])) { NSBundle *frameworkBundle = [NSBundle bundleWithPath:frameworkPath]; if (frameworkBundle && [[frameworkBundle bundleIdentifier] isEqualToString:frameworkIdentifier]) { return frameworkBundle; @@ -35,4 +35,4 @@ return nil; } -@end +@end \ No newline at end of file