I have 2 targets - Dev & Prod config with different capabilities (Apple Pay disabled for Prod)
I already have separated Info.plist files with needed target But I couldn't do same for Proj.entitlements files - Target Membership section in Utilities menu disabled
I set corresponding "Code Signing Entitlements" in Build Settings of each target, but still receiving "Provision Profile 'X' doesn't support 'X' capability" in General tab
Is there any way in Xcode to specify the correct .entitlements file?
Select iOS > Resource > Property List. Name the new file " foo. entitlements " (typically, " foo " is the target name) Click the (+) next to "Entitlements File" to add a top-level item (the property list editor will use the correct schema due to the file extension)
The entitlements file defines certain capabilities of your app. Usually, the file is automatically generated by Xcode when you enable a capability for your app. You only need the file if you enable certain capabilities, e.g. Healthkit integration. If you'd like to use these features, you have to add it.
get-task-allow, when signed into an application, allows other processes (like the debugger) to attach to your app. Distribution profiles require that this value be turned off, while development profiles require this value to be turned on (otherwise Xcode would never be able to launch and attach to your app).
I also tried to set separate entitlement files for my targets to activate push notifications only for some of my targets. Every time I changed the capabilities of one of my targets the changes were also applied to the other targets because Xcode only edited the same entitlements file all the time although I set a different file path for each target in:
Build Settings > Code Signing Entitlements
For me the problem was that the entitlement files all had the same name. When I gave every target entitlement file a unique name Xcode changed the correct files for the respective target.
Go to Project > Target > Build Settings > Signing.
In CODE_SIGN_ENTITLEMENTS
, put your path:
$(SRCROOT)/ProjectName/PathToFolder/YourProject.entitlements
Here in Debug and Release you can choose different path.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With