I have a test app (which does nothing because I'm using it to test a bug) that includes 3 frameworks I've built. The frameworks are copied using a copy files phase into the Frameworks directory of the app. I have the following app delegate code:

```
#import "AppDelegate.h"
@import ObjectiveC;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[NSBundle allFrameworks] enumerateObjectsUsingBlock:^(NSBundle *framework, NSUInteger idx, BOOL *stop) {
        unsigned int count = 0;
        __unused const char** classes = objc_copyClassNamesForImage([[framework executablePath] UTF8String], &count);
        NSRange inFramework = [framework.executablePath rangeOfString:@".app/Frameworks"];
        if (inFramework.length > 0) {
            NSLog(@"Framework %@, classes: %i", framework.executablePath.lastPathComponent, count);
        }
    }];
    return YES;
}

```

@end

Which prints out the frameworks from the Frameworks directory and the number of classes contained in each. 

When I run this code in the simulator I get the following results:

```
2016-11-04 12:02:17.682 RuntimeTest[54326:623229] Framework PEGKit, classes: 24
2016-11-04 12:02:17.705 RuntimeTest[54326:623229] Framework Alchemic, classes: 57
2016-11-04 12:02:17.707 RuntimeTest[54326:623229] Framework StoryTeller, classes: 10

```

However when I run it on a device I get:

```
2016-11-04 12:07:04.215417 RuntimeTest[1035:365233] Framework PEGKit, classes: 0
2016-11-04 12:07:04.224495 RuntimeTest[1035:365233] Framework Alchemic, classes: 0
2016-11-04 12:07:04.254946 RuntimeTest[1035:365233] Framework StoryTeller, classes: 0

```

The device is an iPhone 7 with iOS 10.1. I'm pretty sure that this code has worked in the past and it appears that `objc_copyClassNamesForImage` is somehow broken.

My working theory is that this could be some 10.1 bug. Or perhaps something that is set/not set in the build properties. 

In anyone able to confirm this? or have any idea what might be wrong?