How to Upload and download files to iCloud in xamarin ios










1















I want to upload documents to iCloud. and also need to download it from iCloud and edit. i am new to xamarin ios applications. couldn't find detailed example for this. please help.










share|improve this question




























    1















    I want to upload documents to iCloud. and also need to download it from iCloud and edit. i am new to xamarin ios applications. couldn't find detailed example for this. please help.










    share|improve this question


























      1












      1








      1








      I want to upload documents to iCloud. and also need to download it from iCloud and edit. i am new to xamarin ios applications. couldn't find detailed example for this. please help.










      share|improve this question
















      I want to upload documents to iCloud. and also need to download it from iCloud and edit. i am new to xamarin ios applications. couldn't find detailed example for this. please help.







      ios visual-studio xamarin icloud






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '18 at 4:38







      amnk

















      asked Nov 16 '18 at 5:54









      amnkamnk

      215




      215






















          1 Answer
          1






          active

          oldest

          votes


















          0














          The first step in using iCloud Document Storage is to determine whether iCloud is enabled, and if so the location of the "ubiquity container" (the directory where iCloud-enabled files are stored on the device).



          This code is in the AppDelegate.FinishedLaunching method of the sample.



          ThreadPool.QueueUserWorkItem (_ => 
          CheckingForiCloud = true;
          Console.WriteLine ("Checking for iCloud");
          var uburl = NSFileManager.DefaultManager.GetUrlForUbiquityContainer (null);
          // OR instead of null you can specify "TEAMID.com.your-company.ApplicationName"

          if (uburl == null)
          HasiCloud = false;
          Console.WriteLine ("Can't find iCloud container, check your provisioning profile and entitlements");

          InvokeOnMainThread (() =>
          var alertController = UIAlertController.Create ("No uE049 available",
          "Check your Entitlements.plist, BundleId, TeamId and Provisioning Profile!", UIAlertControllerStyle.Alert);
          alertController.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Destructive, null));
          viewController.PresentViewController (alertController, false, null);
          );
          else // iCloud enabled, store the NSURL for later use
          HasiCloud = true;
          iCloudUrl = uburl;
          Console.WriteLine ("yyy Yes iCloud! 0", uburl.AbsoluteUrl);

          CheckingForiCloud = false;
          );



          Creating a UIDocument Subclass




          public class MonkeyDocument : UIDocument

          // the 'model', just a chunk of text in this case; must easily convert to NSData
          NSString dataModel;
          // model is wrapped in a nice .NET-friendly property
          public string DocumentString

          get
          return dataModel.ToString ();


          set
          dataModel = new NSString (value);



          public MonkeyDocument (NSUrl url) : base (url)

          DocumentString = "(default text)";

          // contents supplied by iCloud to display, update local model and display (via notification)
          public override bool LoadFromContents (NSObject contents, string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("LoadFromContents(0)", typeName);

          if (contents != null)
          dataModel = NSString.FromData ((NSData)contents, NSStringEncoding.UTF8);

          // LoadFromContents called when an update occurs
          NSNotificationCenter.DefaultCenter.PostNotificationName.("monkeyDocumentModified", this);
          return true;

          // return contents for iCloud to save (from the local model)
          public override NSObject ContentsForType (string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("ContentsForType(0)", typeName);
          Console.WriteLine ("DocumentText:0",dataModel);

          NSData docData = dataModel.Encode (NSStringEncoding.UTF8);
          return docData;





          Saving iCloud Documents




          var docsFolder = Path.Combine (iCloudUrl.Path, "Documents"); // NOTE: Documents 
          folder is user-accessible in Settings
          var docPath = Path.Combine (docsFolder, MonkeyDocFilename);
          var ubiq = new NSUrl (docPath, false);
          var monkeyDoc = new MonkeyDocument (ubiq);
          monkeyDoc.Save (monkeyDoc.FileUrl, UIDocumentSaveOperation.ForCreating, saveSuccess => {
          Console.WriteLine ("Save completion:" + saveSuccess);
          if (saveSuccess)
          monkeyDoc.Open (openSuccess =>
          Console.WriteLine ("Open completion:" + openSuccess);
          if (openSuccess)
          Console.WriteLine ("new document for iCloud");
          Console.WriteLine (" == " + monkeyDoc.DocumentString);
          viewController.DisplayDocument (monkeyDoc);
          else
          Console.WriteLine ("couldn't open");

          );
          else
          Console.WriteLine ("couldn't save");



          For more detail about iCloud you can refer here






          share|improve this answer























          • thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

            – amnk
            Nov 19 '18 at 14:40












          • Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

            – Lucas Zhang - MSFT
            Nov 20 '18 at 0:23











          • yes i had download it and tried to run. after that i am getting that error

            – amnk
            Nov 20 '18 at 2:46











          • Delete the folder bin and obj,then rebuild the project

            – Lucas Zhang - MSFT
            Nov 20 '18 at 2:47











          • Tried it same error again.

            – amnk
            Nov 20 '18 at 3:17










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53332189%2fhow-to-upload-and-download-files-to-icloud-in-xamarin-ios%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The first step in using iCloud Document Storage is to determine whether iCloud is enabled, and if so the location of the "ubiquity container" (the directory where iCloud-enabled files are stored on the device).



          This code is in the AppDelegate.FinishedLaunching method of the sample.



          ThreadPool.QueueUserWorkItem (_ => 
          CheckingForiCloud = true;
          Console.WriteLine ("Checking for iCloud");
          var uburl = NSFileManager.DefaultManager.GetUrlForUbiquityContainer (null);
          // OR instead of null you can specify "TEAMID.com.your-company.ApplicationName"

          if (uburl == null)
          HasiCloud = false;
          Console.WriteLine ("Can't find iCloud container, check your provisioning profile and entitlements");

          InvokeOnMainThread (() =>
          var alertController = UIAlertController.Create ("No uE049 available",
          "Check your Entitlements.plist, BundleId, TeamId and Provisioning Profile!", UIAlertControllerStyle.Alert);
          alertController.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Destructive, null));
          viewController.PresentViewController (alertController, false, null);
          );
          else // iCloud enabled, store the NSURL for later use
          HasiCloud = true;
          iCloudUrl = uburl;
          Console.WriteLine ("yyy Yes iCloud! 0", uburl.AbsoluteUrl);

          CheckingForiCloud = false;
          );



          Creating a UIDocument Subclass




          public class MonkeyDocument : UIDocument

          // the 'model', just a chunk of text in this case; must easily convert to NSData
          NSString dataModel;
          // model is wrapped in a nice .NET-friendly property
          public string DocumentString

          get
          return dataModel.ToString ();


          set
          dataModel = new NSString (value);



          public MonkeyDocument (NSUrl url) : base (url)

          DocumentString = "(default text)";

          // contents supplied by iCloud to display, update local model and display (via notification)
          public override bool LoadFromContents (NSObject contents, string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("LoadFromContents(0)", typeName);

          if (contents != null)
          dataModel = NSString.FromData ((NSData)contents, NSStringEncoding.UTF8);

          // LoadFromContents called when an update occurs
          NSNotificationCenter.DefaultCenter.PostNotificationName.("monkeyDocumentModified", this);
          return true;

          // return contents for iCloud to save (from the local model)
          public override NSObject ContentsForType (string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("ContentsForType(0)", typeName);
          Console.WriteLine ("DocumentText:0",dataModel);

          NSData docData = dataModel.Encode (NSStringEncoding.UTF8);
          return docData;





          Saving iCloud Documents




          var docsFolder = Path.Combine (iCloudUrl.Path, "Documents"); // NOTE: Documents 
          folder is user-accessible in Settings
          var docPath = Path.Combine (docsFolder, MonkeyDocFilename);
          var ubiq = new NSUrl (docPath, false);
          var monkeyDoc = new MonkeyDocument (ubiq);
          monkeyDoc.Save (monkeyDoc.FileUrl, UIDocumentSaveOperation.ForCreating, saveSuccess => {
          Console.WriteLine ("Save completion:" + saveSuccess);
          if (saveSuccess)
          monkeyDoc.Open (openSuccess =>
          Console.WriteLine ("Open completion:" + openSuccess);
          if (openSuccess)
          Console.WriteLine ("new document for iCloud");
          Console.WriteLine (" == " + monkeyDoc.DocumentString);
          viewController.DisplayDocument (monkeyDoc);
          else
          Console.WriteLine ("couldn't open");

          );
          else
          Console.WriteLine ("couldn't save");



          For more detail about iCloud you can refer here






          share|improve this answer























          • thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

            – amnk
            Nov 19 '18 at 14:40












          • Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

            – Lucas Zhang - MSFT
            Nov 20 '18 at 0:23











          • yes i had download it and tried to run. after that i am getting that error

            – amnk
            Nov 20 '18 at 2:46











          • Delete the folder bin and obj,then rebuild the project

            – Lucas Zhang - MSFT
            Nov 20 '18 at 2:47











          • Tried it same error again.

            – amnk
            Nov 20 '18 at 3:17















          0














          The first step in using iCloud Document Storage is to determine whether iCloud is enabled, and if so the location of the "ubiquity container" (the directory where iCloud-enabled files are stored on the device).



          This code is in the AppDelegate.FinishedLaunching method of the sample.



          ThreadPool.QueueUserWorkItem (_ => 
          CheckingForiCloud = true;
          Console.WriteLine ("Checking for iCloud");
          var uburl = NSFileManager.DefaultManager.GetUrlForUbiquityContainer (null);
          // OR instead of null you can specify "TEAMID.com.your-company.ApplicationName"

          if (uburl == null)
          HasiCloud = false;
          Console.WriteLine ("Can't find iCloud container, check your provisioning profile and entitlements");

          InvokeOnMainThread (() =>
          var alertController = UIAlertController.Create ("No uE049 available",
          "Check your Entitlements.plist, BundleId, TeamId and Provisioning Profile!", UIAlertControllerStyle.Alert);
          alertController.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Destructive, null));
          viewController.PresentViewController (alertController, false, null);
          );
          else // iCloud enabled, store the NSURL for later use
          HasiCloud = true;
          iCloudUrl = uburl;
          Console.WriteLine ("yyy Yes iCloud! 0", uburl.AbsoluteUrl);

          CheckingForiCloud = false;
          );



          Creating a UIDocument Subclass




          public class MonkeyDocument : UIDocument

          // the 'model', just a chunk of text in this case; must easily convert to NSData
          NSString dataModel;
          // model is wrapped in a nice .NET-friendly property
          public string DocumentString

          get
          return dataModel.ToString ();


          set
          dataModel = new NSString (value);



          public MonkeyDocument (NSUrl url) : base (url)

          DocumentString = "(default text)";

          // contents supplied by iCloud to display, update local model and display (via notification)
          public override bool LoadFromContents (NSObject contents, string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("LoadFromContents(0)", typeName);

          if (contents != null)
          dataModel = NSString.FromData ((NSData)contents, NSStringEncoding.UTF8);

          // LoadFromContents called when an update occurs
          NSNotificationCenter.DefaultCenter.PostNotificationName.("monkeyDocumentModified", this);
          return true;

          // return contents for iCloud to save (from the local model)
          public override NSObject ContentsForType (string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("ContentsForType(0)", typeName);
          Console.WriteLine ("DocumentText:0",dataModel);

          NSData docData = dataModel.Encode (NSStringEncoding.UTF8);
          return docData;





          Saving iCloud Documents




          var docsFolder = Path.Combine (iCloudUrl.Path, "Documents"); // NOTE: Documents 
          folder is user-accessible in Settings
          var docPath = Path.Combine (docsFolder, MonkeyDocFilename);
          var ubiq = new NSUrl (docPath, false);
          var monkeyDoc = new MonkeyDocument (ubiq);
          monkeyDoc.Save (monkeyDoc.FileUrl, UIDocumentSaveOperation.ForCreating, saveSuccess => {
          Console.WriteLine ("Save completion:" + saveSuccess);
          if (saveSuccess)
          monkeyDoc.Open (openSuccess =>
          Console.WriteLine ("Open completion:" + openSuccess);
          if (openSuccess)
          Console.WriteLine ("new document for iCloud");
          Console.WriteLine (" == " + monkeyDoc.DocumentString);
          viewController.DisplayDocument (monkeyDoc);
          else
          Console.WriteLine ("couldn't open");

          );
          else
          Console.WriteLine ("couldn't save");



          For more detail about iCloud you can refer here






          share|improve this answer























          • thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

            – amnk
            Nov 19 '18 at 14:40












          • Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

            – Lucas Zhang - MSFT
            Nov 20 '18 at 0:23











          • yes i had download it and tried to run. after that i am getting that error

            – amnk
            Nov 20 '18 at 2:46











          • Delete the folder bin and obj,then rebuild the project

            – Lucas Zhang - MSFT
            Nov 20 '18 at 2:47











          • Tried it same error again.

            – amnk
            Nov 20 '18 at 3:17













          0












          0








          0







          The first step in using iCloud Document Storage is to determine whether iCloud is enabled, and if so the location of the "ubiquity container" (the directory where iCloud-enabled files are stored on the device).



          This code is in the AppDelegate.FinishedLaunching method of the sample.



          ThreadPool.QueueUserWorkItem (_ => 
          CheckingForiCloud = true;
          Console.WriteLine ("Checking for iCloud");
          var uburl = NSFileManager.DefaultManager.GetUrlForUbiquityContainer (null);
          // OR instead of null you can specify "TEAMID.com.your-company.ApplicationName"

          if (uburl == null)
          HasiCloud = false;
          Console.WriteLine ("Can't find iCloud container, check your provisioning profile and entitlements");

          InvokeOnMainThread (() =>
          var alertController = UIAlertController.Create ("No uE049 available",
          "Check your Entitlements.plist, BundleId, TeamId and Provisioning Profile!", UIAlertControllerStyle.Alert);
          alertController.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Destructive, null));
          viewController.PresentViewController (alertController, false, null);
          );
          else // iCloud enabled, store the NSURL for later use
          HasiCloud = true;
          iCloudUrl = uburl;
          Console.WriteLine ("yyy Yes iCloud! 0", uburl.AbsoluteUrl);

          CheckingForiCloud = false;
          );



          Creating a UIDocument Subclass




          public class MonkeyDocument : UIDocument

          // the 'model', just a chunk of text in this case; must easily convert to NSData
          NSString dataModel;
          // model is wrapped in a nice .NET-friendly property
          public string DocumentString

          get
          return dataModel.ToString ();


          set
          dataModel = new NSString (value);



          public MonkeyDocument (NSUrl url) : base (url)

          DocumentString = "(default text)";

          // contents supplied by iCloud to display, update local model and display (via notification)
          public override bool LoadFromContents (NSObject contents, string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("LoadFromContents(0)", typeName);

          if (contents != null)
          dataModel = NSString.FromData ((NSData)contents, NSStringEncoding.UTF8);

          // LoadFromContents called when an update occurs
          NSNotificationCenter.DefaultCenter.PostNotificationName.("monkeyDocumentModified", this);
          return true;

          // return contents for iCloud to save (from the local model)
          public override NSObject ContentsForType (string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("ContentsForType(0)", typeName);
          Console.WriteLine ("DocumentText:0",dataModel);

          NSData docData = dataModel.Encode (NSStringEncoding.UTF8);
          return docData;





          Saving iCloud Documents




          var docsFolder = Path.Combine (iCloudUrl.Path, "Documents"); // NOTE: Documents 
          folder is user-accessible in Settings
          var docPath = Path.Combine (docsFolder, MonkeyDocFilename);
          var ubiq = new NSUrl (docPath, false);
          var monkeyDoc = new MonkeyDocument (ubiq);
          monkeyDoc.Save (monkeyDoc.FileUrl, UIDocumentSaveOperation.ForCreating, saveSuccess => {
          Console.WriteLine ("Save completion:" + saveSuccess);
          if (saveSuccess)
          monkeyDoc.Open (openSuccess =>
          Console.WriteLine ("Open completion:" + openSuccess);
          if (openSuccess)
          Console.WriteLine ("new document for iCloud");
          Console.WriteLine (" == " + monkeyDoc.DocumentString);
          viewController.DisplayDocument (monkeyDoc);
          else
          Console.WriteLine ("couldn't open");

          );
          else
          Console.WriteLine ("couldn't save");



          For more detail about iCloud you can refer here






          share|improve this answer













          The first step in using iCloud Document Storage is to determine whether iCloud is enabled, and if so the location of the "ubiquity container" (the directory where iCloud-enabled files are stored on the device).



          This code is in the AppDelegate.FinishedLaunching method of the sample.



          ThreadPool.QueueUserWorkItem (_ => 
          CheckingForiCloud = true;
          Console.WriteLine ("Checking for iCloud");
          var uburl = NSFileManager.DefaultManager.GetUrlForUbiquityContainer (null);
          // OR instead of null you can specify "TEAMID.com.your-company.ApplicationName"

          if (uburl == null)
          HasiCloud = false;
          Console.WriteLine ("Can't find iCloud container, check your provisioning profile and entitlements");

          InvokeOnMainThread (() =>
          var alertController = UIAlertController.Create ("No uE049 available",
          "Check your Entitlements.plist, BundleId, TeamId and Provisioning Profile!", UIAlertControllerStyle.Alert);
          alertController.AddAction (UIAlertAction.Create ("OK", UIAlertActionStyle.Destructive, null));
          viewController.PresentViewController (alertController, false, null);
          );
          else // iCloud enabled, store the NSURL for later use
          HasiCloud = true;
          iCloudUrl = uburl;
          Console.WriteLine ("yyy Yes iCloud! 0", uburl.AbsoluteUrl);

          CheckingForiCloud = false;
          );



          Creating a UIDocument Subclass




          public class MonkeyDocument : UIDocument

          // the 'model', just a chunk of text in this case; must easily convert to NSData
          NSString dataModel;
          // model is wrapped in a nice .NET-friendly property
          public string DocumentString

          get
          return dataModel.ToString ();


          set
          dataModel = new NSString (value);



          public MonkeyDocument (NSUrl url) : base (url)

          DocumentString = "(default text)";

          // contents supplied by iCloud to display, update local model and display (via notification)
          public override bool LoadFromContents (NSObject contents, string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("LoadFromContents(0)", typeName);

          if (contents != null)
          dataModel = NSString.FromData ((NSData)contents, NSStringEncoding.UTF8);

          // LoadFromContents called when an update occurs
          NSNotificationCenter.DefaultCenter.PostNotificationName.("monkeyDocumentModified", this);
          return true;

          // return contents for iCloud to save (from the local model)
          public override NSObject ContentsForType (string typeName, out NSError outError)

          outError = null;

          Console.WriteLine ("ContentsForType(0)", typeName);
          Console.WriteLine ("DocumentText:0",dataModel);

          NSData docData = dataModel.Encode (NSStringEncoding.UTF8);
          return docData;





          Saving iCloud Documents




          var docsFolder = Path.Combine (iCloudUrl.Path, "Documents"); // NOTE: Documents 
          folder is user-accessible in Settings
          var docPath = Path.Combine (docsFolder, MonkeyDocFilename);
          var ubiq = new NSUrl (docPath, false);
          var monkeyDoc = new MonkeyDocument (ubiq);
          monkeyDoc.Save (monkeyDoc.FileUrl, UIDocumentSaveOperation.ForCreating, saveSuccess => {
          Console.WriteLine ("Save completion:" + saveSuccess);
          if (saveSuccess)
          monkeyDoc.Open (openSuccess =>
          Console.WriteLine ("Open completion:" + openSuccess);
          if (openSuccess)
          Console.WriteLine ("new document for iCloud");
          Console.WriteLine (" == " + monkeyDoc.DocumentString);
          viewController.DisplayDocument (monkeyDoc);
          else
          Console.WriteLine ("couldn't open");

          );
          else
          Console.WriteLine ("couldn't save");



          For more detail about iCloud you can refer here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 19 '18 at 6:02









          Lucas Zhang - MSFTLucas Zhang - MSFT

          2,7512210




          2,7512210












          • thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

            – amnk
            Nov 19 '18 at 14:40












          • Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

            – Lucas Zhang - MSFT
            Nov 20 '18 at 0:23











          • yes i had download it and tried to run. after that i am getting that error

            – amnk
            Nov 20 '18 at 2:46











          • Delete the folder bin and obj,then rebuild the project

            – Lucas Zhang - MSFT
            Nov 20 '18 at 2:47











          • Tried it same error again.

            – amnk
            Nov 20 '18 at 3:17

















          • thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

            – amnk
            Nov 19 '18 at 14:40












          • Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

            – Lucas Zhang - MSFT
            Nov 20 '18 at 0:23











          • yes i had download it and tried to run. after that i am getting that error

            – amnk
            Nov 20 '18 at 2:46











          • Delete the folder bin and obj,then rebuild the project

            – Lucas Zhang - MSFT
            Nov 20 '18 at 2:47











          • Tried it same error again.

            – amnk
            Nov 20 '18 at 3:17
















          thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

          – amnk
          Nov 19 '18 at 14:40






          thanks i tried it. when i run this code i am getting this error. MSB4057: The target "GetAppBundleDir" does not exist in the project.

          – amnk
          Nov 19 '18 at 14:40














          Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

          – Lucas Zhang - MSFT
          Nov 20 '18 at 0:23





          Did you try to build the sample on github github.com/xamarin/Seminars/tree/master/2012-03-22-iCloud/…?

          – Lucas Zhang - MSFT
          Nov 20 '18 at 0:23













          yes i had download it and tried to run. after that i am getting that error

          – amnk
          Nov 20 '18 at 2:46





          yes i had download it and tried to run. after that i am getting that error

          – amnk
          Nov 20 '18 at 2:46













          Delete the folder bin and obj,then rebuild the project

          – Lucas Zhang - MSFT
          Nov 20 '18 at 2:47





          Delete the folder bin and obj,then rebuild the project

          – Lucas Zhang - MSFT
          Nov 20 '18 at 2:47













          Tried it same error again.

          – amnk
          Nov 20 '18 at 3:17





          Tried it same error again.

          – amnk
          Nov 20 '18 at 3:17



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53332189%2fhow-to-upload-and-download-files-to-icloud-in-xamarin-ios%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          政党

          天津地下鉄3号線