var version: String? {
    guard let dictionary = Bundle.main.infoDictionary,
        let version = dictionary["CFBundleShortVersionString"] as? String,
        let build = dictionary["CFBundleVersion"] as? String else {return nil}
    
    let versionAndBuild: String = "vserion: \(version), build: \(build)"
    return versionAndBuild
}

Reference

Xcode 빌드시, Version, Build 차이점
Version vs Build in Xcode