Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entitlements file was modified during the build, which is not supported

Tags:

xcode

ios

I'm getting following error during release build:

error: Entitlements file "projectname.entitlements" was modified during the build, which is not supported. You can disable this error by setting 'CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION' to 'YES', however this may cause the built product's code signature or provisioning profile to contain incorrect entitlements.

I can't find CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION on Google or Apple documentation, any ideas where should I use it?

like image 523
Dima Portenko Avatar asked Apr 01 '19 13:04

Dima Portenko


People also ask

Was modified during the build which is not supported?

entitlements" was modified during the build, which is not supported. You can disable this error by setting 'CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION' to 'YES', however this may cause the built product's code signature or provisioning profile to contain incorrect entitlements.

What is entitlement file in Xcode?

An app stores its entitlements as key-value pairs embedded in the code signature of its binary executable. You configure entitlements for your app by declaring capabilities for a target in Xcode. Xcode records capabilities that you add in a property list file with the . entitlements extension.

How do I create an 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)

What is entitlement file in iOS?

Entitlements are special app capabilities and security permissions granted to applications that are correctly configured to use them. In iOS, apps run in a sandbox, which provides a set of rules that limit access between the application and certain system resources or user data.


2 Answers

I fixed this with Product > Clean Build Folder.

like image 124
jameshfisher Avatar answered Sep 19 '22 14:09

jameshfisher


Ran into the same issue. You can set CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION as a User-Defined setting in Build Setting.

  • In Xcode click on your project target and click Build Settings.
  • Click the "+" underneath Build Settings and then "Add User-Defined Setting"
  • Set CODE_SIGN_ALLOW_ENTITLEMENTS_MODIFICATION to YES for debug and release (or whatever schemes you like)

Screenshot of where to go in Xcode

like image 24
jemise111 Avatar answered Sep 17 '22 14:09

jemise111