looking for some solutions? You are welcome.

SOLVED: react native Image doesn't render local source

DavidLee:
// write image to local path
  NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES).firstObject;
  NSString *filePath = [path stringByAppendingPathComponent:[NSString stringWithFormat:@"a.jpg"]];
  [UIImagePNGRepresentation(image)writeToFile:filePath atomically:YES]

// under iOS (it works great)
[UIImage imageWithContentsOfFile: filePath];

// under react native (Could not find image filePath)
<Image source= />

This is the result no image

Anyone has the same issues?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
Share:

No comments:

Recent