ITMS-90046: the associated domains wildcard
2 min read
This one cost us a good chunk of a day, so hopefully it saves you that.
You upload a build and it bounces with ITMS-90046: Invalid Code Signing Entitlements. The message points at the value * for the key com.apple.developer.associated-domains.
And you're thinking... I never wrote * anywhere. Where did that come from?
Where the * comes from
Your provisioning profile.
When the Associated Domains capability is turned on for an App ID, the profile Apple gives you lists it as *. That's on purpose. The profile is saying "this app is allowed to have associated domains." It's not saying which ones. The real domains are supposed to live in your app's own entitlements file.
The App Store won't accept a binary signed with *. It wants the actual domains, like applinks:example.com.
So if your signing step pulls the entitlements straight out of the profile and signs with them, the wildcard goes right into the binary. Boom 💥, ITMS-90046.
That's exactly what our signing lane was doing. It read the entitlements from the profile because that felt like the safe choice. The profile is what Apple signed off on, right? Turns out that's the one place you don't want them from.
Watch for ITMS-90174 too
This part made it extra annoying. Sometimes the same problem doesn't come back as 90046. We've seen it surface as ITMS-90174 instead, which reads like a missing provisioning profile problem.
So if you get 90174 and your profile looks totally fine, check your associated domains before you go regenerate everything. Ask me how I know.
The fix
Build the entitlements you sign with on purpose. Don't copy them from the profile.
- Start from the profile's entitlements so you keep the identity ones Apple set, like
application-identifierand the team ID. - If the app uses associated domains, replace the
*with the app's real list, likeapplinks:example.com. - If the app doesn't use associated domains, remove the key completely.
- Never sign with
*.
You can check what a built app is actually signed with:
codesign -d --entitlements - MyApp.app
If you see * under com.apple.developer.associated-domains, that's your problem.
Same idea, other capabilities
Associated domains isn't the only capability where the profile allows more than you should sign with. Sign in with Apple can show up as * in a profile too, and the app should be signed with Default. The rule of thumb is the same: the profile says what's allowed, your app says what it uses. Sign with what it uses.
Why this matters at scale
For one app you fix it once and move on. For a white-label business every app has its own domains, so you can't hardcode them in one entitlements file either. They have to be built per app, every build.
That's what Bunddling does now. Each app's entitlements get built from that app's settings and checked against its profile before anything gets signed. The wildcard never makes it into a binary.
If you're signing a lot of apps and you're tired of chasing ITMS errors, let's talk for 20 minutes.