Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed

I'm the developer of a third-party keyboard app, Snippety - Snippets Manager, which is designed for using snippets rather than regular typing.

One of my users has encountered a strange issue: after installing my keyboard (even when it is not actively in use), the predictive text bar starts showing suggestions in Polish. This happens despite the Polish language not being installed on the device. The issue resolves as soon as my keyboard is uninstalled from the system settings.

Interestingly, my application (including the keyboard) does not support the Polish language, nor is Polish specified anywhere in the app. The app was developed and published from macOS in English. This seems to be an iOS bug.

The only language-related configuration in my keyboard is the PrimaryLanguage key in the Info.plist file, which I set to "mul" because the keyboard is not intended for typing. I also tried setting it to "mis", but the issue persists.

The video presenting this issue on an iPhone 15 simulator running iOS 17.5: https://www.dropbox.com/scl/fi/xjdyucxpmv1cv0mnmwzvd/prdictive-text-issue.mp4?rlkey=aphznpdti08pz8xl84ojbyxz3&dl=0

Info.plist for my keyboard:

My project settings:


Steps to reproduce:

  • Configure iOS to use English language only, with English keyboard
  • Enable predictive text feature in the system
  • Install Snippety keyboard
  • Use the regular keyboard & start typing "dzie"

Actual result: Polish predictions appear even though the Polish language is not installed or declared by the keyboard.

Expected result: The predictive text should present predictions based on system settings.


What is even more weird, I discovered that when I add the keyboard in system settings, it automatically installs Polish language in the system settings. I even changed PrimaryLanguage to "de" (German) in Info.plist but it still installs Polish.

See: https://www.dropbox.com/scl/fi/aiv5g4z331zwy827zj47v/incorrect-language-installed.mp4?rlkey=16v5gqmb6mj8yuyyd7jwmjnsw&dl=0


Any ideas what could be wrong?

I also created a ticket: #FB13949087

I also found a similar issue from 2018 (O_O) reported here: https://stackoverflow.com/questions/53069262/ios-adds-new-preferred-language-when-installing-my-3rd-party-keyboard

It turns out, that it's not project-specific. I was just able to create a new project, add a keyboard extension, run it on the simulator, and adding the keyboard installs automatically Polish language for the system. Even though, on macOS used to build the app I removed Polish from all system settings (Language & Region + Keyboards), so I have no idea where it comes from in the app.

I figured out what is causing this issue. It turns out that the additional language is installed based on bundle id of your project O_O!

So if you set the bundle id to "pl.app.keyboard" the Polish language will be installed. If you change it to "de.app.keyboard" the German language will be installed.

This is definitely a critical bug in iOS, because it messes up suggestions while typing by installing unwanted language.

I reported it in the feedback assistant: #FB13954760 and I also created TSI: #7913047

Still not fixed and no feedback in the ticket (besides "There is no workaround DTS can provide (...)" from DTS team). Seems like installing random languages on user devices and breaking text suggestions while typing is not a big deal for Apple, all man-power is delegated to memoji development.

Predicitive Text is presenting suggestions in incorrect language when 3rd party keyboard is installed
 
 
Q