Previous version of Xcode (13 and earlier) had an option in Edit Scheme | Run | Options called "Background Fetch Launch due to a background fetch event". It seems to have disappeared in Xcode 14 - how to test launching of the app due a background event now?