aaaa
This commit is contained in:
@@ -64,6 +64,24 @@ public class IOSLauncher extends IOSApplication.Delegate{
|
|||||||
try{
|
try{
|
||||||
coord.coordinateReadingItem(documentURLs.get(0), NSFileCoordinatorReadingOptions.None, url -> {
|
coord.coordinateReadingItem(documentURLs.get(0), NSFileCoordinatorReadingOptions.None, url -> {
|
||||||
if(url.startAccessingSecurityScopedResource()){
|
if(url.startAccessingSecurityScopedResource()){
|
||||||
|
try{
|
||||||
|
controller.importDocument(url, new NSURL(getDocumentsDirectory() + "/document"), UIDocumentBrowserImportMode.Copy, (result, error) -> {
|
||||||
|
if(error != null){
|
||||||
|
ui.showErrorMessage("Import error.\n" + error.getLocalizedFailureReason() + "\n" + error.getLocalizedDescription());
|
||||||
|
}else{
|
||||||
|
try{
|
||||||
|
cons.get(Core.files.absolute(url.getPath()));
|
||||||
|
}catch(Throwable t){
|
||||||
|
ui.showException(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}catch(Throwable t){
|
||||||
|
ui.showException(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
try{
|
try{
|
||||||
int[] tread = {0};
|
int[] tread = {0};
|
||||||
|
|
||||||
@@ -106,7 +124,7 @@ public class IOSLauncher extends IOSApplication.Delegate{
|
|||||||
ui.showException(t3);
|
ui.showException(t3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}else{
|
}else{
|
||||||
ui.showErrorMessage("Failed to access file.");
|
ui.showErrorMessage("Failed to access file.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user