Skip to content

Commit

Permalink
🐛 Fix areActivitiesEnabled call
Browse files Browse the repository at this point in the history
  • Loading branch information
istornz committed Sep 10, 2024
1 parent eded0b5 commit e6c3956
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 53 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.9.5
* 🐛 Fix `areActivitiesEnabled()` on unsupported devices.

## 1.9.4
* 🍱 Convert images to webp.
* ⬆️ Upgrade dependencies.
Expand Down
45 changes: 2 additions & 43 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,26 @@ PODS:
- app_group_directory (1.0.0):
- Flutter
- Flutter (1.0.0)
- flutter_image_compress_common (1.0.0):
- Flutter
- Mantle
- SDWebImage
- SDWebImageWebPCoder
- flutter_native_image (0.0.1):
- Flutter
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.3.2):
- libwebp/demux
- libwebp/sharpyuv (1.3.2)
- libwebp/webp (1.3.2):
- libwebp/sharpyuv
- live_activities (0.0.1):
- Flutter
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- SDWebImage (5.18.3):
- SDWebImage/Core (= 5.18.3)
- SDWebImage/Core (5.18.3)
- SDWebImageWebPCoder (0.14.0):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.17)

DEPENDENCIES:
- app_group_directory (from `.symlinks/plugins/app_group_directory/ios`)
- Flutter (from `Flutter`)
- flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`)
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
- live_activities (from `.symlinks/plugins/live_activities/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)

SPEC REPOS:
trunk:
- libwebp
- Mantle
- SDWebImage
- SDWebImageWebPCoder

EXTERNAL SOURCES:
app_group_directory:
:path: ".symlinks/plugins/app_group_directory/ios"
Flutter:
:path: Flutter
flutter_image_compress_common:
:path: ".symlinks/plugins/flutter_image_compress_common/ios"
flutter_native_image:
:path: ".symlinks/plugins/flutter_native_image/ios"
live_activities:
Expand All @@ -68,15 +32,10 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
app_group_directory: 7bf9f8f9819ead554de29da7c25fb7a680d6a9a0
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_image_compress_common: ec1d45c362c9d30a3f6a0426c297f47c52007e3e
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
live_activities: 9ff56a06a2d43ecd68f56deeed13b18a8304789c
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
SDWebImage: 96e0c18ef14010b7485210e92fac888587ebb958
SDWebImageWebPCoder: 3027af94522d94df79c21c070894c8a2128927ff
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46

PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.14.3
COCOAPODS: 1.15.2
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1410;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
27C0558128E42F5700BA744B = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.9.4"
version: "1.9.5"
matcher:
dependency: transitive
description:
Expand Down
9 changes: 5 additions & 4 deletions ios/Classes/SwiftLiveActivitiesPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,12 @@ public class SwiftLiveActivitiesPlugin: NSObject, FlutterPlugin, FlutterStreamHa

public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
if (call.method == "areActivitiesEnabled") {
if #available(iOS 16.1, *) {
result(ActivityAuthorizationInfo().areActivitiesEnabled)
} else {
result(false)
guard #available(iOS 16.1, *), !ProcessInfo.processInfo.isiOSAppOnMac else {
result(false)
return
}

result(ActivityAuthorizationInfo().areActivitiesEnabled)
return
}

Expand Down
3 changes: 1 addition & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: live_activities
description: A Flutter plugin to use iOS 16.1+ Live Activities & iPhone 14 Pro Dynamic Island features
version: 1.9.4
version: 1.9.5
homepage: https://dimitridessus.fr/
repository: https://github.com/istornz/live_activities

Expand Down Expand Up @@ -33,7 +33,6 @@ dev_dependencies:
sdk: flutter
flutter_lints: ^4.0.0


flutter:
plugin:
platforms:
Expand Down

0 comments on commit e6c3956

Please sign in to comment.