I develop an application using WatchKit 2. I have to transfer a image from iOS device to watch. I sent the image url. This is my code on watch extension side that i used to set image on my WKInterfaceImage:
NSError *error = nil;
NSData * dataq = [NSData dataWithContentsOfURL:[NSURL URLWithString:"url string"] options:NSDataReadingMappedAlways error:&error];
UIImage *img = [UIImage imageWithData:dataq];
[cell.babyImage setImage:formattedImage];
On simulator (watch simulator and watch simulator) it works but on real devices (iPhone and watch) i got error :
error =
Error Domain=NSCocoaErrorDomain Code=256 "The file “image.jpg” couldn’t be opened." UserInfo={NSURL=https://"image url"}