Titanium 是否可以将 iPhone 应用程序转换为 Android 应用程序?
我正在与某人谈论 iPhone 和 Android 应用程序,他们说有一种叫做“Titanium”的东西可以将 iPhone 应用程序转换为 Android 应用程序,反之亦然;由于它们是用不同的语言编写的(以及其他细微差别),我发现这有点难以置信。
我假设他的意思是这个
据我所知,您无法将现有应用程序从一个应用程序“转换”为另一个应用程序,但如果您基于此 API 构建一个 iPhone 应用程序,那么它可以转换为另一个应用程序吗?
我的想法正确吗?
I was talking with someone about iPhone and Android apps and they said there was something around called "Titanium" that could convert an iPhone app to an Android app and vice versa; being that they are written in different languages (amongst other nuances) I found this a little hard to believe.
I'm assuming he meant this
From what I can understand, you can't "convert" an existing app from one to the other, but if you build an iPhone app based off of this API THEN it can be converted to the other?
Am I right in my thinking?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你几乎是对的。在 Titanium 中,您使用 JavaScript(以及用于 webviews 的 HTML/CSS - 某种网页)构建应用程序,并将其转换为两个平台的本机代码 - 用于 iOS 的 Obj C 和用于 Android 的 Java。但是,您仍然需要编写大量特定于平台的代码,因为并非所有内容都可以在两个平台上立即运行。是的 - 您不能将使用 Titanium 的现有应用程序转换为任何内容。
You're almost right. In Titanium you build your app using JavaScript (and HTML/CSS for webviews - sort of webpages) and it converts it to native code for both platforms - Obj C for iOS and Java for Android. However you still need to write a significant amount of platform specific code because not everything will work right out of the box on both platforms. And yes - you can not convert existing apps using Titanium to anything.
“转换”这个词在描述 Titanium Mobile 的功能时并不准确。您不“基于此 API 构建 iPhone 应用程序”,您使用 Ti API(基于 Javascript/HTML/CSS)编写您的应用程序,并且当您编译该应用程序时最终得到一个本机 iOS 应用程序包和一个本机 Android 应用程序包。
The word "convert" is inaccurate in describing what Titanium Mobile does. You don't "build an iPhone app based off of this API", you write your app using the Ti API (which is based in Javascript/HTML/CSS), and when you compile that app you end up with both a native iOS app package and a native Android app package.