Bug 42331 - ALAssetsLibrary.WriteVideoToSavedPhotosAlbum ALWAYS RETURN NULL NSUrl
Summary: ALAssetsLibrary.WriteVideoToSavedPhotosAlbum ALWAYS RETURN NULL NSUrl
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.3 (xcode 7.1 previews)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
Depends on:
Reported: 2016-07-01 19:35 UTC by Shawn Lewis
Modified: 2016-07-14 10:43 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 42331 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Shawn Lewis 2016-07-01 19:35:40 UTC
When calling WriteVideoToSavedPhotosAlbum on success a NSUrl should be provided on success.

On success the Action ALWAYS receives a NULL NSUrl even though VIDEO has saved successfully.

public static string SaveVideoToLibrary(NSUrl path, Action<NSUrl, NSError> action)
	string result = string.Empty;
	AssetsLibrary.ALAssetsLibrary assetsLibrary = new AssetsLibrary.ALAssetsLibrary();

	assetsLibrary.WriteVideoToSavedPhotosAlbum(path, action);
	return result;

Upon executing the above function, the Action Function ALWAYS gets a NULL on success.
Comment 1 Alex Soto [MSFT] 2016-07-02 03:59:35 UTC
Please include a test case that reproduces the issue and all
version informations of your dev environment. This will help
us a lot to track down the issue and fix it.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 Shawn Lewis 2016-07-02 04:05:05 UTC
The Test function is in the code above, simply call it with a urlPath of a local MP4.


private void SaveComplete(NSUrl assetUrl, NSError error)

You will see that will cause an exception (assetUrl == NULL) even though it was a success.

Xamarin Studio Community
Version 6.0.1 (build 9)
Installation UUID: d1d73515-76a0-4550-ad8e-45ca9e60e621
	Mono 4.4.1 (mono-4.4.0-branch-c7sr0/4747417) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404010000

Not Installed

Apple Developer Tools
Xcode 7.3.1 (10188.1)
Build 7D1014

Version: (Xamarin Studio Community)
Hash: 3cf8aae
Branch: c7sr0
Build date: 2016-06-20 16:09:58-0400

Version: (Xamarin Studio Community)
Android SDK: /Users/slewis/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.1.2
SDK Platform Tools Version: 24.0.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:

Xamarin Android Player
Not Installed

Version: (Xamarin Studio Community)

Build Information
Release ID: 600010009
Git revision: e879ce52093257c5c386ad7e390dfaa937fa7f90
Build date: 2016-06-24 11:53:43-04
Xamarin addins: a9252e6df4851fbbed1f9c6228e7b6dd1b475ac5
Build lane: monodevelop-lion-cycle7-sr0

Operating System
Mac OS X 10.11.5
Darwin Shawns-MacBook-Pro.local 15.5.0 Darwin Kernel Version 15.5.0
    Tue Apr 19 18:36:36 PDT 2016
    root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Comment 3 Manuel de la Peña [MSFT] 2016-07-14 10:43:29 UTC
Does return null.