There are "more than ten" bug reports about this on the Apple Bug Reporter site. I tried to ask for code-level assistance but when you do this Apple won't accept your request for assistance - it just disappears. If you search for posts about this you will get pages and pages of threads like this one. This has been a problem on and off for years. There's no way for us to know if this is a bug in XCode, macOS, the App Store or iTunes. I would bet on iTunes because it seems like it happens on different versions of macOS and XCode. Whatever the problem, Apple is in no hurry to fix it.
Topic:
App & System Services
SubTopic:
Core OS
Tags: