Skip to main content

Apple’s ChatGPT rival may automatically write code for you

Artificial intelligence (AI) tools like ChatGPT and Bing Chat have exploded in popularity over the past year, yet industry titan Apple has remained conspicuously quiet on the matter. Now, though, we might know what could be in store for us if the Cupertino firm decides to launch its own AI chatbot.

In a recently granted patent (#US-11687830-B2), Apple explains how it could infuse machine learning (ML) tech into its Xcode app, which may allow it to automatically write code for developers. If successful, that could be a major boost for app builders who work within Apple’s ecosystem — and could mean better apps for users.

A slide of Xcode running on MacOS Monterey at Apple's WWDC 2021 event

The patent notes that ML could be used to automatically complete lines of code, check existing code for bugs, and more. These simple tasks alone could help save developers a bunch of time.

Beyond that, though, Apple potentially sees its idea as removing barriers for new developers who might not be familiar with how to set up the right software and hardware in order to use ML models.

To that end, Apple’s patent explains how a new system could include ML models “within an integrated software development environment” in a similar way as familiar features like functions and classes. This would then allow the developer to take advantage of all that ML goodness just as they would use a regular library or class when coding, with no complicated setup required. In other words, using machine learning to assist with your code would feel instantly recognizable.

Built into Xcode

Coding on a Mac using virtual machines via VMWare Fusion Pro.

It sounds like Apple will embed its code-writing tool directly into the Xcode app rather than release a standalone chatbot, much like how Adobe is building AI tools right into Photoshop. It’s possible it could also find its way into other Apple apps, perhaps providing a system-wide AI helper in the vein of Microsoft’s Copilot.

The fact that AI tools like ChatGPT are easy to use and get to work quickly means Apple’s idea could be seriously attractive to developers. Building it into Xcode — an app developers use all over the world — means code writers wouldn’t have to learn how to use an additional app to reap the benefits.

Speaking of benefits, though, those are far from guaranteed, and Apple’s existing AI efforts are something of a mixed bag. The iPhone 14’s AI-assisted photography skills are exceptional — Siri, famously, is not.

Still, you’d expect Apple to make a decent go of its AI code-writing bot given how much money it has to throw at the problem. If you write a lot of code, watch this space.

Alex Blake
In ancient times, people like Alex would have been shunned for their nerdy ways and strange opinions on cheese. Today, he…
Apple GPT is real and may be coming sooner than you think
Siri on an iPhone.

Apple has been conspicuously absent in generative AI news, while OpenAI, Microsoft, Google, and Meta are making headlines with their advances daily. However, the iPhone maker hasn't given up, and a privacy-focused Apple AI is undergoing internal testing.

According to a Bloomberg report, Apple is working on a chatbot and has already been testing it internally. Reporter Mark Gurman's sources claim that Apple's AI plans are expected to be revealed in a major announcement in 2024. Apple engineers are said to refer to the AI as "Apple GPT" internally, suggesting it could use a generative pretrained transformer (GPT) somewhat similar to OpenAI's model.

Read more
GPT-4: how to use the AI chatbot that puts ChatGPT to shame
A laptop opened to the ChatGPT website.

People were in awe when ChatGPT came out, impressed by its natural language abilities as an AI chatbot. But when the highly-anticipated GPT-4 large language model came out, it blew the lid off what we thought was possible with AI, some calling it the early glimpses of AGI (artificial general intelligence).

The creator of the model, OpenAI, calls it the company's "most advanced system, producing safer and more useful responses." Here's everything you need to know about it, including how to use it and what it can do.
Availability

Read more
What is a DAN prompt for ChatGPT?
A laptop screen shows the home page for ChatGPT, OpenAI's artificial intelligence chatbot.

The DAN prompt is a method to jailbreak the ChatGPT chatbot. It stands for Do Anything Now, and it tries to convince ChatGPT to ignore some of the safeguarding protocols that developer OpenAI put in place to prevent it from being racist, homophobic, otherwise offensive, and potentially harmful. The results are mixed, but when it does work, DAN mode can work quite well.

What is the DAN prompt?
DAN stands for Do Anything Now. It's a type of prompt that tries to get ChatGPT to do things it shouldn't, like swear, speak negatively about someone, or even program malware. The actual prompt text varies, but it typically involves asking ChatGPT to respond in two ways, one as it would normally, with a label as "ChatGPT," "Classic," or something similar, and then a second response in "Developer Mode," or "Boss" mode. That second mode will have fewer restrictions than the first mode, allowing ChatGPT to (in theory) respond without the usual safeguards controlling what it can and can't say.

Read more