forked from Nexus/nexus
feat: Add iOS platform support (#60)
Co-authored-by: Henry-Hiles <henry@henryhiles.com> Reviewed-on: Nexus/nexus#60
This commit is contained in:
parent
bf31f5510a
commit
7bb4d87638
66 changed files with 1699 additions and 58 deletions
|
|
@ -48,7 +48,7 @@ class ClientController extends AsyncNotifier<int> {
|
|||
@override
|
||||
Future<int> build() async {
|
||||
final Pointer<Char> root;
|
||||
if (Platform.isAndroid) {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
final dir = await getApplicationSupportDirectory();
|
||||
root = "${dir.path}/gomuks".toNativeUtf8().cast();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
import "dart:io";
|
||||
|
||||
Future<String> getXCodeSDK() async {
|
||||
final result = await Process.run("xcrun", ["--show-sdk-path"]);
|
||||
Future<String> getXCodeTool({String? sdkType, String? findTool}) async {
|
||||
final result = await Process.run("xcrun", [
|
||||
if (sdkType != null) ...["--sdk", sdkType],
|
||||
if (findTool != null) ...["-f", findTool] else "--show-sdk-path",
|
||||
]);
|
||||
|
||||
if (result.exitCode != 0) {
|
||||
throw Exception("Failed to get XCode SDK\n${result.stderr}");
|
||||
throw Exception("Failed to get ${sdkType ?? "XCode"} ${findTool ?? "SDK"}");
|
||||
}
|
||||
|
||||
return result.stdout.trim();
|
||||
return result.stdout.toString().trim();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue