最近有人用 scalajs 和 ionic 做过 iPhone 应用吗……?
我找到了大约十二年前有人尝试的迹象。
谢谢,
Tavin
最近有人用 scalajs 和 ionic 做过 iPhone 应用吗……?
我找到了大约十二年前有人尝试的迹象。
谢谢,
Tavin
Anyone made an iPhone application with scalajs and ionic … lately?
I came across hints of attempts roughly twelve years back.
Cheers,
Tavin
挺简单的,可以用这里介绍的 Progressive web app,Progressive web apps | MDN(https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
然后把它和 scala.js + laminar 结合起来
说实话,实际做起来不难,在不同设备上能用到什么程度 / 具体功能表现如何,取决于浏览器的支持等情况
It's fairly straightforward: try a Progressive web app, as described here: Progressive web apps | MDN (https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps)
then combine that with scala.js + laminar
Honestly, its fairly simple in practice: how well it works across different devices / particular functionality depends on browser support and so forth
我不太了解 iOS,不过按我的 Android 开发经验,把这叫作“不难”得小心一点。Android/iOS 应用起初可能看着像 Electron 桌面程序,但这种做法有不少困难,是刚开始时看不出来的。
-
屏幕尺寸和像素密度不同,有些 UI 组件就得为不同显示器准备不同版本。应用要知道自己运行在哪种手机上,并显示适合这台手机的 UI 组件。(当然,iPhone 的差异比 Android 小,但问题仍然存在)。
-
在横屏和竖屏之间,以及深色和浅色模式之间切换,会让 GUI 的正确显示更加复杂。
-
使用手机的各种设置和功能,比桌面软件要多花一些功夫。据我所知,iOS 这方面比 Android 更难,而且应用必须知道如何使用 iOS API。
-
把这种应用发布到 Apple 的商店也可能遇到困难,其中有些并非技术问题。
总之,这当然能做,只是这种做法不太流行,大概是有原因的。
i have limited iOS knowledge, but given my Android development background, I'd be cautious about describing this as “not hard”. An Android/iOS application may seem similar to an Electron desktop program at first, yet there are various difficulties with this approach which are not immediately obvious at the beginning:
-
Screen dimensions and pixel densities differ, which means that some UI components will require alternative versions for the different displays. Your application must identify the handset model it's running on and show the UI components appropriate to it. (Granted, iPhone varies less than Android here, though the issue remains).
-
Moving between landscape and portrait orientations, plus dark/light modes, further complicates rendering the GUI correctly.
-
Using the handset's various settings and capabilities takes additional effort compared with desktop software. From what I understand, iOS makes this harder than Android, and the application needs to understand the iOS API.
-
Getting this kind of application into Apple's store may present difficulties, some beyond purely technical ones.
In short, this can certainly be done, but its lack of popularity probably has explanations.
如果说的是面向多种设备的商业应用,那我完全同意
If you mean commercial applications intended for a variety of devices, then I completely agree
我通过 Java Mail API 发送消息。邮件到达后,收件箱显示的是发件地址。我想用一些文本替代这个地址。这应该是可以的,因为我收到的 facebook 邮件在收件箱里显示 "Facebook - Message title",而不是 "mail…
我的 CRM 代码在网页资源中运行,所以要获取实体数据,就得写成 这样来读取数据。 可惜用 typescript 编写时,这个表达式无法编译。现在我手动把 window.parent 加到 Xrm.Page 前面……(Xrm 类型定义已经装好了),这…
我想发送一个 Date 响应头。所需的格式如下。 这是我目前尝试的代码。