The executable gets signed with invalid entitlements in Xcode
Solution 1
I found out the problem. The app I created on developer.apple.com does not include inter-app-audio. The project entitlements plist file on Xcode has inter-app-audio set to YES (by default). Once I changed the setting on my app configuration on developer.apple.com to enable the inter-app-audio. Then my app runs on my devices. I guess that is apple's new rule to make your app settings consistent on both developer.apple.com and your xcode project setting.
Solution 2
I grappled with this issue for an hour, and finally found a fix. Turned out the Development Team was different in ProjectTarget and ProjectTests.
Solution 3
Restarting Xcode was what worked for me
Solution 4
I was able to fix this by toggling on/off "Game Center" entitlement in Xcode 5 :-)
Solution 5
No solution worked for me until I've checked and set app Tests target to same provisioning profile as main app. Or if you are using automatic singing make sure you have same team selected in Tests target.
Emmy
I am the founder and developer of AbiTalk. I started AbiTalk on 2011. I develop education apps for iOS and Andriod platform.
Updated on January 07, 2022Comments
-
Emmy over 2 years
I got this error with Xcode when I try to run the app on my device.
The executable was signed with invalid entitlement
It worked fine with old Xcode Anyone knows how to get rid of the error?
-
Emmy over 10 yearsThanks for your help. I found out the problem. The app I created on developer.apple.com does not include inter-app-audio. The project entitlements plist file on Xcode has inter-app-audio set to YES (by default). Once I changed the setting on my app configuration on developer.apple.com to enable the inter-app-audio. Then my app runs on my devices. I guess that is apple's new rule to make your app settings consistent on both developer.apple.com and your xcode project setting.
-
Gasper almost 10 yearsTHANK YOU! You have no idea how frustrated I was this whole morning until I stumbled on your answer. Definitely fixed it for me.
-
Ferran Maylinch over 9 yearsI toggled the Inter-App Audio capability to ON and then to OFF again, and this way the app worked... WT*?
-
hiroshi over 9 yearsAlso it solved "Invalid token" error response of APNs.
-
Rukshan over 9 yearsadding game center entitlement and removing it back , worked for me as well. No idea why.
-
CaseyB over 9 yearsHad to do the same for keychain sharing. I also had an app extension, I had to do it in both places to make it work.
-
Emastmagy MastMagy over 9 yearsThanks! Switching it to 'Automatic' did it for me
-
SafeFastExpressive about 9 yearsRestarting/cleaning didn't work for me, but then I realized I hadn't added my new test phone to the Ad Hoc profile I was using to build with. I regenerated/downloaded a updated profile and the error went away. Note: you may get a "security" error after doing this, which means the device needs you to authorize the app, just tap the app on device for the "trust developer" alert to activate.
-
Keller about 9 yearsWow, unbelievable. Still a applicable fix, though for me it was the App Groups capability.
-
Jim Range almost 9 yearsStrange that changing to automatic fixed it, but it worked for me. I had my provisioning profile set to com.mycompany.* and was getting this error. There were red FixMe under the Capabilities tab, but after fixing those issue I still received the invalid entitlements error. I then tried changing my provisioning profile from com.mycompany.* to automatic and it fixed the issue. I double checked that the bundleID is com.mycompany.blabla, so seems to be some sort of Xcode bug. I am using Xcode 6.3.2.
-
Van Du Tran over 8 yearsPlease be aware that Xcode will generate a provisioning profile for you, and invalidate your custom create provisioning profile.
-
Nik over 8 years@VanDuTran no, it won't.
-
Enijar almost 8 yearsThis was a fix for me too.
-
Andre Simon almost 8 yearsSame here! It's super weird. I guess you can toggle any capability to fix it.
-
Eric Soyke almost 8 yearsSo Xcode adopted the Microsoft universal fix. ;) For the record, this is still a problem and restarting is still the fix (I'm using v7.3.1).
-
jayellos over 7 yearsanother +1, face this problem again, then google it, I landed here.
-
Matej Ukmar over 7 yearsAfter hours of checking every single detail ... this worked in XCode 8
-
Max about 7 yearsDoes Anyone have a solid solution to this problem !!!!, All of these solution looks like some situational work arounds. Please help.
-
Max about 7 yearsTried everything still facing the same problem !, any suggestions
-
Kavita over 6 yearsI guess there should be proper reasoning about why deleting derived data will solve the problem.
-
Marky over 6 yearsThanks so much! This just helped me out and saved a lot of time!
-
Tahmid Rahman over 6 yearsActually making project development team and project test development team same worked for me
-
Oren S about 6 yearsXCode 9.2: Turns out this "fix" is still maintained by Apple :) IOW, The question, and this answer, are as relevant as ever
-
bluebinary about 6 years+1 This also worked with Xcode 5.1.1 (we are maintaining an older enterprise app so still have use of this older Xcode version), and restarting Xcode solved the issue!
-
dan about 6 yearsVery good point, this happens when you change your team in the main target but not in the test target. Changing the team in the test target to the team in the main target, solved the issue for me.
-
Noitidart about 6 yearsIs it possible to remove game center, and in-app purchase from developer.apple.com?
-
Noitidart about 6 yearsWhere is entitlements file located?
-
Reinhard Männer about 6 yearsIt is in your project folder, and called "yourProject.entitlements". You can find it in Xcode's project navigator.
-
Noitidart about 6 yearsThanks. it seems it was not created until i checked then unchecked "inter app audio". I have game center and in app purchases on developer.apple.com but i dont use it, these are defaults. So I marked in my capabilities in xcode as "on" but no matter what i keep getting the "The executable was signed with invalid entitlements." error. :(
-
Reid almost 6 yearsThanks!! This is what finally fixed it for me. Entitlements were a total red herring.
-
Kqtr over 5 yearsWow! Thanks @Krish
-
Samer Murad over 5 yearsyou sir, just saved my Thursday, can't thank you enough
-
Pablo over 5 yearswhere can I find ProjectTarget and ProjectTests?
-
Pablo over 5 yearsah! found it! days on this and it wast just this setup!??
-
Vyrnach almost 5 yearswould like add for Cordova/Ionic users that you may also need to change your generated Xcode project to use legacy mode by "File > Project / Workspace Settings" and change it to the Legacy Build system" as detailed here: stackoverflow.com/a/52605878/2503520
-
Saurabh Bisht almost 5 yearsReinstallation is no solution, it happens mostly when the scheme configured does not match the running one
-
Dan Beaulieu about 4 yearsThis occurred in a Xamarin application as well in Visual Studio for mac. So it's not just isolated to Xcode.
-
Roi about 3 years@Pablo where did you find it?
-
Pablo about 3 years@Roi I think it was here: stackoverflow.com/a/55466625/1958882
-
Nasir almost 3 yearsWorked perfectly
-
HartWoom over 2 yearsIt was another entitlement that was missing for me. It was in the LOC.entitlements file