Skip to content

Commit

Permalink
Tuning bundle scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
drekka committed Dec 3, 2016
1 parent 0fc8297 commit c1f9dfd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Alchemic.xcodeproj/project.pbxproj
Expand Up @@ -1855,7 +1855,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = "";
DYLIB_CURRENT_VERSION = 2.2.10;
DYLIB_CURRENT_VERSION = 2.2.11;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = "compiler-default";
Expand Down Expand Up @@ -1927,7 +1927,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = "";
DYLIB_CURRENT_VERSION = 2.2.10;
DYLIB_CURRENT_VERSION = 2.2.11;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = "compiler-default";
Expand Down Expand Up @@ -2108,6 +2108,7 @@
6C0432D91DF2F484008C548C /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6C24CCF81CA42BA80026D18C /* Build configuration list for PBXNativeTarget "Integration tests" */ = {
isa = XCConfigurationList;
Expand Down
9 changes: 4 additions & 5 deletions alchemic/NSBundle+Alchemic.m
Expand Up @@ -22,12 +22,11 @@ +(void) scanApplicationWithProcessors:(NSArray<id<ALCClassProcessor>> *) process

CFBundleRef bundle = (CFBundleRef) CFArrayGetValueAtIndex(allBundles, i);

// Commenting out as some bundles don't have an id when testing.
// Ignore all Apple bundles as we know they won't have Alchemic registration code in them.
// NSString *bundleId = (NSString *) CFBundleGetIdentifier(bundle);
// if (!bundleId || [bundleId hasPrefix:@"com.apple"]) {
// continue;
// }
NSString *bundleId = (NSString *) CFBundleGetIdentifier(bundle);
if ([bundleId hasPrefix:@"com.apple"]) {
continue;
}

// Now get the executable from the bundle so we can scan it for classes.
NSURL *executableURL = (NSURL *) CFBridgingRelease(CFBundleCopyExecutableURL(bundle));
Expand Down

0 comments on commit c1f9dfd

Please sign in to comment.