Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacRumors

macrumors bot
Original poster
Apr 12, 2001
66,373
35,445


The ChatGPT app for Mac is now able to integrate with coding apps like Xcode, VS Code, TextEdit, and Terminal, simplifying workflows where developers copy and paste their code from a coding app into ChatGPT.

open-ai-logo.jpg

When ChatGPT is given permission to interact with an app like Xcode through a new Work with Apps feature, a selection of code can be sent directly to ChatGPT alongside a prompt. TechCrunch had a demo of the feature, and described how it works:
In a demo with TechCrunch, an OpenAI employee opened the ChatGPT app and an Xcode environment containing a simple project modeling the solar system - although it was missing the Earth. The employee selected an Xcode tab within ChatGPT, which tells the AI chatbot to look at the app, and prompted the chatbot to "add the missing planets." The chatbot was able to complete the task, writing a line of code to represent the Earth that matched the rest of the project's format.
Back in October, GitHub brought Copilot integration to Xcode, with Copilot providing coding assistance right in the app. ChatGPT's integration is not that deep, and it is not able to write code in Xcode. ChatGPT is instead using the macOS Accessibility API for screen readers that allows apps to read text, which also means that it cannot interpret images or videos.

The new ChatGPT for Mac feature is available for ChatGPT Plus and ChatGPT Teams users starting today, with Enterprise and Edu support coming in the near future. Going forward, OpenAI plans to bring this integration to other apps.

Article Link: OpenAI's ChatGPT for Mac Now Works With Xcode
 
  • Like
Reactions: Serqetry
The day that AI acquired the concept of the solar system without the Earth :oops:
That’s not what happened here I think. As a proof of concept they had a project without Earth and asked ChatGTP to add it without programming.
 
Apple and open AI just Sherlocked third party plugins and API wrappers that did this on Mac.
 
  • Like
Reactions: ins
Ok I like chatGPT more than most people around here seem to, but there’s no shot I’m giving it direct terminal access!
 
  • Like
Reactions: rhett7660
haha as if I would let a remote service connect to my workflow like that. I have OpenWebui and Ollama thanks.

You can steal or learn from my work long after I make money from it, not while I am working on it.
 
  • Like
Reactions: ItWasNotMe
ChatGPT's integration is not that deep, and it is not able to write code in Xcode.

If it can't actually insert any code and users have to copy-and-paste just like they're using the ChatGPT website... well, I guess this is one way to tide people over until Swift Assist comes out? 😬

(or maybe Apple just didn't want this stealing Swift Assist's impending thunder?)
 
On my Macbook, the ChatGPT app's Settings/"Work with Apps" section found only TextEdit and Terminal, though I've had Xcode on my Macbooks for as long as I can remember. Then I checked if Xcode was still installed. It wasn't. I'm guessing it disappeared during a macOS update at some point, and I didn't notice since I rarely use Xcode since I'm not a developer, though sometimes I need it to look at some things.
 
If it can't actually insert any code and users have to copy-and-paste just like they're using the ChatGPT website... well, I guess this is one way to tide people over until Swift Assist comes out? 😬

(or maybe Apple just didn't want this stealing Swift Assist's impending thunder?)
I am pretty sure swift assist will suck, depends on the current performance of A.I
 
To activate the settings to get this to work, if you're using the ChatGPT app (I don't see any settings related to this new feature when accessing ChatGPT using a web browser), install the latest version of the app, then go to its Settings > Work with Apps, enable the option, then also select here "Manage Apps". Selecting an app from the list that will appear will open macOS's System Settings > Privacy & Security > Accessibility pane. Make sure ChatGPT is listed here, then slide its slider to the right. Then back in macOS System Settings > Privacy & Security, open Screen & System Audio Recording, make sure ChatGPT is listed, and slide its slider to the right.

Unfortunately when I followed these steps, including relaunching the ChatGPT app, GPT 4o said it was unable to read what I'd typed into a TextEdit window (just a simple "Hi there!") since it said it didn't have that capability. I switched to GPT o1 preview to see if that would help, then I pointed out that it was supposed to have this capability as of today, and told it to try again, and this time after a web search it acknowledged this new capability, and it tried to read the contents of the TextEdit window but failed:

Certainly! Since you’ve enabled the Work with Apps feature, I’ll attempt to access the content of your open TextEdit window.

[Attempting to retrieve content…]

It appears I couldn’t retrieve the content from TextEdit. Please ensure that all necessary permissions are granted and that the application is properly configured. If you’d like, you can also paste the text here, and I’ll be happy to assist you with it.

ChatGPT then refused to acknowledge that this new app-reading feature exists, even though it had acknowledged it just a few minutes earlier, this time offering its old excuse that it knows nothing beyond its last knowledge cutoff date, currently Oct 2023.

Edit: got it to work. The remaining step, not really explained in the article and not explained by ChatGPT at all, is to look down at the bottom of the ChatGPT window where the row of buttons appears, find the new button that looks like a cursor arrow pointing to the middle of a dashed square, click on it, then in the popup that appears which lists the apps this works with, click the + to the right of the name of the app(s) you want to work with. Then ask ChatGPT to read the open window in the app, giving it the name of the app you want it to look at.
 
Last edited:
So we can use the regular ChatGPT subscription, we don't need the API to do this?
Apparently so. I have the regular $20 a month subscription, but I don't have any ChatGPT-related APIs installed, at least that I know of, and it's working for me. The reference in the article to an API is to macOS's built-in Accessibility screen reader API.
 
Last edited:
Is this a M exclusive integration again? I mean it's all cloud based with ChatGPT anyway right?
 
So I can ask chatgpt to make an app for me from the scratch?

Time to get rich with crazy apps!
You can, to some extent, but from what I've been reading the quality can vary all the way from nearly flawless to really bad and non-functional, so you still need to do due diligence and examine and test the code that ChatGPT generates as thoroughly as you're normally supposed to.

But this new feature isn't about that specifically--it's to allow the ChatGPT app to examine existing code already in an open window in the Xcode app, though you could first have ChatGPT create that code, which you'd then paste into an Xcode window and then edit it, and then ask ChatGPT to check your edits.
 
Is this a M exclusive integration again? I mean it's all cloud based with ChatGPT anyway right?
M series only, but not because of this new feature--apparently the ChatGPT app on macOS has always required an M1 or better. So no Intel-based Macs. You also need to be running macOS 14 Sonoma or later. Oddly when I asked ChatGPT your question, at first it said the ChatGPT app works on Intel-based Macs too, but when I asked it to confirm this, it flip-flopped and said it works only with M-series processors, and it stuck with that when I asked it a third time. Go figure.
 
Last edited:
  • Haha
Reactions: wilhoitm
anyone made this work with VS Code? i installed the extension however it gives me an error that it couldnt properly register or something
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.