I've got a working sample app with a Control Center widget that writes something to UserDefaults and then opens the containing app. See here.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: