PSA: Shortcut actions broken on apps built using Xcode 15.4

AppIntents (i.e. shortcut actions) in apps built using Xcode 15.4 — the program that is used to created applications on Apple platforms — are broken when run on iOS 16 and iPadOS 16.

I was recently made aware of this bug from a user who was unable to run shortcuts on their iPad running iPadOS 16.7.8. They were getting an error that the action “could not run because an internal error occurred.” I was able to reproduce this bug using an old iPad Pro from 2015 that could not be upgraded beyond iPadOS 16.

I then rebuilt MixEffect using a previous version of Xcode and ran the same shortcut with no problems. See this video demonstration of the bug using MixEffect and MixEffect Pro built on Xcode 15.4 and 15.2 respectively.

Inside any application that supports AppIntents is a file called extract.actionsdata file. This file describes all of the AppIntents or shortcut actions the application supports. The mangledTypeName parameter in each AppIntent is an empty string in apps built using Xcode 15.3 and 15.4. In apps built with Xcode 15.2, the parameter has a value.

Approved Workaround

Update 1:30 pm PT: Turns out in the release notes to Xcode 15.3, they noted this as a known issue and included a workaround:

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)

Here’s how you do it:

  1. Click on your project settings in Xcode.
  2. Click on Build Settings.
  3. Click the + icon.
  4. Choose Add User-Defined Setting in the menu that appears.
  5. Enter ENABLE_APPINTENTS_DEPLOYMENT_AWARE_PROCESSING.
  6. Enter NO as the parameters value.
  7. Rebuild your project.

Feedback and Original Workaround

Since there is a published workaround, there’s no need to submit additional feedback on this issue. My takeaway is to pay closer attention to those Xcode release notes in the future!

Now, I’ll go ahead and rebuild the apps using Xcode 15.4 with the ENABLE_APPINTENTS_DEPLOYMENT_AWARE_PROCESSING build setting set to NO.

I suspect iOS 16 and iPadOS 16 are looking at this value instead of mangledTypeNameV2 parameter which iOS 17 and iPadOS 17 are looking at. I have filed a feedback with Apple under the following feedback reference ID FB13812174:

  • Developer Technologies & SDK
  • AppIntents Framework
  • Incorrect/Unexpected Behavior

Developers who are experiencing this problem themselves or have fielded bug reports from users are encouraged to reference this feedback when submitting their own.

In the meantime, I will see if I’m able to re-submit the apps built using Xcode 15.2 until Apple fixes this bug in a future version of Xcode.

Discover more from MixEffect Labs

Subscribe now to keep reading and get access to the full archive.

Continue reading