Multicast Networking not working from App Store - but from debugging

A few days ago we requested the Multicast Networking Entitlement for our App and we got the permission to use it.

We enabled it in our developer account and everything seems to work.
We also added "com.apple.developer.networking.multicast" to the .entitlement file and set the Value to 1 (true).

After we debugged our app on Xcode, our app was finally working with UDP.

Unfortunately after uploading it to the App Store, we found out that the App is not working from App Store or TestFlight.

Is there anything we forgot to do or did something wrong?

Additional note that might help:
For provisioning profile we selected the Development Profile and for App Store the App Store Profile. When I click on the info button next to it, it says it is including "com.apple.developer.networking.multicast" for both profiles.

I also created a new Development and App Store provisioning profile but still not working.

Any help is appreciated... thank you!
Answered by MxrkusCar in 675743022
I think I found out the issue, but I'm not sure yet. I just realized there is another .entitlements file for Release (shows up in Finder). I didn't know that because it doesn't show up in my Xcode project navigator. So there are 2 .entitlements file. And in the Release.entitlements file there is no "com.apple.developer.networking.multicast" inside it.

I'm uploading my app to TestFlight at the moment and I will give feedback when I tested the new version.

UPDATE
The app finally works. So at the end I just had to add "com.apple.developer.networking.multicast" to the Release.entitlements file and set Value true.
Do this:
  1. In the Organizer, find the archive you used to upload to the App Store.

  2. Click Distribute App.

  3. Select App Store Connect and click Next.

  4. Select Export and click Next.

  5. Go through the workflow as you did when you uploaded the app. This will result in a folder containing a .ipa.

  6. Change its extension to .zip and unpack it.

  7. Dump the app’s code signature and provisioning profile using the commands below.

Code Block
% codesign -d --entitlements :- Payload/YourApp.app
<dict>
… your app's entitlements …
</dict>
</plist>
% security cms -D -i Payload/Test747881523.app/embedded.mobileprovision
<dict>
<key>Entitlements</key>
<dict>
… your app's capabilities …
</dict>
</dict>
</plist>


Make sure that the multicast entitlement appears in both.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Thank you for your response.

I followed your steps until step 7.

After the first command (I think it shows the entitlements file?) I can't see any multicast entitlement... only some identifier and other stuff.

The second command unfortunately doesn't work, it says directory not found. In Payload I only see my apps name.
I success go to step 7
when I pack the files back to zip then to ipa
I upload the ipa, but it shows error:
ERROR ITMS-90072: "The IPA is invalid. It does not include a Payload directory."

how to solve this? thank you!
I also read this you wrote
https://developer.apple.com/forums/thread/663271

Do you want us to follow the instructions in this article, or what you mentioned above?
(codesign -d --entitlements :- Payload/YourApp.app
security cms -D -i Payload/Test747881523.app/embedded.mobileprovision )

At the same time, I followed the instructions in your article above and uploaded the ipa.

ERROR ITMS-90072: "The IPA is invalid. It does not include a Payload directory."
This error occurred. How can I solve it?


I think it shows the entitlements file?

No, it’s shows the entitlements baked into your code signature. This is different from the .entitlements file, in that the .entitlements file is just one input to the code signing process.

I can't see any multicast entitlement... only some identifier and
other stuff.

Can you post the actual results? I’m flying blind here!

Use the code block button (<>) to make your results easier to read. And if you have to redact the name of your app, do so consistently:
  • If you’re app’s bundle ID is com.mycompany.super-secret, change all instances of that com.example.not-so-secret.

  • If you’re apps’s name is SuperSecret, change all instances of that to NotSoSecret.

  • And so on.

Oh, and my previous post failed to do that properly, where the second command uses Test747881523.app rather than YourApp.app. Sorry about the confusion.

when I pack the files back to zip then to ipa

Don’t do that. I mean, you could, but why would you? The goal here should be to get Xcode to build the .ipa correctly in the first place. We’re only messing around with unpacking zip archives in order to find out what’s gone wrong so that we can track it back to the root cause of the problem and fix that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Can you post the actual results? I’m flying blind here!

Sure. It looks like this:

Code Block
<dict>
<key>application-identifier</key>
<string>MyTeamIdentifier.de.cartesy.CartesyLivestream</string>
<key>beta-reports-active</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>MyTeamIdentifier</string>
<key>get-task-allow</key>
<false/>
</dict>




> Oh, and my previous post failed to do that properly, where the second command uses Test747881523.app rather than YourApp.app. Sorry about the confusion.

I tried the command again and now it worked. Also I can see the multicast entitlement in there.

Code Block ....
<key>Entitlements</key>
<dict>
<key>beta-reports-active</key>
<true/>
<key>com.apple.developer.networking.multicast</key>
<true/>
..... others .....
</dict>
<key>ExpirationDate</key>





So you have enabled the multicast networking capability in your provisioning profile but you haven’t actually signed your app to claim that entitlement. To fix this, add com.apple.developer.networking.multicast to your .entitlements file (with a value of true).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
I already added com.apple.developer.networking.multicast in my .entitlements file.
It works when I start the app from Xcode.

That's why I'm confused that it's not working from App Store but from debugging.
Accepted Answer
I think I found out the issue, but I'm not sure yet. I just realized there is another .entitlements file for Release (shows up in Finder). I didn't know that because it doesn't show up in my Xcode project navigator. So there are 2 .entitlements file. And in the Release.entitlements file there is no "com.apple.developer.networking.multicast" inside it.

I'm uploading my app to TestFlight at the moment and I will give feedback when I tested the new version.

UPDATE
The app finally works. So at the end I just had to add "com.apple.developer.networking.multicast" to the Release.entitlements file and set Value true.
Multicast Networking not working from App Store - but from debugging
 
 
Q