Update MediaClient

This commit is contained in:
2026-03-28 11:39:04 +11:00
parent 24dc6c7cd0
commit f3266566eb
1284 changed files with 462406 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#include "ios_launcher.h"
#include "file_view_controller.h"
#include <QString>
#import <UIKit/UIDocumentInteractionController.h>
bool iosLaunchFile(QString file)
{
NSString* url = file.toNSString();
NSURL* fileURL = [NSURL fileURLWithPath:url];
static DocViewController* mtv = nil;
if (mtv!=nil)
{
[mtv removeFromParentViewController];
[mtv release];
}
UIDocumentInteractionController* documentInteractionController = nil;
documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL];
UIViewController* rootv = [[[[UIApplication sharedApplication]windows] firstObject]rootViewController];
if (rootv!=nil)
{
mtv = [[DocViewController alloc] init];
[rootv addChildViewController:mtv];
documentInteractionController.delegate = mtv;
[documentInteractionController presentPreviewAnimated:NO];
return true;
}
return false;
}