8 مايو 2026

بنى تطبيق ماك وما يكتب سطر كود — He Built A Mac App With Zero Code

بنى تطبيق ماك وما يكتب سطر كود
كيف صارت فكرة بسيطة تطبيقاً حقيقياً على الماك، بدون أي خلفية برمجية من الأساس.
 
شخص عادي، ما عنده أي خلفية برمجية، قرر يحل مشكلة تعبه منها: انحناء ظهره على الكمبيوتر لساعات طويلة. الفكرة كانت واضحة، يستخدم حساسات الحركة الموجودة في AirPods Pro لرصد وضعية رأسه، ولو انحنى أكثر من اللازم يجي تنبيه على الشاشة. المشكلة إنه ما يعرف Swift ولا يعرف أي شيء عن برمجة تطبيقات الماك. الحل كان إنه وصف اللي يبيه لـ Claude، وClaude كتب كل شيء من الصفر.
 
🧩 إيش هو بالضبط
 
المشروع هو تطبيق ماك حقيقي مكتوب بلغة Swift، يتصل بـ API اسمه CMHeadphoneMotionManager وهو الباب البرمجي الرسمي من Apple اللي يسمح لأي تطبيق يقرأ بيانات الحركة من سماعات AirPods Pro. التطبيق يراقب زاوية رأسك أثناء الجلوس، ولو انحنى رأسك للأمام أكثر من الحد الطبيعي لفترة معينة، يرسل إشعاراً على الشاشة وبس.
 
فكّر فيه كحساس دخان لوضعيتك. يشتغل في الخلفية بصمت تام، يقيس شيئاً ما تقدر تقيسه بنفسك، ويزعجك بس لما يكون في شيء يستحق الانتباه. الـ API هذا موجود من سنوات في نظام الماك، بس قبل ما يصير الذكاء الاصطناعي (AI) بهذا المستوى، ما كان أحد غير المطورين يقدر يوصله.
 
⚙️ كيف يشتغل
 
الشخص ما كتب حرفاً واحداً من الكود بنفسه. كل اللي فعله هو إنه وصف الفكرة لـ Claude بتفصيل كافٍ، وتركه يبني. العملية كانت هكذا تقريباً:
 
1️⃣ فتح Claude وكتب الوصف بالتفصيل: أبي تطبيق ماك يقرأ بيانات الحركة من AirPods Pro، يحسب زاوية رأسي للأمام، ولو تجاوزت 30 درجة لأكثر من 10 ثواني يرسل إشعاراً.
2️⃣ Claude أعطاه كود Swift كامل، بما فيه الاتصال بـ CMHeadphoneMotionManager وحساب الزاوية وإرسال الإشعار من نظام الماك.
3️⃣ الشخص فتح Xcode، أنشأ مشروعاً جديداً، لصق الكود في الملف الرئيسي، وضغط Run.
4️⃣ لما ظهر خطأ، نسخ نص الخطأ بالكامل وأرسله لـ Claude اللي صلّح الكود وشرح السبب.
5️⃣ التطبيق اشتغل. فعلاً اشتغل. وظهرت أيقونته في الـ menu bar.
 
الجميل في هذا الأسلوب إنه ما يحتاج تفهم الكود أبداً. كل اللي تحتاجه هو تعرف توصف اللي تبيه بوضوح، وتقدر تنسخ وتلصق، وتعرف تقرأ رسالة الخطأ وترسلها كما هي.
 
🌍 وين تشوفه في حياتك
 
هذا النوع من المشاريع، تطبيقات صغيرة تحل مشكلة شخصية محددة، صار أكثر الأشياء اللي يبنيها الناس بمساعدة الذكاء الاصطناعي. أمثلة من الواقع اليومي:
 
🔔 تطبيق menu bar يذكّرك تشرب ماء أو تقوم من كرسيك كل ساعة
📁 سكريبت يرتب ملفاتك تلقائياً حسب النوع والتاريخ بمجرد ما تحطها في مجلد معين
🎙️ أداة تحوّل ملاحظاتك الصوتية إلى نص منظّم وترسله لـ Notion تلقائياً
🖥️ تطبيق يراقب استهلاك المعالج والرام ويرسل تنبيهاً لو تجاوز حد معين
 
القاسم المشترك بين كل هذي المشاريع هو وصف واضح للمشكلة، Claude يكتب الكود، وصبر كافٍ على خطوة اللصق والتشغيل.
 
🛠️ الأدوات اللي تستخدمها فعلاً
 
🔧 Claude
هو الذكاء الاصطناعي اللي كتب كل سطر في التطبيق. تعطيه وصفاً واضحاً ويعطيك كوداً جاهزاً. يقدر يكتب Swift وPython وJavaScript وأي لغة ثانية، ويصلّح أخطاءه لو أريته رسالة الخطأ.
كيف تبدأ:
1️⃣ روح على claude.ai وسجّل حساباً مجانياً
2️⃣ ابدأ محادثة جديدة واوصف فكرتك بالتفصيل وكأنك تشرح لشخص ذكي ما يعرف مشروعك
3️⃣ اطلب منه يكتب الكود كاملاً في ملف واحد مع شرح كيف تشغّله في Xcode
 
