I tried to get my app name in UITesting. I tried the code below:
let appName = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as! String
But it gives me the nil value result.
Are you sure, that you've set Display name in your Info.plist file? Just set this name in Project settings or in Info.plist: