Affiliate Disclosure
If you buy through our links, we may get a commission. Read our ethics policy.

ChatGPT can now directly edit code in Xcode, VS Code, & more on macOS

ChatGPT is available as an app on macOS. Image source: OpenAI

The ChatGPT app for macOS has been updated with the ability to write code directly into Xcode, which means it competes with Apple's Swift Assist and GitHub Copilot.

Third-party artificial intelligence tools have been available for a while to help with coding on macOS, but OpenAI is throwing its hat in the ring with the latest ChatGPT app update. Users can communicate with ChatGPT and share what's within Xcode and other IDEs thanks to the "work with apps" capability.

TechCrunch reports that the update comes with an "auto-apply" mode so ChatGPT can edit code without additional permission prompts every time. The function is shown in a video posted to social media by OpenAI team member Alexander Embiricos.

The update is available to ChatGPT Plus, Pro, and Team subscribers Thursday, with Enterprise, Edu, and free users getting access next week. Windows users will get the feature "soon."

Xcode already has Swift Assist , an Apple-made generative coding assistant that runs via private cloud servers. Users have also been able to install tools like GitHub Copilot to assist with coding.

Developers will need to weigh the risks involved with exposing code to third-party AI tools. Apple promises that code isn't stored or used for training.

Watch the Latest from AppleInsider TV

Apple could introduce more features for Swift Assist during WWDC in June. Until then, third-party options like ChatGPT will help developers solve coding problems alongside Apple's built-in tool.

4 Comments

dewme 11 Years · 5965 comments

Now this is starting to sound interesting.

1 Like · 0 Dislikes
ranson 16 Years · 97 comments

If anyone plans to use this, I have one recommendation, which is to "git init" your project and commit your own changes before letting an AI edit your code. Do this even if you just plan to work on the project locally and are not planning to push it up to github or some other remote location. The reason is because, just like collaborative coding with another human, it is important to know what was changed and when. Doing this will allow you to see (via VS Code's built-in git diff feature) exactly what lines were changed, and easily discard those changes in the event that GPT has introduced a defect or other undesirable outcome in your code.

4 Likes · 0 Dislikes
apple4thewin 4 Years · 421 comments

At least from what I hear and see, AI in coding is probably one of the few things that most people aren’t too against.

randominternetperson 9 Years · 3177 comments

I'm impressed with what Swift Assist can do, and that's enough for me. I trust Apple, but I'm not opening up my code to every vendor to mine. Not that I'm some revolutionary creative genius; it's the principle of the idea.

1 Like · 2 Dislikes