OSStatus error:[-34018]

Every topic I can find online about this entitlement error suggests I don't have the correct entitlements on. I do in fact have the correct entitlements enabled, but xcode doesn't seem to recognize them.

dev@dev-MacBook-Pro Debug-appletvos % codesign -d --entitlements - ProductName.app 
Executable=/Users/dev/Library/Developer/Xcode/DerivedData/ProductName-cmaicvialhhqtnbvmwehlympuxua/Build/Products/Debug-appletvos/ProductName.app/ProductName
[Dict]
	[Key] application-identifier
	[Value]
		[String] <teamID>.Company.ProductName
	[Key] com.apple.developer.associated-domains
	[Value]
		[Array]
			[String] webcredentials:<api_url>
	[Key] com.apple.developer.team-identifier
	[Value]
		[String] <teamID>
	[Key] com.apple.developer.user-management
	[Value]
		[Array]
			[String] get-current-user
	[Key] com.apple.developer.weatherkit
	[Value]
		[Bool] true
	[Key] com.apple.security.application-groups
	[Value]
		[Array]
			[String] group.Company.ProductName
	[Key] get-task-allow
	[Value]
		[Bool] true
	[Key] keychain-access-groups
	[Value]
		[Array]
			[String] <teamID>.com.Company.ProductName
			[String] <teamID>.Company.ProductName

OSStatus error:[-34018] Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups entitlements.

I am unsure about the application-identifier part, as this isn't even an option in the entitlements, and keychain sharing was already turned on. These errors stop my app from launching. A few days ago this wasn't an issue. Now after launching xcode again this suddenly becomes an issue out of nowhere.

Platform: tvOS simulator runtime and Apple TV 4k (3rd generation)

Target version: 18.0

Development Hardware: macbook pro m2 max

Development Software: macos Sonoma 14.5

Bumping post

Entitlements are a bit tricky. The entitlements in your code signature are just the entitlements you claim. For that claim to be successful, it has to be authorised by a provisioning profile. I discuss this in gory detail in TN3125 Inside Code Signing: Provisioning Profiles.

These errors stop my app from launching.

So where are you seeing that -34018 error? In the Xcode console? Or has your app launched and you’re getting the error back from some API?

Share and Enjoy

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

OSStatus error:[-34018]
 
 
Q