Post

So… I’ve just learned that most of my adoration for #AppIntents was premature. 😆 I discovered why they didn’t work from actionable notifications, by having the same issue when I tried to use them in .onMove. 😬 #BuildInPublic #IndieHacker #iOSDev #IndieDev

This time I asked AI what’s going on, and its explanation seems reasonable. In a nutshell, intents for their dependency injection to work properly need to be run in a proper environment. Be it via Button with intent as a param, or from the Shortcuts app.

0 reposts0 likes

Running them directly from code by instantiating them and calling perform makes them run in an environment where all their dependencies aren’t initialized. At least that’s what I understand from chatting with AI. However, I admit I haven’t double-checked yet. 😅

As for the progress in general, I had yet another exhausting week and I haven’t made much progress. I even took a 2-day break from working on Spark completely! 😱 However, I managed to create intents to work with habit groups and extended entities, so I can use them with my view.