التشغيل على المحاكي والجهاز
ابنِ تطبيقك وشغّله على محاكي iOS
التشغيل على المحاكي والجهاز درس مجاني في SwiftUI Academy على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في SwiftUI Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة SwiftUI Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Run Your App
The canvas is great, but to feel the real thing you run your app. Xcode builds it and launches it like a user would. 🚀
The iOS Simulator
The simulator is a virtual iPhone on your Mac. It lets you test your app without owning every physical device.
Pick a Device
In the toolbar, use the scheme menu to choose a simulator like iPhone 15. This sets where your app will launch when you run it.
Press Run
Click the Run button, the triangular play icon, or press Command-R. Xcode compiles your code and boots the simulator for you.
First Build Takes Time
The first build can be slow as Xcode compiles everything. Later runs are much faster because it only rebuilds what changed.
Interact With It
Once it launches, tap and swipe in the simulator like a real phone. Use your mouse or trackpad to test every interaction. 🖐️
Stop the App
The square Stop button ends the running app. Stop and run again whenever you want a fresh launch of your latest code.
Read the Console
At the bottom, the console shows logs and any print output from your app. It is the first place to look when something misbehaves.
print("App launched!")Running on a Real Device
Plug in an iPhone and pick it in the scheme menu to run on a real device. Real hardware shows true performance and gestures.
Sign In With Apple ID
For device runs, Xcode needs a free Apple ID in Settings to sign the app. This trusts your build so the iPhone will open it.
Simulator vs Device
Use the simulator for fast everyday testing, and a real device before release to catch issues only true hardware reveals.
Quick Check
What is the simulator used for during development?
Recap
You can now run your app: pick a simulator or device, press Run, interact, and watch the console. Your first app is alive! 🎉
الأسئلة الشائعة
هل درس «التشغيل على المحاكي والجهاز» مجاني؟
نعم — نص درس «التشغيل على المحاكي والجهاز» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة SwiftUI Academy، انتقل إلى CoddyKit PRO. تتضمن دورة SwiftUI Academy 4 دروس في المجموع.
ماذا ستتعلم في «التشغيل على المحاكي والجهاز»؟
ابنِ تطبيقك وشغّله على محاكي iOS تتمرن على SwiftUI Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ SwiftUI Academy؟
لا تُشترط خبرة سابقة. SwiftUI Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.
كم من الوقت يستغرق درس «التشغيل على المحاكي والجهاز»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس SwiftUI Academy هذا؟
نعم. كل درس في SwiftUI Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- تثبيت Xcode وإنشاء مشروع
- بنية ملف تطبيق SwiftUI
- لوحة المعاينة المباشرة
- التشغيل على المحاكي والجهاز