Camera Example

I am after a more complete camera example

  • Take a picture (Can do)
  • Add the picture to a canvas (Can do)
  • Save the picture (I have this but can’t find the picture on the device)
Dim saveFile As FolderItem = SpecialFolder.Documents.Child("MyPic.png")
If Image <> Nil Then
  Image.Image.WriteToFile(saveFile, "public.png")
else
  MessageBox("Nothing to Save"}
End If
  • Load picture from Photos (Can’t Do)

Ok I can load picture from Photos (actually that is the sample project) now but still can’t save the picture I took and dropped in the canvas back to Photos or find the picture I am saving to Documents.
I have an info.plist in place to give appropriate permission.

Have you tried the SaveToCameraRoll function in iOSKit:
https://github.com/kingj5/iOSKit/blob/master/Modules/Extensions.xojo_code#L351

Hi Jason,
Yes I was just working on that but it keep crashing. I am most likely referencing incorrectly.
I found the method in the Kit and reference it

if MapImage <> nil then MapImage.image.SaveToCameraRoll else MessageBox"Nothing to Save" end if

I’m using latest Xojo, Xcode, tried 13.2, 12.4, iPad and iPhone

Ahhh… accidentally deleted my plist, works just fine :slight_smile: