This issue is because iOS under than 16.1 and Mac doesn't support the method: ActivityAuthorizationInfo().areActivitiesEnabled
So it crashes here:
public class SwiftLiveActivitiesPlugin: NSObject, FlutterPlugin, FlutterStreamHandler {
...
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
if (call.method == "areActivitiesEnabled") {
if #available(iOS 16.1, *) {
result(ActivityAuthorizationInfo().areActivitiesEnabled)
} else {
result(false)
}
return
}
...
}
...
}
ActivityAuthorizationInfo().areActivitiesEnabled method doesn't show you whether the device is supported&enabled or not. It shows whether user allowed LiveActivity.
same issue with: https://github.com/istornz/flutter_live_activities/issues/84#issue-2332999443
This issue is because iOS under than 16.1 and Mac doesn't support the method: ActivityAuthorizationInfo().areActivitiesEnabled
So it crashes here:
ActivityAuthorizationInfo().areActivitiesEnabled method doesn't show you whether the device is supported&enabled or not. It shows whether user allowed LiveActivity.
So I solved this problem adding new method:
I hope this way works well.