Open Ender-Wang opened 7 months ago
虽说GoMobile和Flutter理论上支持,但我没有IOS的开发设备😂
---原始邮件--- 发件人: "Rui @.> 发送时间: 2024年2月12日(周一) 凌晨1:47 收件人: @.>; 抄送: @.***>; 主题: [jing332/AListFlutter] 既然都Flutter了,那iOS版本安排上? (Issue #7)
既然都用Flutter写了,能否考虑下出iOS版本,最好上架App Store,不能的话有源码以及自己用Xcode打包的流程图也是可以的,虽然每隔七天都要自己重新签名,不过有时候短期出门自己打包一个还是挺管用的。
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
最近看到一个ts版本的,而且还苹果商店上架了,想着go版本的能不能做起来哈哈哈哈,你可以先加一下iOS的框架然后改一下iOS的逻辑?我刚刚试了下加了之后app能跑起来,但是里面alist报错,因为调用了安卓的东西(可能你app里得加一下iOS分支的逻辑),我可以帮你测试
然后点开始之后报错了:
从跑起来之后到第一个动作点击这个按钮之后的报错:
❯ flutter run
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 2,082ms
Xcode build done. 10.8s
Syncing files to device iPhone 15 Pro Max... 37ms
Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).
A Dart VM Service on iPhone 15 Pro Max is available at: http://127.0.0.1:61439/9Ys8fddnEoM=/
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.isAutoOpenWebPageEnabled"., null, null)
#0 AppConfig.isAutoOpenWebPageEnabled (package:alist_flutter/generated_api.dart:195:7)
<asynchronous suspension>
#1 _MainController.onInit (package:alist_flutter/main.dart:135:21)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.Android.getAListVersion"., null, null)
#0 Android.getAListVersion (package:alist_flutter/generated_api.dart:478:7)
<asynchronous suspension>
#1 AListController.onInit.<anonymous closure> (package:alist_flutter/pages/alist/alist.dart:128:38)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.Android.isRunning"., null, null)
#0 Android.isRunning (package:alist_flutter/generated_api.dart:397:7)
<asynchronous suspension>
#1 AListController.onInit.<anonymous closure> (package:alist_flutter/pages/alist/alist.dart:129:32)
<asynchronous suspension>
The Flutter DevTools debugger and profiler on iPhone 15 Pro Max is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:61439/9Ys8fddnEoM=/
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.Android.getAListHttpPort"., null, null)
#0 Android.getAListHttpPort (package:alist_flutter/generated_api.dart:370:7)
<asynchronous suspension>
#1 WebScreenState.initState.<anonymous closure> (package:alist_flutter/pages/web/web.dart:39:15)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.isAutoCheckUpdateEnabled"., null, null)
#0 AppConfig.isAutoCheckUpdateEnabled (package:alist_flutter/generated_api.dart:146:7)
<asynchronous suspension>
#1 _SettingsController.updateData.<anonymous closure> (package:alist_flutter/pages/settings/settings.dart:204:41)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.isWakeLockEnabled"., null, null)
#0 AppConfig.isWakeLockEnabled (package:alist_flutter/generated_api.dart:48:7)
<asynchronous suspension>
#1 _SettingsController.updateData.<anonymous closure> (package:alist_flutter/pages/settings/settings.dart:205:34)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.isStartAtBootEnabled"., null, null)
#0 AppConfig.isStartAtBootEnabled (package:alist_flutter/generated_api.dart:97:7)
<asynchronous suspension>
#1 _SettingsController.updateData.<anonymous closure> (package:alist_flutter/pages/settings/settings.dart:206:37)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.isAutoOpenWebPageEnabled"., null, null)
#0 AppConfig.isAutoOpenWebPageEnabled (package:alist_flutter/generated_api.dart:195:7)
<asynchronous suspension>
#1 _SettingsController.updateData.<anonymous closure> (package:alist_flutter/pages/settings/settings.dart:207:41)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.AppConfig.getDataDir"., null, null)
#0 AppConfig.getDataDir (package:alist_flutter/generated_api.dart:244:7)
<asynchronous suspension>
#1 _SettingsController.updateData (package:alist_flutter/pages/settings/settings.dart:209:22)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.alist_flutter.Android.startService"., null, null)
#0 Android.startService (package:alist_flutter/generated_api.dart:326:7)
<asynchronous suspension>
尝试了两天天,没有编译通过,啊我死了
use of internal package github.com/alist-org/alist/v3/internal/bootstrap not allowed
你需要在Native端 实现以下接口:pigeons/pigeon.dart Pigeon参考教程:https://juejin.cn/post/7006554771674906637
奥我搞错了,你是卡在了gomobile吧
我自己写了一个go.mod, gomobile能编译通过,但是PC端过不了。
gobind-ios.sh
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$SCRIPT_DIR/../alistlib" || exit
gomobile bind -v -iosversion 11.0 -target=ios
/bin/bash /Volumes/DATA/Projects/AListFlutter/alist-lib/scripts/gobind-ios.sh
gomobile: err: exit status 1: stderr: go: cannot find main module, but found .git/config in /Volumes/DATA/Projects/AListFlutter
to create a module there, run:
cd ../.. && go mod init
也许我应该增加一个go.mod
也许是因为go或者gomobile已经更新了,新版本无法用访问internal
不应该找不到go.mod啊,你执行 init_alist.sh 了吗?
不应该找不到go.mod啊,你执行 init_alist.sh 了吗?
应该不是这个问题吧,报错像是iOS platform没配置好,可能是这个:
需要import一下goMobile的产物,然后设置一个channel
niuhuan/pikapika@master/ios/Runner/AppDelegate.swift#L22C13-L22C20
有空我试试这个
尝试了两天天,没有编译通过,啊我死了
use of internal package github.com/alist-org/alist/v3/internal/bootstrap not allowed
一般来说internal的东西不拿不到吧,应该是没export的,可能得查查alist的dev doc看看iOS平台怎么处理的
按照owner说的步骤,我已经编译好了iOS的依赖库,正准备实现channel,但是我在安卓上,并不能成功运行AList,只是编译并安装
E/GoLog ( 1802): INFO[2024-08-16 05:43:04] load config from env with prefix: ALIST_
E/GoLog ( 1802): INFO[2024-08-16 05:43:04] init logrus...
I/GoLog ( 1802): WARN[2024-08-16 05:43:04] not enable search
D/AList ( 1802): onLog: 4, 1723786984069, init tool 115 Cloud success: ok
D/AList ( 1802): onLog: 3, 1723786984085, init tool aria2 failed: failed get aria2 version: Post "http://localhost:6800/jsonrpc": dial tcp 127.0.0.1:6800: connect: connection refused
D/AList ( 1802): onLog: 4, 1723786984085, init tool SimpleHttp success: ok
D/AList ( 1802): onLog: 3, 1723786984092, init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp 127.0.0.1:8080: connect: connection refused
D/AList ( 1802): onLog: 4, 1723786984093, init tool pikpak success: ok
D/AList ( 1802): onLog: 1, 1723786984096, index.html not exist, you may forget to put dist of frontend to public/dist
D/AList ( 1802): onLog: 1, 1723786984097, failed to read index.html: open index.html: file does not exist
E/Go ( 1802): panic: runtime error: invalid memory address or nil pointer dereference
E/GoLog ( 1802): panic: runtime error: invalid memory address or nil pointer dereference
E/Go ( 1802): panic: runtime error: invalid memory address or nil pointer dereference
E/Go ( 1802): [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x74607c0170]
F/libc ( 1802): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 1802 (32.alistflutter), pid 1802 (32.alistflutter)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/sdk_phone64_arm64/emulator64_arm64:12/SE1A.220621.001/8752307:userdebug/test-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-08-16 13:43:05.410062141+0800
Process uptime: 0s
Cmdline: com.github.jing332.alistflutter
pid: 1802, tid: 1802, name: 32.alistflutter >>> com.github.jing332.alistflutter <<<
uid: 10119
tagged_addr_ctrl: 0000000000000001
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
x0 0000000000000000 x1 000000000000070a x2 0000000000000006 x3 0000000000000008
x4 0000000000000001 x5 0000000000000002 x6 0000000000000000 x7 0000000000000000
x8 0000000000000083 x9 000000000000004c x10 0000000000064489 x11 00000077c754e038
x12 00000077c754e030 x13 000000007fffffff x14 00000000045f1bc6 x15 000036e5210520bf
x16 0000007fe7e0e970 x17 0000000029aaaaab x18 00000077c6f16000 x19 000000000000070a
x20 0000007fe7f05360 x21 0000004000062008 x22 0000000000000001 x23 b40000768f053430
一般来说internal的东西不拿不到吧,应该是没export的,可能得查查alist的dev doc看看iOS平台怎么处理的
你没下载web前端,执行下 init_web.sh
---原始邮件--- 发件人: @.> 发送时间: 2024年8月16日(周五) 晚上7:28 收件人: @.>; 抄送: @.**@.>; 主题: Re: [jing332/AListFlutter] 既然都Flutter了,那iOS版本安排上? (Issue #7)
按照owner说的步骤,我已经编译好了iOS的依赖库,正准备实现channel,但是我在安卓上,并不能成功运行AList,只是编译并安装
E/GoLog ( 1802): INFO[2024-08-16 05:43:04] load config from env with prefix: ALIST_ E/GoLog ( 1802): INFO[2024-08-16 05:43:04] init logrus... I/GoLog ( 1802): WARN[2024-08-16 05:43:04] not enable search D/AList ( 1802): onLog: 4, 1723786984069, init tool 115 Cloud success: ok D/AList ( 1802): onLog: 3, 1723786984085, init tool aria2 failed: failed get aria2 version: Post "http://localhost:6800/jsonrpc": dial tcp 127.0.0.1:6800: connect: connection refused D/AList ( 1802): onLog: 4, 1723786984085, init tool SimpleHttp success: ok D/AList ( 1802): onLog: 3, 1723786984092, init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp 127.0.0.1:8080: connect: connection refused D/AList ( 1802): onLog: 4, 1723786984093, init tool pikpak success: ok D/AList ( 1802): onLog: 1, 1723786984096, index.html not exist, you may forget to put dist of frontend to public/dist D/AList ( 1802): onLog: 1, 1723786984097, failed to read index.html: open index.html: file does not exist E/Go ( 1802): panic: runtime error: invalid memory address or nil pointer dereference E/GoLog ( 1802): panic: runtime error: invalid memory address or nil pointer dereference E/Go ( 1802): panic: runtime error: invalid memory address or nil pointer dereference E/Go ( 1802): [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x74607c0170] F/libc ( 1802): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 1802 (32.alistflutter), pid 1802 (32.alistflutter) Build fingerprint: 'Android/sdk_phone64_arm64/emulator64_arm64:12/SE1A.220621.001/8752307:userdebug/test-keys' Revision: '0' ABI: 'arm64' Timestamp: 2024-08-16 13:43:05.410062141+0800 Process uptime: 0s Cmdline: com.github.jing332.alistflutter pid: 1802, tid: 1802, name: 32.alistflutter >>> com.github.jing332.alistflutter <<< uid: 10119 tagged_addr_ctrl: 0000000000000001 signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- x0 0000000000000000 x1 000000000000070a x2 0000000000000006 x3 0000000000000008 x4 0000000000000001 x5 0000000000000002 x6 0000000000000000 x7 0000000000000000 x8 0000000000000083 x9 000000000000004c x10 0000000000064489 x11 00000077c754e038 x12 00000077c754e030 x13 000000007fffffff x14 00000000045f1bc6 x15 000036e5210520bf x16 0000007fe7e0e970 x17 0000000029aaaaab x18 00000077c6f16000 x19 000000000000070a x20 0000007fe7f05360 x21 0000004000062008 x22 0000000000000001 x23 b40000768f053430
一般来说internal的东西不拿不到吧,应该是没export的,可能得查查alist的dev doc看看iOS平台怎么处理的
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
依赖包不支持ios, 我放弃了
依赖包不支持ios, 我放弃了
gg,难不成AlistServer作者自己手搓了一个AList😂太牛了
依赖包不支持ios, 我放弃了
gg,难不成AlistServer作者自己手搓了一个AList😂太牛了
我看了下 gopsutil 库是获取cpu硬盘之类信息的,想来不是很重要。解决办法也是有的,替换为自己修改后的 gopsutil 库,就像之前为了解决文件创建时间的Issue,https://github.com/jing332/AListFlutter/blob/master/alist-lib/scripts/init_alist.sh#L16
依赖包不支持ios, 我放弃了
gg,难不成AlistServer作者自己手搓了一个AList😂太牛了
我看了下 gopsutil 库是获取cpu硬盘之类信息的,想来不是很重要。解决办法也是有的,替换为自己修改后的 gopsutil 库,就像之前为了解决文件创建时间的Issue,
master
/alist-lib/scripts/init_alist.sh#L16
应该是支持iOS的,我看git都可以搜索到好几个用alist+flutter打包 ipa的,我最近在做研究生毕设,没空😂
已有大佬支持IOS:Pull https://github.com/jing332/AListFlutter/pull/47
merge之后build workflow加一份无签名的ipa,然后用altstore+shortcuts automation自动每周签名就不用担心ipa过期了
既然都用Flutter写了,能否考虑下出iOS版本,最好上架App Store,不能的话有源码以及自己用Xcode打包的流程图也是可以的,虽然每隔七天都要自己重新签名,不过有时候短期出门自己打包一个还是挺管用的。