Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Accessing iCloud in XF using Dependency Service

$
0
0

I was following @LandLu post in this forum thread.

The following line is giving a Null Exception:

//Get the iCloud's url
var filePath = NSFileManager.DefaultManager.GetUrlForUbiquityContainer(null).Append("Documents", true);

Even replacing the 'null' in the argument of GetUrlForUbiquityContainer with my container id which is of the form "iCloud.com.companyname.appname" didn't help.

What am I doing wrong?

I am using automatic provisioning. Is that wrong?

Also one more question:
In the following code in the same post, what is the namespace of File and Path?

//Here I write a test string in this document folder
File.WriteAllText(Path.Combine(filePath.Path, "test.txt"), "test");


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>