title: Xamarin.Mobile Component multiple file saved getting deleted without calling delete function for iOS
body: <p>We are using Xamarin.Mobile component for taking and storing photos in an local app directory. Now, its works fine when I am storing a single photo but if I am storing multiple photo and trying to access those, only last image exist, all other images are getting deleted. I don’t call delete function anywhere in my code.</p>
  
  <p>We are making app for both iOS and android and we have some Core Class that are linked in both projects</p>
  
  <p>When it enter the function as shown is the last call stack, only last image exists, all other image are getting deleted.
  The top three functions are from our Core Class which are linked in both iOS and Android.</p>
  
  <p>I have enable iTunes file sharing, images are getting stored inside Documents folder and I am giving each image a different name.</p>
  
  <p>here is the code for taking photos:
  Random rand1 = new Random((int) DateTime.Now.Ticks &amp; 0x0000FFFF);</p>
  
  <pre><code>        picker = new MediaPicker();
          if( !picker.IsCameraAvailable )
              return;
          MediaPickerController controller = picker.GetTakePhotoUI (new StoreCameraMediaOptions {
              Name = "Ticket"+rand1.Next(1, 1000000)+".jpg",
              Directory = ""
          });
          this.PresentViewController( controller, true, null );
          controller.GetResultAsync().ContinueWith (t =&gt; {
              // We need to dismiss the controller ourselves
              this.PresentedViewController.DismissViewController (true, () =&gt; {
                  // User canceled or something went wrong
                  if (t.IsCanceled || t.IsFaulted)
                      return;
  
                  // We get back a MediaFile
                  MediaFile media = t.Result;
  
  
  
                  ticket.imagePaths.Add( media.Path );
  
              });
          }, uiScheduler); 
  </code></pre>
  
  <p>Here is my Application Output:
  2014-01-15 15:17:40.445 CCR_Ticket_System_iOS[2063:60b] File Exists in TicketRepo: /private/var/mobile/Applications/ABE44A50-7119-4BF9-8DF9-DC50C80E7591/Documents/Ticket235666.jpg
  2014-01-15 15:17:42.384 CCR_Ticket_System_iOS[2063:60b] File Exists in TicketRepo: /private/var/mobile/Applications/ABE44A50-7119-4BF9-8DF9-DC50C80E7591/Documents/Ticket952511.jpg
  2014-01-15 15:17:49.320 CCR_Ticket_System_iOS[2063:60b] File doesn't Exists in SaveTicket in DatabaseADO: /private/var/mobile/Applications/ABE44A50-7119-4BF9-8DF9-DC50C80E7591/Documents/Ticket235666.jpg
  2014-01-15 15:17:49.323 CCR_Ticket_System_iOS[2063:60b] File Exists in SaveTicket in DatabaseADO: /private/var/mobile/Applications/ABE44A50-7119-4BF9-8DF9-DC50C80E7591/Documents/Ticket952511.jpg</p>
  
  <p>Please let me know what I am doing wrong. Please let me know if you need more information. I am stuck on this problem for last 2 days.</p>