<!--
{
  "availability" : [
    "iOS: 3.1.0 -",
    "iPadOS: 3.1.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISaveVideoAtPathToSavedPhotosAlbum(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:@F@UISaveVideoAtPathToSavedPhotosAlbum"
  },
  "title" : "UISaveVideoAtPathToSavedPhotosAlbum(_:_:_:_:)"
}
-->

# UISaveVideoAtPathToSavedPhotosAlbum(_:_:_:_:)

Adds the movie from the specified path to the user’s Camera Roll album.

```
func UISaveVideoAtPathToSavedPhotosAlbum(_ videoPath: String, _ completionTarget: Any?, _ completionSelector: Selector?, _ contextInfo: UnsafeMutableRawPointer?)
```

## Parameters

`videoPath`

The filesystem path to the movie file you want to save to the Camera Roll album.

`completionTarget`

Optionally, the object whose selector the system calls after it writes the movie to the Camera Roll album.

`completionSelector`

The method selector of the `completionTarget` object to call. Make this optional method conform to the following signature:

```swift
// Swift
func video(_ videoPath: String?,
           didFinishSavingWithError error: Error?,
           contextInfo: UnsafeMutableRawPointer?) {}
```

```objc
// Objective-C
- (void)video: (NSString *) videoPath
    didFinishSavingWithError: (NSError *) error
              contextInfo: (void *) contextInfo;
```

`contextInfo`

An optional pointer to any context-specific data that you want the system to pass to the completion selector.

## Discussion

When you use this function with an image picker controller, you’d typically call it within your [`imagePickerController(_:didFinishPickingMediaWithInfo:)`](/documentation/UIKit/UIImagePickerControllerDelegate/imagePickerController(_:didFinishPickingMediaWithInfo:)) delegate method implementation.

Before calling this function, call the [`UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(_:)`](/documentation/UIKit/UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(_:)) function to determine if it’s possible to save movies to the Camera Roll album. For a code example, refer to [Camera Programming Topics for iOS](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/CameraAndPhotoLib_TopicsForIOS/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010400).

The use of the `completionTarget`, `completionSelector`, and `contextInfo` parameters is optional and necessary only if you want to receive an asynchronous notification when the function finishes writing the movie to the user’s Camera Roll or Saved Photos album. If you don’t want to receive a notification, pass `nil` for these parameters.

When an iOS device without a camera uses it, this method adds the movie to the Saved Photos album rather than to the Camera Roll album.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)