Guides for Code Editor
Coding with an AI assistant on iPad: Claude, ChatGPT or Gemini
AI models like Claude, ChatGPT and Gemini have become useful coding partners. They explain errors, write first drafts and suggest fixes – and on an iPad, where typing long blocks of code is slow, that help is worth even more.
But an assistant is only as good as the way you use it. This guide covers how to ask good questions, how to review what the AI changes, what an API key is and what to think about regarding privacy.
Chat window or assistant in the editor
There are two ways to code with AI on an iPad. You can copy code into a chat app and paste the answer back. That works, but it's tedious, and the AI only sees what you paste – not your other files.
The other way is an assistant built into your editor. In Code Editor (Pro), you ask Claude, ChatGPT or Gemini right next to your code. The assistant reads your project's files and proposes changes, and your conversation is kept per project.
How to write a good prompt
Vague requests get vague results. A good prompt says what you want, where, and how you'll know it worked.
- Be specific: “Add a dark mode to style.css that follows the system setting” beats “make it look better”.
- Describe the symptom: “The button on index.html does nothing when tapped, and the console shows no error.”
- Paste the exact error message, including the line number.
- Ask for one change at a time – small steps are easier to review.
- Ask for an explanation as well, if you want to learn rather than just fix.
Review every change
AI models write code that looks plausible, and most of the time it's right. But they can misunderstand your intent, invent functions that don't exist or quietly remove something you needed. Treat proposed code like a pull request from a colleague: read it before you accept it.
Code Editor shows every proposed change highlighted, and you decide whether to apply it. Earlier states stay in the version history, so you can go back if a change turns out to be wrong.
- Read the highlighted change and check that it touches only what you asked for.
- Test the result in the live preview or console right away.
- If you don't understand a line, ask the assistant to explain it before you keep it.
API keys: what they are and what they cost
Apps talk to AI models through an API, and the provider identifies you with an API key – a long secret string you create in your account at Anthropic (Claude), OpenAI (ChatGPT) or Google (Gemini). Usage is billed per request by that provider.
Code Editor works with your own API key from one of these three providers; requests to the assistant are billed by the provider through that key. Note that chat subscriptions such as ChatGPT Plus or Claude Pro are separate products and don't include API usage.
- Treat an API key like a password: don't paste it into code files or share it in screenshots.
- Set a spending limit in your provider account if it offers one.
- If a key leaks, delete it in the provider's dashboard and create a new one.
Privacy: what the AI sees
When an assistant reads your files, their content is sent to the AI provider you chose so the model can answer. That's how these services work, regardless of the app. So before you use AI on a project, think about what's inside it.
- Don't keep passwords, tokens or API keys in project files.
- Be careful with personal data, such as customer lists or exported user data.
- Check your provider's data policies, especially for work or school projects.
- For sensitive code, leave the assistant off – the editor works fine without it.
Learning with an AI assistant
If you're learning to code, an assistant can be a patient tutor – or a shortcut that keeps you from learning. Ask it to explain errors instead of only fixing them, try to solve a problem yourself first and compare your solution with its suggestion afterwards.
Frequently asked questions
Which AI is best for coding: Claude, ChatGPT or Gemini?
All three handle HTML, CSS, JavaScript and Python well, and the models change often. Try the same task with each and keep the one whose answers you find clearest. Code Editor lets you use any of the three.
Do I need a ChatGPT Plus or Claude Pro subscription?
No. Code Editor uses an API key from Anthropic, OpenAI or Google, which is billed per request through the provider's developer account. Chat subscriptions can't be used by other apps.
Is the AI assistant in Code Editor free?
The assistant is part of Code Editor Pro. On top of that, your AI provider bills the requests through your own API key.