Reputation: 61
I am trying to figure out way to create MSStickers with images that are hosted on the web. I can create MSStickers with local images, e.g.:
NSString *imagePath = [[NSBundle mainBundle] pathForResource: @"image_name"
ofType: @"png"];
NSURL *imageURL = [NSURL fileURLWithPath: urlString];
MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL
localizedDescription: @"my-sticker"
error: &err];
But I cannot do something like this:
NSString *imageURLString = @"https://my-cdn/my-sticker.png";
NSURL *imageURL = [NSURL urlWithString: urlString];
MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL
localizedDescription: @"my-sticker"
error: &err];
Upvotes: 2
Views: 1013
Reputation: 2105
No, it's not possible for the moment. But you can do this, which is not that far from what you want:
Upvotes: 2