简体   繁体   English

iOS 和 Android 都支持什么编程语言?

[英]What programming language(s) does both iOS and Android support?

I want to make a mobile app, but I app very new to the field.我想制作一个移动应用程序,但我对这个领域的应用程序还很陌生。 I am looking for what language I should go for.我正在寻找我应该使用 go 的哪种语言。 I know that iOS supports Swift and Objective-C. Android supports a range of languages, but Kotlin or Java are best.我知道 iOS 支持 Swift 和 Objective-C。Android 支持多种语言,但 Kotlin 或 Java 是最好的。 However, it seems that C# is supported on both iOS and Android (but I can't find a solid statement).但是,iOS 和 Android似乎都支持 C#(但我找不到可靠的声明)。 I am also open to (free) converters.我也对(免费)转换器开放。 In terms of the app, I have these requirements:在应用程序方面,我有以下要求:

  • Make HTTP/HTTPS requests发出 HTTP/HTTPS 请求
  • Text rendering文字渲染
  • Basic Audio Capabilities基本音频功能
  • Image Rendering图像渲染
  • Buttons (optional)按钮(可选)

What would be the optimal language?什么是最佳语言? I don't want an opinion as much as I want a simple list.我不想要一个意见,就像我想要一个简单的列表一样。 If there is no such language that supports both systems, what would be the easiest two languages to port between?如果没有支持这两种系统的语言,那么最容易移植的两种语言是什么? Thanks in advance!提前致谢!

Let prefer Flutter framework (Dart language), by Google.让我们更喜欢 Google 的Flutter框架(Dart 语言)。 It is quite similar with web development but support multi platforms.与 web 开发非常相似,但支持多平台。

https://flutter.dev/ https://flutter.dev/

There are two good cross platforms for developing application on both ios and androidiosandroid上有两个很好的跨平台开发应用程序

  • Flutter Flutter
  • KMM (kotlin multiplateform mobile) KMM(kotlin 多平台移动)

Flutter uses dart language and KMM uses Kotlin language for development. Flutter 使用dart language ,KMM 使用Kotlin language进行开发。

flutter is evolving rapidly while KMM is getting attraction of developers after the release of android jetpack compose. flutter 发展迅速,而 KMM 在 android jetpack compose 发布后受到开发者的青睐。

Generally speaking, there are 3 popular options, with widespread use and community support:一般来说,有 3 种流行的选项,具有广泛的使用和社区支持:

  1. Flutter framework (uses Dart) Flutter框架(使用 Dart)
  2. React Native (uses JS) React Native (使用 JS)
  3. Kotlin Multiplatform (business logic in Kotlin, UI can be drawn natively for the platform) Kotlin Multiplatform (Kotlin中的业务逻辑,UI可以为平台原生绘制)

If you're still not satisfied with these frameworks, other options would be:如果您仍然对这些框架不满意,其他选择是:

  1. Xamarin (uses .NET/C#) Xamarin (使用 .NET/C#)
  2. Ionic (uses JS)离子(使用 JS)

It is also possible to use c++ both for Android and iOS.也可以将c++用于 Android 和 iOS。

Meanwhile most of the code can be shared between different platforms, there could be platform specific differences;同时大部分代码可以在不同平台之间共享,可能存在平台特定差异; like hardware accelerated graphics, permission handling or file handling.例如硬件加速图形、权限处理或文件处理。

Starting points:出发点:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM