SiriKit communication problem + Locale problem - REAL NIGHTMARE

Hello dear developers,


Allow me to share with you my nightmare with SiriKit. I'm pretty new to this. So it's possible that I have done things wrong. I would really appreciate your help to get out of this situation. I have a couple of custom intents declared with one intent definiton file.


Let's kick off with Chapter 1 - "Destroyed localizations"


I localized my Intents by going on my Intent Definition file, and checking all my languages on the right side of the screen, including the BASE one. I translated every file. But some of the text are not beeing translated. The title, subtitle and output variable display name are translated correctly though, so it's not that disturbing. But when I upload the package to the App Store, I recieve an email warning me that the title and subtitle of my intents are NOT translated in French (at least not found), but the rest of the elements and languages are fine! What a nonsense is this? What should I do, I litteraly can see all my translations done and checked, and they work on my device, except other translations, not being the ones mentionned in the mail, are failing to work?


Chapter 2 - "Ghost Intents donated"


Every time I donate my intent, it gets doubled. When I go in the Apple Shortcuts app, I can see 2 to 4 times the same Intent there. They all work, so I can pickup whatever Intent I want, the result will be the one I expected. But why is it doubled, trippled, or even quadrupled? What have I done wrongly? They are being donated in the viewDidLoad().


Chapter 3 - "Lucky Luke-class handler"


When I execute an Intent in Shortcuts, everything goes well, I get my results and everyone is happy. However, if I decide to run multiple intents from my app one after another, one of my intents, and only this one, will systematically fail ("a communication problem with the app occured") if being executed after another one. It works if I revert the order. Intrestingly, the Intent failing is the first I ever made when I started dealing with my Intents Definition file. However these Intents are absolutely not linked, so I don't understand how the order could matter in any way. I tried to diagnose this with Xcode, here is what I got:


2019-10-07 01:20:24.976279+0200 Shortcuts[6444:576136] [lifecycle ] [u AD0D3A30-0963-44E9-A24D-FDC14F80C21B:m (null)] [fr.plugn.fmobile.FMobileG3(2.0)] Connection to plugin interrupted while in use.

2019-10-07 01:20:24.976641+0200 Shortcuts[6444:575523] [Intents] -[INCExtensionRequest _extensionContextHost] Unexpected extension context class (null)

2019-10-07 01:20:24.976719+0200 Shortcuts[6444:574337] [WorkflowExecution] -[WFAction runWithInput:userInterface:parameterInputProvider:variableSource:completionHandler:]_block_invoke Action <WFHandleCustomIntentAction: 0x10a617c10, identifier: fr.plugn.fmobile.CarrierIntent, parameters: 1> finished with error: Error Domain=WFIntentExecutorErrorDomain Code=100 "Un problème de communication avec l’app est survenu." UserInfo={NSUnderlyingError=0x2804b7d50 {Error Domain=INCExtensionErrorDomain Code=1301 "(null)" UserInfo={NSUnderlyingError=0x280519290 {Error Domain=NSCocoaErrorDomain Code=4097 "connection on anonymousListener or serviceListener from pid 6656" UserInfo={NSDebugDescription=connection on anonymousListener or serviceListener from pid 6656}}}}, NSLocalizedFailureReason=Impossible d’exécuter Obtenir le Statut d'Itinérance Nationale, NSLocalizedDescription=Un problème de communication avec l’app est survenu.}

2019-10-07 01:20:24.976792+0200 Shortcuts[6444:576136] [lifecycle ] [u AD0D3A30-0963-44E9-A24D-FDC14F80C21B:m (null)] [fr.plugn.fmobile.FMobileG3(2.0)] Connection to plugin invalidated while in use.


I know that's already a lot of informations I'm trying to solve, so I'm going to skip you the Chapter 4 - "Xcode is absolutely crazy", where it's giving me some random red errors without any sense (example: () -> Bool [...] return true ---> "Cannot convert variable of type 'String' to type 'NSNumber'"), vanishing after restarting Xcode and rebuilding. Fun fact, when I get all these red errors, it is still succeding the Build with Cmd+B and running the app perfectly on the device, despite the 60-190 red fake errors.


So. Any chance of me getting through this? Do you have any idea what I could have done wrong?


Thank you in advance,


- PlugN

Replies

Just a note that will probably not solve your problem, but this is so far the only result on Google for "Connection to plugin interrupted while in use." and "Connection to plugin invalidated while in use."
I've seen this happen when working with AudioUnit Extensions and debugging with breakpoints in XCode. While I haven't found any documentation yet to prove this, my hypothesis is as follows. When debugging plug-ins that are asynchronously loaded, if the host application takes too long to respond, the plug-in process will get killed. Then, as the host process comes back and attempts to communicate with the plug-in, it will find that its connection has been interrupted and then invalidated.
You could see if running the app on the device from the homescreen (not from XCode), with no breakpoints, but only monitoring the console, produces the same error messages.


As you mentioned the issue only occurs when using the intents in a specific order, perhaps check how the output of the always-working intent is processed to see if it's taking to long as the second intent is running. Might be a stretch though I hope it helps.