I have a Flutter application which use receive_sharing_intent package, and as requested by the plugin, I've created a Share Extension.
My app and the extension build and work correctly, but when I archive and distribute my app (App Store Connect), at the end of the uploading I have the following error messages:
ERROR ITMS-90057: "The bundle 'Payload/Runner.app/PlugIns/ShareExtension.appex' is missing plist key. The Info.plist is missing the required key: CFBundleShortVersionString."
ERROR ITMS-90056: "This bundle 'Payload/Runner.app/PlugIns/ShareExtension.appex' is invalid. The Info.plist is missing the required key: CFBundleVersion."
ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'CFBundleVersion' in bundle Payload/Runner.app/PlugIns/ShareExtension.appex is required."
ERROR ITMS-90360: "Missing Info.plist value. A value for the key 'CFBundleShortVersionString' in bundle Payload/Runner.app/PlugIns/ShareExtension.appex is required."
But in my ios/ShareExtension/Info.plist file I have:
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
I also tried with:
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
which remove the error for CFBundleVersion but CFBundleShortVersionString is still invalid.
By explicitly setting my app version and build number in the extension plist the upload succeed.
But is there a way to use FLUTTER_BUILD_NAME and FLUTTER_BUILD_NUMBER variables in the extension plist?
NOTE:
I'm using Xcode 11.6