-7 C
New York
Sunday, February 2, 2025

swift – iOS Reside Actions not displaying


I am making a Capacitor plugin to set off iOS Reside Actions, utilizing Capacitor 7 and Xcode 16.
In Xcode, the Reside Exercise widget is properly displayed within the preview, it is a actually easy one:

var physique: some WidgetConfiguration {
    ActivityConfiguration(for: LiveActivityWidgetAttributes.self) { context in
      VStack {
        Textual content(context.attributes.title)
          .font(.headline)
          .foregroundColor(.white) // Guarantee that is seen
        Textual content(context.state.element)
          .font(.subheadline)
          .foregroundColor(.white) // Guarantee that is seen
      }
      .activityBackgroundTint(Coloration.black)
      .activitySystemActionForegroundColor(.white)
    }dynamicIsland: { context in
      DynamicIsland {
        // Expanded UI goes right here
        DynamicIslandExpandedRegion(.main) {
          Textual content("Main")
        }
        DynamicIslandExpandedRegion(.trailing) {
          Textual content("Trailing")
        }
        DynamicIslandExpandedRegion(.backside) {
          Textual content(context.state.element)
        }
      } compactLeading: {
        Textual content("L")
      } compactTrailing: {
        Textual content("T")
      } minimal: {
        Textual content("Min")
      }
      .widgetURL(URL(string: "http://www.instance.com"))
      .keylineTint(Coloration.crimson)
    }
  }

I exploit the default piece of code to set off a stay exercise:

let exercise = attempt Exercise.request(
    attributes: attributes,
    contentState: initialState,
    pushType: nil
)

I properly retrieve the Exercise ID once I begin or replace one, and I will cease it.
Nevertheless, I by no means see the Reside Exercise displaying up on my iphone. There isn’t a error message.
In Mac Console app, I can see this message when beginning a Reside Exercise:

< personal > isn’t entitled to specify a scene goal. Defaulting
containingProcess goal to < personal >

I am utilizing a Free Provisioning profile, with out push notifications replace.
Background Mode functionality is properly added.
I properly replace plist file with “Helps Reside Actions”.
In my iphone, app has proper authorizations to make use of Reside Actions.
Additionally when creating Reside Exercise widget extension in Xcode, it created primary widgets we are able to add on house display, I will see them and use them.

I clear a number of occasions Xcode cache, uninstall, restart cellphone, the Reside Actions by no means present.

Is anybody have an concept on what may be fallacious ?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles