Here’s a very simple app that won’t run on 10.10 when built with the 10.15 SDK:
main.m
#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>
int main(int argc, const char * argv[]) {
AudioComponent comp = NULL;
for (;;) {
AudioComponentDescription desc;
memset((void*)&desc, 0, sizeof(desc));
comp = AudioComponentFindNext(comp, &desc);
if (comp == NULL)
break;
if (AudioComponentGetDescription(comp, &desc) != noErr)
continue;
CFStringRef cfName;
if (AudioComponentCopyName(comp, &cfName) == noErr) {
NSLog(@"%@", (__bridge NSString*)cfName);
CFRelease(cfName);
}
}
return 0;
}
The runtime error message is:
dyld: lazy symbol binding failed: Symbol not found: _AudioComponentFindNext
Referenced from: /Users/tom/workspace/./AUScan
Expected in: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
dyld: Symbol not found: _AudioComponentFindNext
Referenced from: /Users/tom/workspace/./AUScan
Expected in: /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
Trace/BPT trap: 5
So it looks like there’s a mismatch between what’s present on 10.10 and what the 10.15 SDK is expecting. Running nm on /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox on the 10.10 machine gives us
000000000000e89e T __AT_AudioComponentFindNext
If we look at the contents of MacOSX10.14.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox.tbd then we will find an entry for _AudioComponentFindNext in the list of symbols for /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox.
However, if we look at what’s inside MacOSX10.15.sdk/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox.tbd then the only _AudioComponentFindNext entry is in the listings for /System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore.
I’ve not quite got the full picture, but it suggests that the location of the symbol has changed in the latest SDK and it’s broken backwards compatibility.
