Xamarin ios Cloud file copy location issue

AMNishanthiKumariAMNishanthiKumari ✭✭✭USMember ✭✭✭
edited November 2018 in Xamarin.iOS

I had connected iCloud using xamarin forms ios. My file copied to icloud without any error. But it saved in file:///private/var/mobile/Library/Mobile%20Documents/iCloud~com~companyname~MobileDoc/ path.

When i checked inside iCloud my file not showing it. But when i search that file, its location shows as iCloud --> MobileDoc--> File.txt. But when i checked inside the iCloud there are no Folder call MobileDoc.

Best Answer

Answers

  • ColeXColeX Xamurai Member, Xamarin Team Xamurai

    It seems iCloud does not have a general open file storage facility like MobileMe's iDisk, or Dropbox etc.
    You can only access documents stored in iCloud from within the app that created them.

    Refer https://discussions.apple.com/thread/4251410

  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭
    my file not visible in icloud. Its in inside the mac.
  • ColeXColeX Xamurai Member, Xamarin Team Xamurai

    @AMNishanthiKumari said:
    my file not visible in icloud. Its in inside the mac.

    Is that file hidden in your mac ? Try to show them using terminal.

    https://ianlunn.co.uk/articles/quickly-showhide-hidden-files-mac-os-x-mavericks/

  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭
    edited December 2018

    @ColeX Thanks i will tried it. other hidden files are showed after that. but my folder not visible.

  • ColeXColeX Xamurai Member, Xamarin Team Xamurai
  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭

    @ColeX thanks. Now i am going to use UIDocumentPickerViewController and try this upload manually. Its also confusing, Got some erros in Appdelegate folder.

        UIDocumentPickerViewController documentPicker = new UIDocumentPickerViewController(NSUrl.FromFilename(filePath), UIDocumentPickerMode.ExportToService);
               documentPicker.DidPickDocumentAtUrls += (object sender, UIDocumentPickedAtUrlsEventArgs e) =>
               {
                   ShowAlert("File Uploaded Successfully");
               };
               documentPicker.DidPickDocument += (object sender, UIDocumentPickedEventArgs e) =>
               {
                   ShowAlert("File Uploaded Successfully");
               };
               documentPicker.WasCancelled += (sender, e) =>
               {
                   ShowAlert("File Upload Cancelled");
               };
               documentPicker.ModalPresentationStyle = UIModalPresentationStyle.FormSheet;
               (UIApplication.SharedApplication.Delegate as AppDelegate).Window.RootViewController.PresentViewController(documentPicker, true, null);
    

    My Appdelegate file is public partial But getting error

  • ColeXColeX Xamurai Member, Xamarin Team Xamurai

    What error ? can you post it here ?

  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭

    I can't use this code inside
    Appdelegate. This code is in

  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭

    Thanks it remove the error. Another thing to know

    UIDocumentPickerViewController documentPicker = new UIDocumentPickerViewController(NSUrl.FromFilename(filePath), UIDocumentPickerMode.ExportToService);

    This NSUrl.FromFilename(filePath) not getting correctly. Can't add only filepath for that.

  • AMNishanthiKumariAMNishanthiKumari ✭✭✭ USMember ✭✭✭
    edited December 2018

    @ColeX Thanks for all reply.

Sign In or Register to comment.