https://lapcatsoftware.com/articles/2025/2/5.html?__readwiseLocation=
Previous: Inaccessible .bnnsir files on macOS Sequoia
Articles index Jeff Johnson (My apps, PayPal.Me, Mastodon)
Xcode constantly phones home
February 24 2025
Building StopTheMadness Pro in Xcode is usually very fast, because my
project doesn't use any Swift. It's a combination of Objective-C,
which compiles much more quickly than Swift, and JavaScript, which
doesn't need to be compiled. However, sometimes the builds were very
slow for some strange reason. Checking the Xcode build transcripts, I
found that the delay was in the "Gather provisioning inputs" build
phase.
Xcode build messages
This one phase took 50.6 seconds when the entire build was 56.8
seconds!
I tested with my internet disabled, and the slow builds did not
occur. Obviously, though, it's impractical to disable my internet
every time I want to build and run. After all, my project is a Safari
extension! I do use Little Snitch, but I had previously allowed all
connections from Xcode to apple.com, because that's required to
upload builds to App Store Connect. When I scrutinized the individual
Xcode connections with Little Snitch, I saw that
developerservices2.apple.com was responsible for the slow "Gathering
provisioning inputs" build phase. When I denied those connections
with Little Snitch, my builds were always fast. And successful. The
build phase is mostly unnecessary.
I found a thread in the Apple Developer Forums that discusses the
problem, mentioning the -allowProvisioningUpdates option of the
command-line xcodebuild tool. From the man page:
Allow xcodebuild to communicate with the Apple Developer website.
For automatically signed targets, xcodebuild will create and
update profiles, app IDs, and certificates. For manually signed
targets, xcodebuild will download missing or updated provisioning
profiles. Requires a developer account to have been added in
Xcode's Accounts preference pane.
Connecting to developerservices2.apple.com, and to some other
domains, is required in order to upload a build to App Store Connect.
For most local builds, on the other hand, the "Gathering provisioning
inputs" build phase is unnecessary and can slow down the build
considerably. Thus, I've now denied Xcode connections to
developerservices2.apple.com by default in Little Snitch and disable
the rule only when uploading to App Store Connect.
During my investigation of slow builds, I noticed some other frequent
Xcode connections. For example, Xcode connects to
devimages-cdn.apple.com every time it launches. According to Apple's
support document Use Apple products on enterprise networks, that
domain is used for "Xcode downloadable components". I assume this
refers to platform support in the Components pane of Xcode Settings.
(Note that the document doesn't mention
developerservices2.apple.com.) Again, though, it's unnecessary to
check for updates on every launch. I'd rather not tell Apple whenever
I launch Xcode, or whenever I make a local build of my app. It
certainly doesn't align with Apple's claim that they believe privacy
is a fundamental human right. Or perhaps Apple believes that
developers are subhuman...
I've saved the worst for last. For some reason, Xcode phones home to
appstoreconnect.apple.com every time I open an Xcode project. This
also appears to be unnecessary, and I experience no problems after
denying the connections in Little Snitch, so I do! I assume that the
connections send identifying information about the Xcode project to
Apple, otherwise why even make the connections when opening a
project? And all of these connections from Xcode, to every domain,
require login to your Apple Developer account, so Apple is definitely
receiving identifying information about you in any case.
In effect, Xcode is a developer analytics collection mechanism,
whether you like it or not, which I don't.
Jeff Johnson (My apps, PayPal.Me, Mastodon) Articles index
Previous: Inaccessible .bnnsir files on macOS Sequoia