LibTorch in iOS message filtering extension


I am trying to build an iOS message filtering extension, and I am using LibTorch 1.6, however after integrating with the LibTorch library, I find that my message extension no longer works: it compiles, runs, can be installed and enabled on my device, but the filtering just stops working (i.e. all messages are no longer filtered).

Debugging this is really difficult, because there are no error messages. I wonder if anyone has run into similar issues before, or if anyone has successfully run LibTorch in this setup. I can confirm that my main iOS App runs perfectly, it’s just the extension (.apex) that doesn’t.

After digging through the log an device console I found the cause: it is hitting memory limit: on my device it is only 6MB.

Guess that renders LibTorch hardly usable now…

Hope this is helpful to somebody else.