Mac OS X version statistics through CFNetwork analysis

Recently I needed to gather some statistics about the distribution of the different Mac OS X versions installed by users of a certain application.

Since the application has an update-check feature, I thought I’d use the web server logs to infer the data I was interested in. The only thing I could use was the User-Agent string sent by the application when requesting the file containing the update information.

After some digging in Darwin’s build plists and a bit of googling, I came up with this list of patterns:

            OS            |                user agent pattern
 Mac OS X 10.2            | ^CFNetwork/1.1$
 Mac OS X 10.3.2-10.3.8   | ^CFNetwork/1.2.1$
 Mac OS X 10.3.9          | ^CFNetwork/1.2.[2-6]$
 Mac OS X 10.4            | ^CFNetwork/128$
 Mac OS X 10.4.10         | ^CFNetwork/129.21$
 Mac OS X 10.4.11         | ^CFNetwork/129.22$
 Mac OS X 10.4.2          | ^CFNetwork/128.2$
 Mac OS X 10.4.3          | ^CFNetwork/(129.5|10.4.3)$
 Mac OS X 10.4.4          | ^CFNetwork/(129.(9|10)|10.4.4)$
 Mac OS X 10.4.5          | ^CFNetwork/129.11$
 Mac OS X 10.4.6          | ^CFNetwork/129.13$
 Mac OS X 10.4.7          | ^CFNetwork/(129.16|4.0)$
 Mac OS X 10.4.8          | ^CFNetwork/129.1(8|9)$
 Mac OS X 10.4.9          | ^CFNetwork/129.20$
 Mac OS X 10.5            | ^CFNetwork/21[7-9]$
 Mac OS X 10.5.1          | ^CFNetwork/220$
 Mac OS X 10.5-prerelease | ^CFNetwork/1[4-9][0-9](.[0-9])?|20[0-9]|21[0-9]$

They might not be 100%25 correct, but they’re good enough.


  1. Mark McElhinney says:

    Would you mind posting some of your statistical results that you came up with? Such as what percentage of users were on which OS?


  2. Simone says:

    these are the hit counts since January, 1st 2007:

    Mac OS X 10.4 -> 246398
    Mac OS X 10.5 -> 35059
    Mac OS X 10.2 -> 2091
    Mac OS X 10.3 -> 13

    Limiting the query to this year, you can see that Leopard has surpassed Tiger:

    Mac OS X 10.5 -> 121991
    Mac OS X 10.4 -> 92924
    Mac OS X 10.2 -> 531
    Mac OS X 10.3 -> 3

    Disclaimer: these values might not be very accurate. They reflect only the update checks coming from my applications (which hit the server at most once every 3 days per user).

  3. Mark McElhinney says:

    perfect. Thanks. Do your applications by chance not support 10.3? It seems strange that there would be so many more 10.2 users than 10.3.

    However, if these data points are coming in from every computer with your software, in a year it would only take 5 people running on 10.2 to give these numbers.

    Anyways, the general heuristic is good, and I appreciate the help.

  4. Simone says:

    yes, they do support 10.3.9, while support for 10.2 has been dropped a long ago.

    I’m not sure I got every possible 10.3 pattern though, so that might explain the strange figures.

Leave a Reply

Your email address will not be published. Required fields are marked *