• Although iPhone users can disable the autocorrect, the keyboard's factory settings on the device change the word automatically.
• "In those moments where you just want to type a ducking word, well, the keyboard will learn it, too," said software boss Craig Federighi.
Apple will improve its autocorrect feature so it stops changing one of the most common swear words to "ducking".
Although iPhone users can disable the autocorrect, the keyboard's factory settings on the device change the word automatically.
"In those moments where you just want to type a ducking word, well, the keyboard will learn it, too," said software boss Craig Federighi.
He announced the development at Apple's developers' conference in California.
The autocorrect can helpfully substitute a reasoned replacement for a misspelt word while texting, but it can also unintentionally change the meaning.
iPhone users can find themselves annoyed at having to rewrite their own messages - with the term "damn you autocorrect" becoming an acronym, a meme, an Instagram account and even a song.
The changes to the function will come as a result of artificial intelligence (AI), in which autocorrect will get better at predicting your next words and phrases by learning the terms that you use regularly, which includes swearing.
The AI which makes this happen is called a transformer model. It learns context by tracking relationships in data, like the words in this sentence, using mathematical techniques.
Initially flagged in a 2017 paper from Google, transformers are some of the most powerful classes of AI models.
Autosuggest - or predictive text - systems are beginning to become more mainstream as the technology behind the AI has accelerated very quickly.
The autocorrect change will be part of the iOS 17 operating system upgrades which are expected to be available as a public beta in July, with the general release in September.
It should mean that iPadOS 17 also carries the new function.
Elsewhere at the developers' conference, Apple unveiled an augmented reality headset, Apple Vision Pro which will retail at $3,499 (£2,849).
Apple chief executive Tim Cook said the new headset "seamlessly blends the real world and the virtual world".
It will be available early next year in the US and in other countries later in 2024.
On Monday, Apple's market valuation reached just under $3 trillion - a new company record.