Fixed 'open in' iOS 9. Contributors: josemanuelbd & Rovi23. It also works in iOS 8.

This commit is contained in:
Jose Bermudo 2015-09-23 17:55:19 +02:00
parent 01c0900696
commit ac17d43271

View File

@ -43,12 +43,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
NSString *uti = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)fileExt, NULL); NSString *uti = (__bridge NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)fileExt, NULL);
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
//NSLog(@"path %@, uti:%@", path, uti); NSLog(@"TRAZAAAAAAAA");
NSLog(@"path %@, uti:%@", path, uti);
NSURL *fileURL = nil; NSURL *fileURL = nil;
//fileURL = [NSURL URLWithString:path]; //fileURL = [NSURL URLWithString:path];
fileURL = [NSURL fileURLWithPath:path]; fileURL = [NSURL fileURLWithPath:path];
NSLog(@"%@",fileURL);
localFile = fileURL.path; localFile = fileURL.path;
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{