Kotlin Multiplatform Academy · درس

الأهداف: Android وiOS وDesktop وWeb وServer

المنصات التي يمكن لقاعدة Kotlin برمجية واحدة التجميع لها

الدرس 3 من 413 خطوة

الأهداف: Android وiOS وDesktop وWeb وServer درس مجاني في Kotlin Multiplatform Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Kotlin Multiplatform Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

What Is a Target

A target is a platform your Kotlin code compiles to. One shared codebase can produce builds for several targets at once. 🎯

The Android Target

Android is the most common starting target. Kotlin compiles to JVM bytecode, the same format Android apps have always used.

The iOS Target

For iOS, Kotlin compiles ahead of time into a native binary using Kotlin/Native, packaged as a framework Swift can call.

The Desktop Target

Desktop apps for Windows, macOS, and Linux run on the JVM too. The same desktop target serves all three operating systems.

The Web Target

Kotlin can target the browser by compiling to JavaScript or to WebAssembly, so shared logic runs on the web as well.

The Server Target

On the backend, Kotlin runs on the JVM server side. You can even share models and validation between your app and your API.

Declaring Targets

You list targets in your Gradle build. Each call like androidTarget adds one platform to the shared module.

kotlin {
    androidTarget()
    iosArm64()
    jvm("desktop")
}

Pick Only What You Need

You do not have to ship every target. Most teams start with just Android and iOS and add more targets only when needed.

iOS Has Variants

iOS itself has a few targets: real devices use arm64, while the simulator uses x64 or arm64 depending on your Mac.

Share the Same Source

Every target reads from your common code. That shared source set is compiled fresh for each platform you declared.

One Codebase, Many Outputs

The magic is reach: a single Kotlin codebase becomes an APK, an iOS framework, a desktop app, and more from one build.

Quick Check

Let's confirm what targets are.

Recap

Targets are the platforms you compile to: Android, iOS, desktop, web, and server. Declare only the targets your team actually needs. 🌍

البدء مجانًا

تعلم Kotlin مع معلم ذكاء اصطناعي — مجانًا

اكتب وقم بتشغيل أكوادك الفعلية في المتصفح، واحصل على مساعدة فورية من معلم ذكاء اصطناعي متاح 24/7، واستمر من حيث توقفت على الويب أو في التطبيق.

الدورات
30
الدروس
120

الأسئلة الشائعة

هل درس «الأهداف: Android وiOS وDesktop وWeb وServer» مجاني؟

نعم — نص درس «الأهداف: Android وiOS وDesktop وWeb وServer» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Kotlin Multiplatform Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Kotlin Multiplatform Academy 4 دروس في المجموع.

ماذا ستتعلم في «الأهداف: Android وiOS وDesktop وWeb وServer»؟

المنصات التي يمكن لقاعدة Kotlin برمجية واحدة التجميع لها تتمرن على Kotlin Multiplatform Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Kotlin Multiplatform Academy؟

لا تُشترط خبرة سابقة. Kotlin Multiplatform Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.

كم من الوقت يستغرق درس «الأهداف: Android وiOS وDesktop وWeb وServer»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Kotlin Multiplatform Academy هذا؟

نعم. كل درس في Kotlin Multiplatform Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. مشاركة المنطق لا الواجهة: وعد KMP
  2. KMP مقابل Flutter وReact Native
  3. الأهداف: Android وiOS وDesktop وWeb وServer
  4. ما يمكن وما لا يمكن مشاركته بعد
← العودة إلى Kotlin Multiplatform Academy