HomePod detection located in High Sierra…

Ok. This is news to me. So the “AudioAccessory” and “HomePod” are not the same things? That is. Not for IMFoundation.framework:

#define NSNotFound    NSIntegerMax

void * +[IMDeviceSupport marketingNameForModel:](void * self, void * _cmd, void * arg2) {
    r15 = arg2;
    if ([r15 rangeOfString:@"iPod"] == NSNotFound) {
            rbx = @"iPad";
            if ([r15 rangeOfString:rbx] == NSNotFound) {
                    rbx = @"iPhone";
                    if ([r15 rangeOfString:rbx] == NSNotFound) {
                            rbx = @"Mac";
                            if ([r15 rangeOfString:rbx] == NSNotFound) {
                                    if ([r15 rangeOfString:@"AppleTV"] == NSNotFound) {
                                            if ([r15 rangeOfString:@"Watch"] == NSNotFound) {
                                                    rbx = @"HomePod";
                                                    if ([r15 rangeOfString:@"AudioAccessory"] == NSNotFound) {
                                                            rbx = @"Mac";
                                            else {
                                                    rbx = @"Apple Watch";
                                    else {
                                            rbx = @"Apple TV";
    else {
            rbx = @"iPod touch";
    rax = rbx;
    return rax;

So basically what happens here is that if it finds an “AudioAccessory” (as product/model identifier) then it returns “HomePod”. So that we, the users, know what it is. Fine. Not a big deal.

The string “HomePod” can also be found in Sharing.framework

Time to get some food. I’m hungry…

Edit: Right. Someone spotted an error – see comments. Fixed. Thank you. Back to my food now.

Cool. I also found some interesting strings. I think that this is for a (future) HomePod setup app on Mac’s.

	<string>My Home</string>

	<string>Default Room</string>
	<string>Dining Room</string>
	<string>Living Room</string>
	<string>Master Bedroom</string>

I can’t remember it, but haven’t we seen this before? For the AppleTV maybe?


5 thoughts on “HomePod detection located in High Sierra…

  1. I’m not sure if I’m reading this wrong, but it looks to me like it returns “Mac” only when “AudioAccessory” is NSNotFound?
    This seems to be about mapping internal product names to marketing names, so when it matches “AudioAccessory” it’ll return “HomePod” – kind of like how it returns “iPod touch” when it finds ‘iPod”, or “Apple TV” instead of “AppleTV”

  2. Hi Pike, how are you?
    It’s still a obj-c code (in swift 4.0 era) … Anyway this piece of code looks hilarious to me.
    This is what the above statement should be inside their implementation:

    if ([arg2 rangeOfString:@”AudioAccessory”] == NSNotFound) { // last resort
    // OMG, I’ll return “Mac” because maybe this is not made by Apple!! cry cry
    return @”Mac”;

    So if made by Samsung or Sony you still continue to see an Apple stuff lol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s