adam-gui/vendor/fyne.io/fyne/v2/app/app_mobile_ios.m

17 lines
492 B
Mathematica
Raw Permalink Normal View History

2024-04-29 19:13:50 +02:00
//go:build !ci && ios
// +build !ci,ios
#import <UIKit/UIKit.h>
void openURL(char *urlStr) {
UIApplication *app = [UIApplication sharedApplication];
NSURL *url = [NSURL URLWithString:[NSString stringWithUTF8String:urlStr]];
[app openURL:url options:@{} completionHandler:nil];
}
char *documentsPath() {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *path = paths.firstObject;
return [path UTF8String];
}