title: How to save path of image picked from UIImagePickerViewController to sqlite database and access it later ? ios
body: <p>I need to save path of the image picked from server and later access the path to show that image on user click by database retrival.</p>
  
  <pre><code>-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  {
        NSString *urlPath =  [info objectForKey:@"UIImagePickerControllerReferenceURL"]absoluteString];
  }
  </code></pre>
  
  <p>and saving it to database. </p>
  
  <p>It saved as     <strong>assets-library://asset/asset.JPG?id=E1136225-97DE-4BF4-A864-67E33D60737A&amp;ext=JPG</strong></p>
  
  <p>then I want to import to <code>Imageview</code></p>
  
  <pre><code> UIImageView *iv = [[UIImageView alloc]init];
   iv.image = [UIimage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imagepath]]];
  </code></pre>
  
  <p>But it is not working</p>