yershalom
yershalom

Reputation: 838

Set iOS dynamic quick action icon from url

I'm working but on iOS dynamic quick actions, and I want to use image from url, to be set as the quick action icon.

Is it possible? I didn't find an answer for that..

Upvotes: 0

Views: 218

Answers (1)

Léo Natan
Léo Natan

Reputation: 57040

Unfortunately, it's not possible using public API.

UIApplicationShortcutIcon only allows creating icons from contacts, images found in the bundle or predefined system icons.

If you are willing to use private API (you shouldn't), there exist two methods which allow this:

+ (id)iconWithCustomImage:(id)arg1 isTemplate:(_Bool)arg2;
+ (id)iconWithCustomImage:(id)arg1;

It still wouldn't be a URL. You'd need to create a UIImage instance and call these methods with that image.

Upvotes: 1

Related Questions