🔧 Xcode
بيئة التطوير (IDE) الرسمية من Apple لتطبيقات الماك والـ iPhone. ما تحتاج تفهمها بعمق. كل اللي تحتاجه هو تعرف تفتح مشروعاً جديداً وتلصق الكود في المكان الصح وتضغط Run.
كيف تبدأ:
1️⃣ افتح App Store على الماك وابحث عن Xcode
2️⃣ ثبّته، حجمه تقريباً 12 جيجا، خلّه يكمل بدون ما تتدخل
3️⃣ افتح Xcode واختر Create New Project ثم macOS ثم App، والصق الكود اللي أعطاك إياه Claude في الملف الرئيسي
 
🔧 Claude Code
نسخة أقوى من Claude تشتغل مباشرة من الـ Terminal على جهازك. بدلاً من نسخ ولصق الكود يدوياً، Claude Code يكتب الملفات مباشرة في مشروعك ويعدّلها وينفّذ الأوامر. أفضل لأي مشروع أكبر من ملف واحد.
كيف تبدأ:
1️⃣ ثبّت Node.js من nodejs.org
2️⃣ افتح الـ Terminal وشغّل الأمر: npm install -g @anthropic-ai/claude-code
3️⃣ روح لمجلد مشروعك في الـ Terminal وشغّل claude وابدأ تكلمه عن اللي تبيه يبنيه
 
💡 جرّب بنفسك: خطوة بخطوة
 
نبني تطبيق ماك بسيط يعيش في الـ menu bar ويرسل تنبيهاً كل ساعة يذكّرك تقوم من كرسيك. هذا أبسط من مشروع الـ AirPods لكنه يعلمك نفس الأسلوب بالضبط.
 
1️⃣ افتح claude.ai وابدأ محادثة جديدة. اكتب هذا بالضبط: "اكتب لي تطبيق macOS بلغة SwiftUI يعيش في الـ menu bar، وكل 60 دقيقة يرسل إشعاراً يقول: حان وقت تمشي. أبيه ملف Swift واحد كامل أقدر أنسخه مباشرة في مشروع Xcode جديد من نوع macOS App."
2️⃣ Claude سيعطيك كوداً. انسخه كاملاً من أول سطر لآخر سطر.
3️⃣ افتح Xcode. من القائمة العلوية اختر File ثم New ثم Project. اختر macOS ثم App. أعطِ المشروع اسماً وتأكد إن الـ Interface محدد على SwiftUI.
4️⃣ افتح الملف الرئيسي في المشروع، احذف كل شيء فيه، والصق الكود اللي جاء من Claude.
5️⃣ اضغط زر التشغيل المثلث في أعلى Xcode. لو ظهر خطأ باللون الأحمر، انسخ نص الخطأ كاملاً وأرسله لـ Claude وقوله: "صلّح هذا الخطأ وأعطني الكود كاملاً من جديد." لصّق الكود الجديد وشغّل مرة ثانية.
6️⃣ التطبيق يشتغل وتشوف أيقونته الصغيرة في الـ menu bar. بعد ساعة بالضبط يجيك أول تنبيه.
 
وش تسوي بعد ذا
✅ فكّر في مشكلة واحدة صغيرة في يومك وحاول تكتب جملتين تصفان تطبيقاً يحلها
✅ ابحث عن "CMHeadphoneMotionManager Swift example" عشان تفهم الـ API اللي خلّى مشروع الـ AirPods ممكناً
✅ جرّب Claude Code بدل الـ chat العادي لأي مشروع أكبر من ملف واحد
 
أصعب خطوة في بناء تطبيقك الأول هي صياغة الفكرة بوضوح كافٍ، مو الكود.
 
———— English ————
 
**He Built A Mac App With Zero Code**
Proof that a clear idea and precise prompting can replace years of programming experience.
 
The person who built this app cannot read Swift. He cannot explain what a delegate is, what a class does, or why Xcode takes 12 gigabytes to install. None of that stopped him. He had a problem he wanted to solve, AirPods Pro already sitting in his ears for hours every day, and the patience to describe what he wanted with enough precision. Claude did the rest.
 
🧩 What it actually is
 
This is a real, compiled macOS application written in Swift. It uses a native Apple API called CMHeadphoneMotionManager to read live motion data from AirPods Pro. When the app detects that your head has tilted forward past a set angle for more than a few seconds, the kind of posture that builds up gradually during long desk sessions, it fires a system notification. The app sits quietly in the menu bar and does nothing else.
 
Think of it like a smoke detector for your posture. It runs in the background, measures something you cannot easily measure yourself, and only interrupts you when something needs your attention. This API has existed in macOS for years. Before AI could write code fluently, only professional developers could reach it.
 
⚙️ How it works
 
The builder never touched the code directly. What he did was describe the problem in plain language with enough detail that Claude could translate it into working software. The process looked roughly like this:
 
