iOS: Saving reference to cameraroll object

I’m recording video’s with my app.
When I move them to the cameraroll I’d like to be able to reference the videos just as if they are in my apps Documents folder.

(To enable playback from within my app.)

So I wonder if it is possible to save a reference to an object when it has been placed in the cameraroll?

Ahum, It turned out that I have a friend called Google.

UISaveVideoAtPathToSavedPhotosAlbum returns the path to the saved video:

[code]completionSelector
The method selector, of the completionTarget object, to call. This optional method should conform to the following signature:

  • (void) video: (NSString *) videoPath
    didFinishSavingWithError: (NSError *) error
    contextInfo: (void *) contextInfo;[/code]

https://developer.apple.com/documentation/uikit/1619162-uisavevideoatpathtosavedphotosal

Google is as bad as me at writing declares…

This is what I got, it is working but I have no clue of how to define the completionTarget so as of now I do not know the path to the saved video in the cameraroll.

https://developer.apple.com/documentation/uikit/1619162-uisavevideoatpathtosavedphotosal

[code]Public Sub SaveVideoToCameraRoll(videoFile as xojo.IO.FolderItem)
dim url as new Foundation.NSURL(videoFile)

declare sub UISaveVideoAtPathToSavedPhotosAlbum lib UIKitLib ( videoPath as CFStringRef, completionTarget as ptr, completionSelector as ptr, contextInfo as ptr)

UISaveVideoAtPathToSavedPhotosAlbum(url.path,nil, NSSelectorFromString(“video:didFinishSavingWithError:contextInfo:”) ,nil)

End Sub[/code]