skip to Main Content

I’m currently building my first native iOS app with SwiftUI, and part of my app is a widget that displays data from within my app. I have a configurable widget with 3 parameters, one of which uses "Dynamic Options". I used this tutorial to implement this: https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target

When I run my app in the simulator everything works great, and I am able to load and select a dynamic option as supplied by my IntentHandler, and use that value in my widget. In the simulator everything works exactly as I’d like, and I’m very happy with it.

When I plug in my iPhone running iOS 16 and run the app on my phone from Xcode though, all of my widget settings work, but I get the dreaded "No options were provided for this parameter" for my dynamic option. I’m stumped by this because it works perfectly in the simulator, but won’t work on my device.

Are there any obvious gotchas I should be aware of to try and debug this issue?

2

Answers


  1. Go to your project settings, go to targets and tap on the IntentHandler target, now scroll down and click on Supported Intents, do you see your intent name there? If not, then add it by simply entering its name.

    Image

    enter image description here

    Login or Signup to reply.
  2. I have an issue that is very similar to what you described. In the screenshot, I finally found the reason in the red circle pointed to by the red arrow, and this problem was solved.

    Screenshot of my Xcode

    That is, in the Target added, the iOS version of the specified Devoloper needs to be modified to a matching version supported by the real machine.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search