That's really weird that there is no init(contact: CNContact)
inside UIApplicationShortcutIcon
, this is recently released and not even deprecated.
There are only two options, init
with type
and templateImageName
. Whereas when I check UIApplicationShortcutIcon
api reference at Apple, it's showing it's available.
As per @OOPer comment, You need to import ContactsUI to use UIApplicationShortcutIcon.init(contact:). (Though, Apple's doc is not clear enough about it.)