init method

Future init({
  1. required String appGroupId,
  2. String? urlScheme,
})

This is required to initialize the plugin. Create an App Group inside "Runner" target & "Extension" in Xcode. Be sure to set the SAME App Group in both targets. urlScheme is optional and is the scheme sub-component of the URL. appGroupId is the App Group identifier.

Implementation

Future init({required String appGroupId, String? urlScheme}) {
  _appGroupsFileService.init(appGroupId: appGroupId);
  return LiveActivitiesPlatform.instance.init(
    appGroupId,
    urlScheme: urlScheme,
  );
}