So I try to create a custom keyboard extension with a speech recognition functionality provided by our own server. In some older thread I read about the restriction where you cannot use the microphone from an App Extension, but I cannot found any hints about that in the new Developer Documentation. There is only a bullet point which mentioned the fact that you cannot access the Microphone when RequestOpenAccess is set to false in the Info.plist file, which made me thought that I can use the microphone from inside the keyboard.
So I tried it myself, set the RequestOpenAccess setting to true and also set the "Microphone usage Description". The question to allow the microphone showed up on the first try but the recording did not start and there were no hint about it in the console and no errors poped up. I tried the recording code before, directly inside the app and there it worked perfectly, so I think it has nothing to do with this code. As an addition I tried the Keyboard in the Simulator and there the recording worked also as intended so I think I maybe miss some permissions or something.
Does anybody know something about this and can help me figuring out my issue?
The workaround is to make keyboard extension open containing app which does the actual mic recording and communicates with extension via user defaults. The containing app switches back to host app after it starts recording.