1️⃣ He opened Claude and wrote a precise description: read head tilt data from AirPods Pro, calculate forward angle, send a system notification when that angle exceeds 30 degrees for more than 10 seconds.
2️⃣ Claude returned complete Swift code including the connection to CMHeadphoneMotionManager, the angle calculation, and the notification logic.
3️⃣ He opened Xcode, created a new macOS project, pasted the code into the main Swift file, and pressed Run.
4️⃣ When an error appeared, he copied the full error message and sent it back to Claude, who fixed the code and explained what went wrong.
5️⃣ The app compiled, launched, and worked. A small icon appeared in the menu bar.
 
What made this possible is not that Claude is doing something mysterious. Apple already built the underlying infrastructure, the motion API, the notification system, the menu bar plumbing, and Claude knows exactly how to assemble those pieces. The builder's only job was to know what he wanted and describe it clearly enough.
 
🌍 Where you see it
 
This pattern, using AI to build small personal tools that solve specific problems, is showing up across many areas:
 
🔔 Wellness: menu bar apps that monitor movement data from AirPods or Apple Watch and send break reminders
📁 File management: scripts that automatically sort downloads, rename screenshots, or archive old documents by date
🎙️ Content work: tools that transcribe voice memos, clean them up, and push them directly to Notion or email
🖥️ System monitoring: lightweight utilities that watch CPU or memory usage and alert when something crosses a threshold
 
The common thread across all of them is a real problem, a clear description, and the willingness to paste code without needing to understand every line.
 
🛠️ Tools you actually use
 
🔧 Claude
The AI that wrote every line of the posture app. You describe what you want in plain language, Claude returns working code with explanations. It writes Swift, Python, JavaScript, and most other languages fluently, and it can fix its own errors when you show it what went wrong.
How to get started:
1️⃣ Go to claude.ai and create a free account
2️⃣ Start a new conversation and describe your app idea in as much detail as you can, as if you are explaining it to a smart person who has never heard of your project
3️⃣ Ask Claude to write the complete code as a single file and explain exactly how to run it in Xcode
 
🔧 Xcode
Apple's free development environment for Mac and iOS apps. You do not need to understand it deeply. You need to know how to create a new project, find the main Swift file, paste code into it, and press Run.
How to get started:
1️⃣ Open the App Store on your Mac and search for Xcode
2️⃣ Install it, roughly 12 GB, let it complete before opening it
3️⃣ Open Xcode, choose Create New Project, select macOS then App, give it a name, make sure Interface is set to SwiftUI, paste the code Claude gave you into the main Swift file, and run
 
🔧 Claude Code
A more capable version of Claude that runs directly in your Mac Terminal and writes files into your project folder rather than requiring copy and paste for every change. Better suited for any project that spans more than one file or needs multiple rounds of iteration.
How to get started:
1️⃣ Install Node.js from nodejs.org
2️⃣ Open Terminal and run: npm install -g @anthropic-ai/claude-code
3️⃣ Navigate to your project folder in Terminal, run the command claude, and start describing what you want to build
 
💡 Try it yourself: step by step
 
Build a Mac menu bar app that reminds you to stand up every hour. This is simpler than the AirPods posture project but teaches you the exact same workflow from start to finish.
 
1️⃣ Open claude.ai and start a new conversation. Paste this prompt exactly: "Write me a complete macOS SwiftUI app that lives in the menu bar and sends a system notification every 60 minutes that says: Time to move. Give me a single Swift file I can paste directly into a new Xcode macOS App project."
2️⃣ Copy the entire code Claude returns, from the first line to the last.
3️⃣ Open Xcode. From the top menu choose File, then New, then Project. Select macOS then App. Give the project a name and confirm that Interface is set to SwiftUI.
4️⃣ Open the main Swift file inside your new project. Delete everything in it and paste the code from Claude.
5️⃣ Press the triangular Run button at the top of Xcode. If a red error appears, copy the full error text and send it to Claude with this message: "Fix this error and give me the complete corrected code." Paste the new version in and run again.
6️⃣ The app launches, a small icon appears in your menu bar, and exactly 60 minutes later your first notification arrives.
 
What to do next
✅ Pick one specific problem in your daily routine and write two sentences describing an app that would solve it
✅ Search "CMHeadphoneMotionManager Swift" to understand the API that made the AirPods posture project possible
✅ Try Claude Code instead of the chat interface for any project that feels too big to manage one file at a time
 
The hardest part of building your first app is not the code. It is knowing clearly enough what you want to build.

الاكثر قيمة

ابدا البناء معي الآن

نجلس معا، نحلل مشكلتك، وابني لك الحل بالذكاء الاصطناعي خطوة بخطوة

60دقيقة
  • جلسة خاصة معك
  • بناء حقيقي خلال الجلسة
  • نتائج تاخذها معك فور الانتهاء
احجز جلسة بناء

مجانا 100%

استشارة مجانية حول مشكلتك

ابدا

المسار الكامل · اشتراك شهري

وصول كامل لكل الأدلة (29) بـ249 AED/شهر