I would like to be able to access the versioning values in Info.plist from within my iOS app, writing in Swift in Xcode 12.5. The key/values in question are:
CFBundleShortVersionString: $(MARKETING_VERSION)
CFBundleVersion: $(CURRENT_PROJECT_VERSION)
From the Build Settings, the two Info.plist values contain "1.0" and "8" respectively. I've tried the following:
let appBundleVersion = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
which works if I have user-defined key/value pairs in the Info.plist, but doesn't work for accessing the system-managed Build Settings. How can I access these two values?
Thanks.