【发布时间】:2017-07-04 11:46:39
【问题描述】:
我正在使用以下代码将文件/图像共享给使用 xamarin ios 的其他应用程序。但它不能正常工作。没有例外。代码正确执行。但应用列表未启动。下面的代码有什么问题?我们需要在项目中做任何配置设置更改吗?
var documentName = shortName + ".pdf";
var ContentPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
var fullFilename = Path.Combine(ContentPath, documentName);
NSData dataToShare = NSFileManager.DefaultManager.Contents(fullFilename);
var items = new NSObject[] { dataToShare };
var controller = new UIActivityViewController(items, null);
UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(controller, true, null);
【问题讨论】:
-
任何想法,如何让它工作?
标签: xamarin.ios sharing file-sharing