Я написал код для загрузки изображения в instagram, который выглядит следующим образом:
CGRect rect = CGRectMake(20 ,20 , 200, 200);
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIGraphicsEndImageContext();
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *jpgPath = [documentsDirectory stringByAppendingPathComponent:@"after2sm.ig"];
NSString *fileURL = [NSString stringWithFormat:@"file://%@",jpgPath];
NSURL *igImageHookFile = [NSURL fileURLWithPath:fileURL];
self.dic.UTI = @"com.instagram.photo";
self.dic = [self setupControllerWithURL:igImageHookFile usingDelegate:self];
self.dic=[UIDocumentInteractionController interactionControllerWithURL:igImageHookFile];
[NSDictionary dictionaryWithObject:@"My Caption" forKey:@"InstagramCaption"];
[self.dic presentOpenInMenuFromRect:rect inView:self.view animated:YES];
Но он открывает лист действий с опцией «instagram», но когда я нажимаю на него, ничего не происходит ... не могли бы вы мне помочь