I created a custom UIActivity for Instagram. One of the activity items I require for my custom UIActivity is an InstagramPhoto instance. This object contains the UIImage, the caption and other stuff I want to send to the instagram application. With ios below 8, everything works fine. But when I test using ios8, I see this error:
Unknown activity items supplied: (
"<InstagramPhoto: 0x18848310>"
)
I had such error when I passed my view controller object to UIActivityViewController in activity item list without implementing UIActivityItemSource protocol(it doesn't look like requirenment in the documentation).
UIActivityViewController *activityViewController =
[[UIActivityViewController alloc]
initWithActivityItems:@[self]
applicationActivities:customActivities];
If you have code like above, you should have something like this in InstagramPhoto(godawful code, just to explain):
- (id)activityViewController:(UIActivityViewController*) activityViewController itemForActivityType:(NSString *)activityType
{
return self;
}
- (id)activityViewControllerPlaceholderItem:(UIActivityViewController *)activityViewController
{
return @"";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With