Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Fixed issue with shared images not showing in preview on iOS #135

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Plugins/NativeShare/iOS/NativeShare.mm
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ - (NSString *)activityViewController:(UIActivityViewController *)activityViewCon
for( int i = 0; i < filesCount; i++ )
{
NSString *filePath = [NSString stringWithUTF8String:files[i]];
UIImage *image = [UIImage imageWithContentsOfFile:filePath];
if( image != nil )
[items addObject:image];
else
[items addObject:[NSURL fileURLWithPath:filePath]];
[items addObject:[NSURL fileURLWithPath:filePath]];
}

UIActivityViewController *activity = [[UIActivityViewController alloc] initWithActivityItems:items applicationActivities:nil];
Expand Down