Apple has said for years that everyone should be able to code, and its been working since 2016 to get Machine Learning up to speed to make it easier to write apps — or to even code for us.
One of the less talked about yet more successful uses of ChatGPT has been in the generation of code for app developers. It's never a complete solution, and it can still be that the code simply doesn't work, but in practice it's a conveniently quick tool to help with development.
Apple has eschewed jumping on the ChatGPT bandwagon in favor of its years of Machine Learning work, and now in a newly-granted patent, it is putting ML to work for developers. "Integration Of Learning Models Into A Software Development System," describes how at the very least, Xcode could do more auto-completion of lines, and syntax checking, but then potentially much more.
"Software development environments can be used to create a software program in a given programming language on different computing platforms," says the patent. "Existing approaches for enabling software developers to utilize machine learning models in software development environments may require a significant amount of configuration."
The implication of the patent is that Apple wants to use ML models to take away barriers to development — whether that means creating most of the code, or just helping developers.
"A software developer working with such a model can then take advantage of productivity features of the IDE [Integrated Development Environment] such as syntax checking while typing, auto-completion, detection of name or type errors in parameter lists, etc.," continues Apple.
"In an example, [the] code generator creates a subroutine that facilitates accessing values of the existing ML data," says Apple, "via the particular data type supported in the particular programming language"
Apple stresses that the proposal is intended to work with "Swift, Objective C, C++, Python, Java," or any language. Just as you can now ask ChatGPT to write an app in, say, AppleScript or SwiftUI, so Apple's ML system can be used regardless of which language the developer chooses.
"The code interface of the transformed ML model... therefore provides functions and data types,' continues the patent, "that are compatible with the particular programming language, as used in the current project."
Overall, Apple's patent describes how separate subroutines can be created as objects that a developer then adopts in his or her app. Apple assumes that a developer will want to edit the ML-generated code, too, so the patent also details how that might happen.
So as described, the ML technology is intended first to be a professional tool for speeding up coding for developers. But removing barriers to coding will also see Xcode potentially doing most of the work that new or less experienced developers need.
The patent is credited to six inventors. They include a Michael Ryan Brennan of San Francisco, and previously, Apple has related patents from 2016 listing a Michael R. Brennan of Cupertino.
Whether this is the same inventor or not, those related patents concern what Apple specifically calls "training an artificial intelligence." So while Apple has been criticized for not mimicking Google and others for announcing ChatGPT-like systems this year, it's actually been quietly working on this for at least seven years.