Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable iOS target #496

Open
20 of 28 tasks
Him188 opened this issue Jun 27, 2024 · 10 comments
Open
20 of 28 tasks

Enable iOS target #496

Him188 opened this issue Jun 27, 2024 · 10 comments
Labels
p: ios 平台: iOS s: build 子系统: 与构建相关

Comments

@Him188
Copy link
Member

Him188 commented Jun 27, 2024

Stage 1: commonize project

  • 使用更好的 openapi client generator, 生成纯 kt 依赖 ktor 的 Bangumi API client
  • :app:shared 改为 HMPP 架构 common, ios, jvm, android, desktop. 其中 jvmandroiddesktop 的中间目标, 用于共享 JVM 平台代码
  • danmaku:api 模块改为 multiplatform
  • reorderable 不支持 ios , 需要 fork 一份到仓库里参与构建
  • file API, 要找一个库, 考虑 kotlinx.io
  • date API, 用 kotlinx.datetime
  • 找一个多平台日志库, 幸运的是无需替换引用 (因为目前日志都使用的是 :utils:slf4j-kt 模块的扩展
  • data sources 的实现用到了 Jsoup

简单替换:

  • data-sources:api
  • torrent API
  • bencode 库挪到 JVM
  • 增加 ktor ios 的依赖
  • java.util.UUID
  • URI, URL, 用 ktor
  • ConcurrentLinkedQueue 换成普通 list + 锁

Stage 2: ios platform

  • 增加 :app:ios 模块, 配置好 compose entry point 和 app entry point
  • Room Configure Room for ios #915
  • 适配平台文件路径, Context.XXXdataStore (数据, 缓存)
  • 禁用 torrent
  • 禁用自动更新和应用内下载
  • 研究签名问题
  • CI 构建 ipa #790
  • Release 自动上传附件
  • CONTRIBUTING.md 更新如何开发 iOS

Stage 3: all features

  • 实现 VideoSourceResolver (webview 解析在线数据源)
  • 实现视频播放器
  • 实现 AudioManager
  • 实现 BrightnessManager
  • Anitorrent Kotlin/Native port
@Him188 Him188 added the t: meta issue 类型: 一类问题的综合归纳 label Jun 27, 2024
@NeKoOuO
Copy link
Contributor

NeKoOuO commented Jun 27, 2024

這麼早就有IOS阿😮

@Him188
Copy link
Member Author

Him188 commented Jun 27, 2024

经常有人问能不能做 iOS 所以我就先把要做的事情列了

没有正在做, 目前也没有计划什么时候做

但是如果有人想来做, 我还是非常乐意帮助的

@Cyenoch
Copy link
Contributor

Cyenoch commented Jun 28, 2024

会是一个很复杂 很麻烦的feature

Him188 added a commit that referenced this issue Jun 30, 2024
@Him188 Him188 mentioned this issue Jul 1, 2024
@Amazon90
Copy link

Amazon90 commented Jul 2, 2024

英文有myanilist,中文有ani。
大佬雄起,期待惊喜上架😭

@NeKoOuO
Copy link
Contributor

NeKoOuO commented Jul 2, 2024

英文有myanilist,中文有ani。
大佬雄起,期待惊喜上架😭

¿我尋思這兩不完全不同東西嗎?

@Him188
Copy link
Member Author

Him188 commented Jul 2, 2024

上架是不太可能的, 最多 ipa

@NeKoOuO
Copy link
Contributor

NeKoOuO commented Jul 3, 2024

英文有myanilist,中文有ani。
大佬雄起,期待惊喜上架😭

你可以贊助他開發者帳號😂 或許有機會上架

@Him188 Him188 added the s: build 子系统: 与构建相关 label Jul 13, 2024
@Him188
Copy link
Member Author

Him188 commented Jul 27, 2024

由于这个工作量很长, 为了不让未来有两周什么都不更纯写 ios, 我考虑把工作均摊到日常中

现在起新代码多平台. 逐步 commonize

@Him188
Copy link
Member Author

Him188 commented Jul 27, 2024

Okio 的 file system 实现比 kotlinx-io 成熟, 但我实在是不想用 okio...

Him188 added a commit that referenced this issue Jul 27, 2024
…ble ios target for some utils modules

New mpp libraries applied to `:app:shared`:
- kotlinx-datetime
- kotlinx-io

ios target is now enabled for these projects:
- ``:utils:platform`: for stdlib-level platform utils like `Uuid`, `currentTimeMillis`

Commonized modules:
- :utils:platform
- :utils:io
- :utils:coroutines

For app:
- Commonized almost all IO usages to use kotlinx-io
- Commonized all datetime usages
Him188 added a commit that referenced this issue Jul 27, 2024
Him188 added a commit that referenced this issue Jul 27, 2024
Him188 added a commit that referenced this issue Jul 27, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Him188 added a commit that referenced this issue Jul 28, 2024
Ksoup depends on 3.0.0 so we have to update. Otherwise there will be missing classes.
Him188 added a commit that referenced this issue Jul 28, 2024
because Ksoup has very poor performance
@Him188
Copy link
Member Author

Him188 commented Jul 28, 2024

第一阶段完成, 现在 app shared 会构建 ios 了

@Him188 Him188 pinned this issue Jul 28, 2024
@Him188 Him188 added the p: ios 平台: iOS label Aug 28, 2024
Him188 added a commit that referenced this issue Sep 22, 2024
Him188 added a commit that referenced this issue Sep 22, 2024
@Him188 Him188 removed the t: meta issue 类型: 一类问题的综合归纳 label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: ios 平台: iOS s: build 子系统: 与构建相关
Projects
None yet
Development

No branches or pull requests

4 participants