Missing key in Info.plist of "endpoint security extension" after xcodebuild when build release

My project based on swift-based container app with system extensions.

When I build my app in release mode from xcode, after the pkg is built, I see that following keys are missing from end point security extension Info.plist : CFBundleShortVersionString and CFBundleVersion .

Which eventually lead to the error below after deploying the application :

sysextd: bundle is missing CFBundleShortVersionString key 
"myapp": Activation request failed: Invalid extension configuration in Info.plist and/or 
entitlements

As a workaround, I manually added those keys to the plist file, after build has completed. This solved the problem and I could see that the extension is up and running once approved by the client.

Do you know what cause those keys to be eliminated? It looks like this problem is unique to the security extension controlled by my app. Another extension is a network extension type, and it looks it finish complication without any missing keys.

However, when I build in debug mode, then both Info.plist are valid.

Is there any special Xcode behavior in release mode that modify the info.plist of the extension ?

Thanks !

Xcode’s Info.plist generation logic is complex. To start, does your target have the Generate Info.plist File (GENERATE_INFOPLIST_FILE) build setting set?

Share and Enjoy

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

Missing key in Info.plist of "endpoint security extension" after xcodebuild when build release
 
 
Q