Gemma 4 + Xcode on M5 — Local AI Coding Actually Works Now

18 July 2026 · 5:30 · 440 views · by Vikramjit Sarkar

Watch on YouTubeSubscribe for the next test

The finale: Gemma 4 26B QAT — running fully local through Xcode on my 32GB M5 — tool-calls its way through my project and builds a PencilKit drawing feature into the to-do app. It runs on the iPad simulator. And when a stubborn bug survived 6 fix attempts, I discovered something Apple barely mentioned: Xcode has a built-in, FREE ChatGPT coding model — and it fixed it.

Key numbers from this test

It took time around 10 minutes of time, but it started It have generated already, you know, right now it's starting the canvas view, okay?
Uh if it will work on your 16GB MacBook M1 or not or uh if you are using any computer with RTX Nvidia uh graphics card.

Measured on my own machines (quoted from the video).

Chapters

  1. 0:00Gemma 4 tool-calling through the project (3 results, agentic loop)
  2. 0:46Generation kicks in (~10 min of thinking, then it flows)
  3. 1:01Xcode calling tools via the AI — "this is a very good sign"
  4. 1:15Why it works: Apple's orchestration + MLX agentic loop calling
  5. 1:40PencilKit! It picked Apple's own drawing framework itself
  6. 1:55The app is DONE — on screen
  7. 2:26Opening the iPad simulator
  8. 2:38Bug hunt: drawing sheet won't open — Gemma 4 tries to fix it
  9. 3:04Bug fixed… new error (missing argument)
  10. 3:296 failed attempts later…
  11. 3:38The discovery: Xcode's built-in FREE ChatGPT coding model
  12. 3:58It builds. The app runs on iPad — to-do + draw
  13. 4:15One catch: sketching needs an Apple Pencil (PencilKit)
  14. 4:30THE VERDICT: code natively, nothing leaves your MacBook
  15. 4:45Both tested: Qwen 3.6 35B ✅ Gemma 4 ✅ — Qwen works really well
  16. 4:59What next — 16GB M1? RTX 4080 on Windows? You tell me

0:00 Gemma 4 tool-calling through the project (3 results, agentic loop)

I think now we can rely on local AI by coding. It's taking a little bit of time. You know, you can see three results are there. it's already doing some tool calling and so on and so. Uh, let me go to the server once. Yeah, it's still getting token. It already called two tools, okay? so that's it. So, we have two generations out there. And uh, let me close this. You know, intelligence is already added.

It's quite fast. If I stop this OBX Studio, it will be more faster, I believe, because, you know, there is so much CPU and RAM usage is going on. Let me close it and let me see, you know, how uh, this will be It's searching the project because it's it's it's currently understanding the project view, what's there, what's not in the project, and then it will keep the full context on the AI, and then the AI will start

0:46 Generation kicks in (~10 min of thinking, then it flows)

Generating, you know, the code. All right, I'm stopping the OBX right now. So, it has the already started generating. It took time around 10 minutes of time, but it started It have generated already, you know,

1:01 Xcode calling tools via the AI — "this is a very good sign"

Right now it's starting the canvas view, okay? So, it's it's code actually calling that tool via AI models, okay? And this is a good sign. This is a very good thing. Now, you can see the, you know, how beautiful

1:15 Why it works: Apple's orchestration + MLX agentic loop calling

It looks when it uh, the Apple Intelligence coded, okay? And it is not the local AI model, it is also the Apple's orchestration, how it handles the model, how it gives the context to the model, and how it, you know, works the tools of Xcode, okay? And also, as they mentioned that MLX right now does agent loop calling, right? So, it is

1:40 PencilKit! It picked Apple's own drawing framework itself

Doing loop calling. So, it already understood what's the whole idea. Uh, yeah, like iPad drawing app, so it is using PencilKit, which is also from Apple. So, it is updating to-do item, updating to-do store, creating canvas view, and also updating content

1:55 The app is DONE — on screen

Let's see how it works. Okay, taste it obviously. Let it Let it get finished. So, it is done. And here is the app you can see on my Uh let me add new task. But I'm not understanding where is the drawing thing. Nice. Let me write something. Hi. Okay, let me open the iPad view.

2:26 Opening the iPad simulator

Uh 11-in. Okay, here you go. This is the iPad simulator. Click on here Click on draw. Okay. Okay, let's sketch now. Okay, now we cannot sketch. It's showing

2:38 Bug hunt: drawing sheet won't open — Gemma 4 tries to fix it

Sketch. Okay, I'm not able to sketch. So, let me see if it can do bug fix also. All right. So, this is a bug. Okay, let me see if it can do bug fix also. So, it's still Java code. So, when I can't draw on on tab. Fix it. I have given it a new context and let's

3:04 Bug fixed… new error (missing argument)

See if it can draw or not. Okay, if it can do actual bug fixing or not. So, it did fix the bug, but we got some error. Okay. It got some error out here. Missing argument. Okay, generate. I give it the error modules. You can also generate from here. So, it generated the whole thing and let me see if you can do something out here. Let me apply it. Okay, let's not fix

3:29 6 failed attempts later…

Thing. Let me apply it. Okay, so trying six times. All right. Uh it was failing. It was failing. It was a small thing. Uh

3:38 The discovery: Xcode's built-in FREE ChatGPT coding model

Small code error. Then I tried in-built ChatGPT. So, yes. Apple have in-built ChatGPT uh coding model uh inside this Xcode editor, which is free. And you can use it for many things. You can also use Apple native Apple intelligence for this kind of task and it will As you can see, it's

3:58 It builds. The app runs on iPad — to-do + draw

Starting now on the iPad. iPad is turning on. So, here we go. This is the app. So, it built a to-do app. I opened it on the iPad simulator. You can see I can create a to-do here like draw. Okay, save.

4:15 One catch: sketching needs an Apple Pencil (PencilKit)

Let me click on draw. Okay, let's see. Okay, I still cannot draw because it's ignoring the command and actions, but I think it can be done by Apple Pencil or something because it's Apple Pencil kit on it. Uh so,

4:30 THE VERDICT: code natively, nothing leaves your MacBook

Yeah. So, I need Pencil Apple Pencil to draw it, but yeah. It works. So, guys, you can code natively without code leaving your MacBook on Xcode. You can make Apple iPhone or

4:45 Both tested: Qwen 3.6 35B ✅ Gemma 4 ✅ — Qwen works really well

IPad apps by Xcode with by coding and it's quite awesome. Uh so, we have tested Gemma 4 and 4.3.6 35B both. Code and works pretty well, honestly, and also Gemma 4 works nicely

4:59 What next — 16GB M1? RTX 4080 on Windows? You tell me

In this Xcode Apple intelligence. So, that's what today, guys, and Uh that's what today, guys. If you like this video, you know, please do subscribe, like, share, and comment down below if you want to know or understand anything how to set up Xcode with your local LLM model. Uh if it will work on your 16GB MacBook M1 or not or uh if you are using any computer with RTX Nvidia uh graphics card. So, just let me know and comment down below. Uh that's for today and we can tweet then.

Related tests