In my case, the problem was caused by an external display connected via USB.
When I connected the iPhone 16 Pro with a USB cable, it appeared in Finder but not in XCode.
The external display was made by LG and I was using it in clamshell mode.
Once I disconnected the USB connection to the external display, XCode was able to recognize the iPhone.
Post
Replies
Boosts
Views
Activity
Thanks for your reply!
I tried using Button instead of Button(intent:...) and the widget URL wasn't passed correctly.
It always returns the URL of the first button.
Thanks for your reply!
I was able to confirm that the method you suggested worked correctly.
I also discovered that it works correctly without AccessoryWidgetBackground().
Button(intent: intent) {
ZStack {
if showsWidgetContainerBackground {
Color.black
} else {
Color.primary.opacity(0.15)
//AccessoryWidgetBackground()
}
...
}
}
.buttonStyle(.plain)
.widgetURL(URL(string: "widget://" + intent.id))
This problem seems to occur when using both AccessoryWidgetBackground() and .buttonStyle(.plain).
Maybe this is a bug?
I'll add this information to the feedback(FB15151000).
Thank you very much for your help!