AppIntents don't work on iOS 16 if app is built with Xcode 15.3

Hi,

After upgrading to Xcode 15.3 (15E204a) AppIntents unexpectedly stopped working on iOS 16. System error occurs when you try to run AppIntent on device with iOS 16, Shortcuts app just shows error alert.

There are errors in device's logs: error <datetime> <TargetName> Could not find an intent with identifier <AppIntentIdentifier>, mangledTypeName: Optional("")

It seems to be an issue with extract.actionsdata file, generated by appintentsmetadataprocessor. "mangledTypeName" parameter is empty for action descriptors, though it was fulfilled when building with Xcode 14.2 and different version of generator. If I manually set this property in xcarchive and sign it everything works fine.

The issue is reproducible with Xcode 15.4 which is currently in beta.

Have anyone experienced this or have any solution more solid than editing metadata files after build?

Answered by appleSince80 in 788987022

The release notes of Xcode 15.3 has another workaround:

https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes

AppIntents may fail to execute when the target’s minimum deployment target is iOS 15.0 or earlier (123798206) (FB13664020)

Workaround: Add the ENABLE_APPINTENTS_DEPLOYMENT_AWARE_PROCESSING=NO build flag to your target(s)

have the exact same problem. anything lower than ios 17.2 will produce this error

I'm seeing the same problem. Rebuild your project using Xcode 15.2, and AppIntents will work again. I filed a feedback with Apple, and I suggest you do the same. Reference this: FB13812174

Same issue for me for my app intents used on WidgetKit. They fail to work on lower iOS versions and throw the error: Could not find an intent with identifier INTENT_NAME, mangledTypeName: Optional("")

I've written a blog post and video detailing this problem and the workaround:

  • https://youtu.be/OMqEhcguevM
  • https://labs.mixeffect.app/article/2024/05/psa-shortcut-actions-broken-xcode-15-4/

I've got the same problem. For now I'll have to build with Xcode 15.2.

Filled a report too that you can reference: FB13812719.

Hope this will get fixed!

Accepted Answer

The release notes of Xcode 15.3 has another workaround:

https://developer.apple.com/documentation/xcode-release-notes/xcode-15_3-release-notes

AppIntents may fail to execute when the target’s minimum deployment target is iOS 15.0 or earlier (123798206) (FB13664020)

Workaround: Add the ENABLE_APPINTENTS_DEPLOYMENT_AWARE_PROCESSING=NO build flag to your target(s)

@appleSince80 Does this workaround works for you? I've already tried it and it doesn't help. Also tried increasing deployment target, didn't helped.

Yes, I added the user-defined setting to my target's build settings, re-built the app, and the intents now work on iPadOS 16.

Oh wow thanks, I was trying in "Other C Flags" and "Other Swift Flags". Just tried again using User-Defined Settings and it now works. It needs to be added to any target which imports AppIntents.

I got a problem : I create an app that allow user tap on button in widget but when app is running it's got an error when tap: Could not find an intent with identifier AppIntentsIdentifier , mangled TypeName: Optional("Somethings"). Anyone know why.

Same here, we can only use Xcode 15.2 to release app, not 15.3 or 15.4, please fix that.

AppIntents don't work on iOS 16 if app is built with Xcode 15.3
 
 
Q