From a1e66bcab585ea1fdbdaaa3d80f02a4c1ce1fbc1 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 30 Apr 2024 12:18:06 -0400 Subject: [PATCH 1/7] Push to Start Live Activities --- .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + .../WidgetBackground.colorset/Contents.json | 11 + .../onesignaldemo.imageset/Contents.json | 21 ++ .../onesignaldemo.imageset/onesignal-logo.png | Bin 0 -> 20552 bytes .../ExampleWidget/ExampleWidgetBundle.swift | 17 ++ .../ExampleWidgetLiveActivity.swift | 66 +++++ example/ios/ExampleWidget/Info.plist | 11 + example/ios/Flutter/AppFrameworkInfo.plist | 2 +- example/ios/Flutter/Flutter.podspec | 6 +- example/ios/Podfile | 10 +- example/ios/Podfile.lock | 51 ++-- example/ios/Runner.xcodeproj/project.pbxproj | 239 +++++++++++++++++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/ios/Runner/Info.plist | 10 +- example/lib/main.dart | 76 +++++- ios/Classes/OSFlutterLiveActivities.m | 66 ++++- lib/src/liveactivities.dart | 130 +++++++++- 19 files changed, 700 insertions(+), 48 deletions(-) create mode 100644 example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 example/ios/ExampleWidget/Assets.xcassets/Contents.json create mode 100644 example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json create mode 100644 example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json create mode 100644 example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png create mode 100644 example/ios/ExampleWidget/ExampleWidgetBundle.swift create mode 100644 example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift create mode 100644 example/ios/ExampleWidget/Info.plist diff --git a/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example/ios/ExampleWidget/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..13613e3e --- /dev/null +++ b/example/ios/ExampleWidget/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ExampleWidget/Assets.xcassets/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/example/ios/ExampleWidget/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json new file mode 100644 index 00000000..eb878970 --- /dev/null +++ b/example/ios/ExampleWidget/Assets.xcassets/WidgetBackground.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json b/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json new file mode 100644 index 00000000..0eddeb7c --- /dev/null +++ b/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "onesignal-logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png b/example/ios/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ba97c7a7dd4f08b2eee34231c4a115f376acc115 GIT binary patch literal 20552 zcmV*+Kr_FIP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>DPu)pGK~#8N?R^QH zTt&5hd`|^;ABu|GQ*l9D<5LkOi6k?9>r~y&BxL;S6OB&=7kp0;agRR5-3RVIQE^uU z6%-XgSw#VXfFLmm*=G9oz1=-C*%K17z4@Q-_GuDks+U=M`u4r`{eItXl9}#%t4>v& zI_K1>s#y*Whhn2rj|hpLRaEM@qES@T-WwvNPA`)Bd{L{P6p4NvYPymCy*ebdj=3+= zG|Ing%E)N^+{0WO@%Q=nyNPN>u?(h){0$9*F1Qd0Q9eqY_w}%C=sd9 z^PW9ADgtnDa7Zo&J?{yDQgc~Bu?t5R^MJmC2lf^W_8n}wKtaJuf)ap2Xw{WV8c}Xo zcpGCyR<+Pjzm04WvO*r=dM^*P{>hNm?}R0}&RJp(4xLA#r{^fPEavc_Je&DP9>^Qu zPHp1>94jXt%=mw|DyE4NmKo{`1&#Vc4zSW9t=AT{`VA}b4?=;JJnyk0LI($jb|F}@ zwFm5ELpRO-36&Yt~1 z5wU}V!&ESm&p*6k%!1I+XUkgO%!6?6W*&fWf#BL*^!GogV$|z-*1ZWG83~;(fSwK3(ogVn*qAGr{TD4>{7=#~ z92}AZ1YmJA%8;R(;PN52$GLskBqk_KROkmozW!55nI%qfIV1vAMWx@so%H6~9yX__ z96|I0#JFSy`1(+(e(5$24l|FkGW`{w{^~3$$40CvF02e!jQKrJaGrD_2Z#2fXuNr4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UDEpeqW0ca&gYL!t7*T26>sGGj|p||cvf7eu!VSTNzUylirGtST#(-Q5GZ+;c>{4%3B@ysu!~vWLlLM>No70 ze{Ar)XNwpdW(sV1oLyVuwlz-D33mkXsQ6$sO(R3bd^6Pgc&VPl3?f*v)76x}(+(t}_m=Jla{H0*b)1}%DGYwW+@577;3&qw@NhCTC6crS0#n4TWR{t6K zeoI$!IkX@D$5w4*OfJ&;9B!+%HR~6Nt7to0n`w^WSD-#R-v37QV$F_OrTnUbcoFf-TE5m>R_HRSv6T<*_yd$qa@aHSAi}=13ra1OVmc%lYdr63V3FF_fWq}?92+VRS4UJB2qWia=T_aH3EH5Qe)N?jCX<*&7m8B zU^aK4FTgE>dEBnJ7G_ht1B!|}%5Y%lv+MmHx8j#kAXdZ{*Fv_ef5VgI0a;+N_MPcu zEx68o@XEVg+CujtH0m8gM(==`Y-{ML5UwATRY}ubMMEDd=Upbc!$GjpS}<(%rL3^_ zwA0#$WnT?JsBf>zAMaKIyB#>=X~;LLPeW<+3!C@RC zqE|**U%-9mKx~OmqvDcy)%G&cY4SRUGyrZ|$PJi#-zyvQqjkNDkCewcq!l=$oIA;SnW3zm z0)!QI-%O@yU8wbIu<_c#VX7GA$ulJSf84K@L-`;cYU_iC5{eCpphL!NVK?(#@+gNa zV9@iPQ1SK8(OEEK**XZ$qCzHfS?lxG`}5r%EQe`FxwrSBMWap+4Gmyov}MlMvexl; zb|G_IYJJv5-@h|bs#kvP;Ls5uhl`cgttG8Ly<*-xw__s4 btXcmbTG6qQZ0LMh00000NkvXXu0mjfx4I7T literal 0 HcmV?d00001 diff --git a/example/ios/ExampleWidget/ExampleWidgetBundle.swift b/example/ios/ExampleWidget/ExampleWidgetBundle.swift new file mode 100644 index 00000000..71407d0a --- /dev/null +++ b/example/ios/ExampleWidget/ExampleWidgetBundle.swift @@ -0,0 +1,17 @@ +// +// ExampleWidgetBundle.swift +// ExampleWidget +// +// Created by Brian Smith on 4/30/24. +// Copyright © 2024 The Chromium Authors. All rights reserved. +// + +import WidgetKit +import SwiftUI + +@main +struct ExampleWidgetBundle: WidgetBundle { + var body: some Widget { + ExampleWidgetLiveActivity() + } +} diff --git a/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift b/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift new file mode 100644 index 00000000..f372e2ef --- /dev/null +++ b/example/ios/ExampleWidget/ExampleWidgetLiveActivity.swift @@ -0,0 +1,66 @@ +// +// ExampleWidgetLiveActivity.swift +// ExampleWidget +// +// Created by Brian Smith on 4/30/24. +// Copyright © 2024 The Chromium Authors. All rights reserved. +// + +import ActivityKit +import WidgetKit +import SwiftUI +import OneSignalLiveActivities + +struct ExampleWidgetLiveActivity: Widget { + var body: some WidgetConfiguration { + ActivityConfiguration(for: DefaultLiveActivityAttributes.self) { context in + // Lock screen/banner UI goes here\VStack(alignment: .leading) { + VStack { + Spacer() + Text("FLUTTER: " + (context.attributes.data["title"]?.asString() ?? "")).font(.headline) + Spacer() + HStack { + Spacer() + Label { + Text(context.state.data["message"]?.asDict()?["en"]?.asString() ?? "") + } icon: { + Image("onesignaldemo") + .resizable() + .scaledToFit() + .frame(width: 40.0, height: 40.0) + } + Spacer() + } + Text("INT: " + String(context.state.data["intValue"]?.asInt() ?? 0)) + Text("DBL: " + String(context.state.data["doubleValue"]?.asDouble() ?? 0.0)) + Text("BOL: " + String(context.state.data["boolValue"]?.asBool() ?? false)) + Spacer() + } + .activitySystemActionForegroundColor(.black) + .activityBackgroundTint(.white) + } dynamicIsland: { _ in + DynamicIsland { + // Expanded UI goes here. Compose the expanded UI through + // various regions, like leading/trailing/center/bottom + DynamicIslandExpandedRegion(.leading) { + Text("Leading") + } + DynamicIslandExpandedRegion(.trailing) { + Text("Trailing") + } + DynamicIslandExpandedRegion(.bottom) { + Text("Bottom") + // more content + } + } compactLeading: { + Text("L") + } compactTrailing: { + Text("T") + } minimal: { + Text("Min") + } + .widgetURL(URL(string: "http://www.apple.com")) + .keylineTint(Color.red) + } + } +} diff --git a/example/ios/ExampleWidget/Info.plist b/example/ios/ExampleWidget/Info.plist new file mode 100644 index 00000000..0f118fb7 --- /dev/null +++ b/example/ios/ExampleWidget/Info.plist @@ -0,0 +1,11 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.widgetkit-extension + + + diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9625e105..7c569640 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec index 8ce43943..98e16339 100644 --- a/example/ios/Flutter/Flutter.podspec +++ b/example/ios/Flutter/Flutter.podspec @@ -1,6 +1,6 @@ # -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# This is a generated file; do not edit or check into version control. +# This podspec is NOT to be published. It is only used as a local source! +# This is a generated file; do not edit or check into version control. # Pod::Spec.new do |s| @@ -11,7 +11,7 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD' } s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '11.0' + s.ios.deployment_target = '12.0' # Framework linking is handled by Flutter tooling, not CocoaPods. # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. s.vendored_frameworks = 'path/to/nothing' diff --git a/example/ios/Podfile b/example/ios/Podfile index 92a74ef8..e5f0c91f 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -29,10 +29,16 @@ flutter_ios_podfile_setup target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + + pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' end target 'OneSignalNotificationServiceExtension' do - pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' + pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' +end + +target 'ExampleWidgetExtension' do + pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' end post_install do |installer| diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index e658dae3..0777e286 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,45 +1,50 @@ PODS: - Flutter (1.0.0) - - onesignal_flutter (5.0.0): + - onesignal_flutter (5.1.5): - Flutter - - OneSignalXCFramework (= 5.0.1) - - OneSignalXCFramework (5.0.1): - - OneSignalXCFramework/OneSignalComplete (= 5.0.1) - - OneSignalXCFramework/OneSignal (5.0.1): + - OneSignalXCFramework (= 5.1.5) + - OneSignalXCFramework (5.1.5): + - OneSignalXCFramework/OneSignalComplete (= 5.1.5) + - OneSignalXCFramework/OneSignal (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalExtension + - OneSignalXCFramework/OneSignalLiveActivities - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalOutcomes - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalComplete (5.0.1): + - OneSignalXCFramework/OneSignalComplete (5.1.5): - OneSignalXCFramework/OneSignal - OneSignalXCFramework/OneSignalInAppMessages - OneSignalXCFramework/OneSignalLocation - - OneSignalXCFramework/OneSignalCore (5.0.1) - - OneSignalXCFramework/OneSignalExtension (5.0.1): + - OneSignalXCFramework/OneSignalCore (5.1.5) + - OneSignalXCFramework/OneSignalExtension (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalInAppMessages (5.0.1): + - OneSignalXCFramework/OneSignalInAppMessages (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalOutcomes - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLocation (5.0.1): + - OneSignalXCFramework/OneSignalLiveActivities (5.1.5): + - OneSignalXCFramework/OneSignalCore + - OneSignalXCFramework/OneSignalOSCore + - OneSignalXCFramework/OneSignalUser + - OneSignalXCFramework/OneSignalLocation (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalNotifications (5.0.1): + - OneSignalXCFramework/OneSignalNotifications (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalExtension - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalOSCore (5.0.1): + - OneSignalXCFramework/OneSignalOSCore (5.1.5): - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes (5.0.1): + - OneSignalXCFramework/OneSignalOutcomes (5.1.5): - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalUser (5.0.1): + - OneSignalXCFramework/OneSignalUser (5.1.5): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore @@ -48,23 +53,21 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - - OneSignalXCFramework (< 6.0.0, >= 5.0.1) - -SPEC REPOS: - trunk: - - OneSignalXCFramework + - OneSignalXCFramework (from `~/Development/OneSignal/onesignal-ios-sdk`) EXTERNAL SOURCES: Flutter: :path: Flutter onesignal_flutter: :path: ".symlinks/plugins/onesignal_flutter/ios" + OneSignalXCFramework: + :path: "~/Development/OneSignal/onesignal-ios-sdk" SPEC CHECKSUMS: - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - onesignal_flutter: 33912d40612d20a6b34cd77e3d783f61843493fc - OneSignalXCFramework: 8429bc2456554da1b09b17135621087152ad05a0 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + onesignal_flutter: cfda436375f94613766e5b17e1a4bf86ef701a7a + OneSignalXCFramework: f30c480b2de63da9c2c0195415cda40635552f13 -PODFILE CHECKSUM: 90d5364fb6d80b7d4d98fb125af13a6b8da34c0b +PODFILE CHECKSUM: 17387f6b1d9ca4dd8a6766c6855b77d7e10a0bd6 -COCOAPODS: 1.12.1 +COCOAPODS: 1.15.2 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 562d06cd..5c4161de 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -7,9 +7,16 @@ objects = { /* Begin PBXBuildFile section */ + 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 3370773A86F73EB1712145D3 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B51BEA71462CEE42B0AC637B /* libPods-Runner.a */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */; }; + 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */; }; + 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */; }; + 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */; }; + 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */; }; + 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; @@ -26,6 +33,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 47CD9D222BE10D9400F8B006; + remoteInfo = ExampleWidgetExtension; + }; CAB34E9E20F96F460024CA6B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 97C146E61CF9000F007C117D /* Project object */; @@ -53,6 +67,7 @@ dstSubfolderSpec = 13; files = ( CAB34E9D20F96F460024CA6B /* OneSignalNotificationServiceExtension.appex in Embed App Extensions */, + 47CD9D342BE10D9500F8B006 /* ExampleWidgetExtension.appex in Embed App Extensions */, ); name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; @@ -63,6 +78,14 @@ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ExampleWidgetExtension.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ExampleWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; + 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; + 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; + 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetBundle.swift; sourceTree = ""; }; + 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleWidgetLiveActivity.swift; sourceTree = ""; }; + 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 47CD9D312BE10D9500F8B006 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47FF2D2152AD7B79C3388A8D /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 6BBCCF44B691DF76AC7D7376 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -79,6 +102,7 @@ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; B51BEA71462CEE42B0AC637B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B6E82E5AE029B858173EAE1C /* Pods-OneSignalNotificationServiceExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.debug.xcconfig"; sourceTree = ""; }; + C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.release.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.release.xcconfig"; sourceTree = ""; }; CA23C3A020F4095B00835044 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; CA2C87DB21014E1C00D5D35D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; @@ -88,10 +112,21 @@ CAB34E9220F96BDA0024CA6B /* NotificationService.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotificationService.m; sourceTree = ""; }; CAB34E9420F96BDA0024CA6B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; CAB34E9C20F96BE60024CA6B /* OneSignalNotificationServiceExtension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OneSignalNotificationServiceExtension.entitlements; sourceTree = ""; }; + E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleWidgetExtension.debug.xcconfig"; path = "Target Support Files/Pods-ExampleWidgetExtension/Pods-ExampleWidgetExtension.debug.xcconfig"; sourceTree = ""; }; ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OneSignalNotificationServiceExtension.release.xcconfig"; path = "Target Support Files/Pods-OneSignalNotificationServiceExtension/Pods-OneSignalNotificationServiceExtension.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 47CD9D202BE10D9400F8B006 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 47CD9D272BE10D9400F8B006 /* SwiftUI.framework in Frameworks */, + 47CD9D252BE10D9400F8B006 /* WidgetKit.framework in Frameworks */, + 039D7DFFEE45276B942FFE74 /* libPods-ExampleWidgetExtension.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -114,6 +149,17 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 47CD9D282BE10D9400F8B006 /* ExampleWidget */ = { + isa = PBXGroup; + children = ( + 47CD9D292BE10D9400F8B006 /* ExampleWidgetBundle.swift */, + 47CD9D2B2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift */, + 47CD9D2F2BE10D9500F8B006 /* Assets.xcassets */, + 47CD9D312BE10D9500F8B006 /* Info.plist */, + ); + path = ExampleWidget; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -131,6 +177,7 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, CAB34E9020F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, + 47CD9D282BE10D9400F8B006 /* ExampleWidget */, 97C146EF1CF9000F007C117D /* Products */, E458450F0521E6D94C4900F1 /* Frameworks */, BA809C1A17A51DB9BC859D35 /* Pods */, @@ -142,6 +189,7 @@ children = ( 97C146EE1CF9000F007C117D /* Runner.app */, CAB34E8F20F96BDA0024CA6B /* OneSignalNotificationServiceExtension.appex */, + 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */, ); name = Products; sourceTree = ""; @@ -178,6 +226,8 @@ ED0C29CB77DA85C95D265337 /* Pods-OneSignalNotificationServiceExtension.release.xcconfig */, 6BBCCF44B691DF76AC7D7376 /* Pods-Runner.debug.xcconfig */, 47FF2D2152AD7B79C3388A8D /* Pods-Runner.release.xcconfig */, + E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */, + C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -201,6 +251,9 @@ CA2C87D921014E1800D5D35D /* SystemConfiguration.framework */, 8E4D5B9266C7F07DB2DF5189 /* libPods-OneSignalNotificationServiceExtension.a */, B51BEA71462CEE42B0AC637B /* libPods-Runner.a */, + 47CD9D242BE10D9400F8B006 /* WidgetKit.framework */, + 47CD9D262BE10D9400F8B006 /* SwiftUI.framework */, + 3D2D44FBAFF27C19CAC1AE79 /* libPods-ExampleWidgetExtension.a */, ); name = Frameworks; sourceTree = ""; @@ -208,6 +261,24 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ + 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */; + buildPhases = ( + AAFA6FB39320C73BA94587BA /* [CP] Check Pods Manifest.lock */, + 47CD9D1F2BE10D9400F8B006 /* Sources */, + 47CD9D202BE10D9400F8B006 /* Frameworks */, + 47CD9D212BE10D9400F8B006 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ExampleWidgetExtension; + productName = ExampleWidgetExtension; + productReference = 47CD9D232BE10D9400F8B006 /* ExampleWidgetExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; 97C146ED1CF9000F007C117D /* Runner */ = { isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; @@ -217,15 +288,16 @@ 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, CAB34EA020F96F460024CA6B /* Embed App Extensions */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 5726744B564FC3637D8684A2 /* [CP] Embed Pods Frameworks */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( CAB34E9F20F96F460024CA6B /* PBXTargetDependency */, + 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */, ); name = Runner; productName = Runner; @@ -256,9 +328,13 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastSwiftUpdateCheck = 1530; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { + 47CD9D222BE10D9400F8B006 = { + CreatedOnToolsVersion = 15.3; + }; 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; DevelopmentTeam = 99SW8E36CT; @@ -299,11 +375,20 @@ targets = ( 97C146ED1CF9000F007C117D /* Runner */, CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */, + 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ + 47CD9D212BE10D9400F8B006 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 47CD9D302BE10D9500F8B006 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EC1CF9000F007C117D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -334,6 +419,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -375,6 +461,7 @@ "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalCore/OneSignalCore.framework/OneSignalCore", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalExtension/OneSignalExtension.framework/OneSignalExtension", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalInAppMessages/OneSignalInAppMessages.framework/OneSignalInAppMessages", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLiveActivities/OneSignalLiveActivities.framework/OneSignalLiveActivities", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalLocation/OneSignalLocation.framework/OneSignalLocation", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalNotifications/OneSignalNotifications.framework/OneSignalNotifications", "${PODS_XCFRAMEWORKS_BUILD_DIR}/OneSignalXCFramework/OneSignalOSCore/OneSignalOSCore.framework/OneSignalOSCore", @@ -387,6 +474,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalCore.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalExtension.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalInAppMessages.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLiveActivities.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalLocation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalNotifications.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OneSignalOSCore.framework", @@ -435,9 +523,40 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n"; }; + AAFA6FB39320C73BA94587BA /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExampleWidgetExtension-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ + 47CD9D1F2BE10D9400F8B006 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 47CD9D2A2BE10D9400F8B006 /* ExampleWidgetBundle.swift in Sources */, + 47CD9D2C2BE10D9400F8B006 /* ExampleWidgetLiveActivity.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EA1CF9000F007C117D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -459,6 +578,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 47CD9D332BE10D9500F8B006 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 47CD9D222BE10D9400F8B006 /* ExampleWidgetExtension */; + targetProxy = 47CD9D322BE10D9500F8B006 /* PBXContainerItemProxy */; + }; CAB34E9F20F96F460024CA6B /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = CAB34E8E20F96BDA0024CA6B /* OneSignalNotificationServiceExtension */; @@ -486,6 +610,96 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + 47CD9D362BE10D9500F8B006 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E1B700F64C9347FDDF86950E /* Pods-ExampleWidgetExtension.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 99SW8E36CT; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ExampleWidget/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 47CD9D372BE10D9500F8B006 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = C5E2684165E64B3DC2662546 /* Pods-ExampleWidgetExtension.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 99SW8E36CT; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = ExampleWidget/Info.plist; + INFOPLIST_KEY_CFBundleDisplayName = ExampleWidget; + INFOPLIST_KEY_NSHumanReadableCopyright = "Copyright © 2024 The Chromium Authors. All rights reserved."; + IPHONEOS_DEPLOYMENT_TARGET = 17.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.onesignal.example.ExampleWidget; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -531,7 +745,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -578,7 +792,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -590,6 +804,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -619,6 +834,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; @@ -662,7 +878,7 @@ ENABLE_BITCODE = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -695,7 +911,7 @@ ENABLE_BITCODE = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OneSignalNotificationServiceExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -713,6 +929,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + 47CD9D352BE10D9500F8B006 /* Build configuration list for PBXNativeTarget "ExampleWidgetExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 47CD9D362BE10D9500F8B006 /* Debug */, + 47CD9D372BE10D9500F8B006 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 50a8cfc9..cdef6845 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + CADisableMinimumFrameDurationOnPhone + CFBundleDevelopmentRegion en CFBundleDisplayName @@ -29,6 +31,10 @@ NSAllowsArbitraryLoads + NSSupportsLiveActivities + + UIApplicationSupportsIndirectInputEvents + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -48,9 +54,5 @@ UIViewControllerBasedStatusBarAppearance - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - diff --git a/example/lib/main.dart b/example/lib/main.dart index 1016ad3d..0dfa1b2a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -17,6 +17,7 @@ class _MyAppState extends State { String? _smsNumber; String? _externalUserId; String? _language; + String? _liveActivityId; bool _enableConsentButton = false; // CHANGE THIS parameter to true if you want to test GDPR privacy consent @@ -38,7 +39,10 @@ class _MyAppState extends State { OneSignal.consentRequired(_requireConsent); // NOTE: Replace with your own app ID from https://www.onesignal.com - OneSignal.initialize("0ba9731b-33bd-43f4-8b59-61172e27447d"); + OneSignal.initialize("77e32082-ea27-42e3-a898-c72e141824ef"); + + OneSignal.LiveActivities.setupDefault(); + // OneSignal.LiveActivities.setupDefault(options: new LiveActivitySetupOptions(enablePushToStart: false, enablePushToUpdate: true)); // AndroidOnly stat only // OneSignal.Notifications.removeNotification(1); @@ -267,6 +271,36 @@ class _MyAppState extends State { OneSignal.User.pushSubscription.optOut(); } + void _handleStartDefaultLiveActivity() { + if (_liveActivityId == null) return; + print("Starting default live activity"); + OneSignal.LiveActivities.startDefault(_liveActivityId!, {"title": "Welcome!"}, { "message": { "en": "Hello World!" }, "intValue": 3, "doubleValue": 3.14, "boolValue": true}); + } + + void _handleEnterLiveActivity() { + if (_liveActivityId == null) return; + print("Entering live activity"); + OneSignal.LiveActivities.enterLiveActivity(_liveActivityId!, "FAKE_TOKEN"); + } + + void _handleExitLiveActivity() { + if (_liveActivityId == null) return; + print("Exiting live activity"); + OneSignal.LiveActivities.exitLiveActivity(_liveActivityId!); + } + + void _handleSetPushToStartLiveActivity() { + if (_liveActivityId == null) return; + print("Setting Push-To-Start live activity"); + OneSignal.LiveActivities.setPushToStartToken(_liveActivityId!, "FAKE_TOKEN"); + } + + void _handleRemovePushToStartLiveActivity() { + if (_liveActivityId == null) return; + print("Setting Push-To-Start live activity"); + OneSignal.LiveActivities.removePushToStartToken(_liveActivityId!); + } + @override Widget build(BuildContext context) { return new MaterialApp( @@ -434,6 +468,46 @@ class _MyAppState extends State { new OneSignalButton( "Opt Out", _handleOptOut, !_enableConsentButton) ]), + new TableRow(children: [ + new TextField( + textAlign: TextAlign.center, + decoration: InputDecoration( + hintText: "Live Activity ID", + labelStyle: TextStyle( + color: Color.fromARGB(255, 212, 86, 83), + )), + onChanged: (text) { + this.setState(() { + _liveActivityId = text == "" ? null : text; + }); + }, + ) + ]), + new TableRow(children: [ + Container( + height: 8.0, + ) + ]), + new TableRow(children: [ + new OneSignalButton("Start Default Live Activity", + _handleStartDefaultLiveActivity, !_enableConsentButton) + ]), + new TableRow(children: [ + new OneSignalButton("Enter Live Activity", + _handleEnterLiveActivity, !_enableConsentButton) + ]), + new TableRow(children: [ + new OneSignalButton("Exit Live Activity", + _handleExitLiveActivity, !_enableConsentButton) + ]), + new TableRow(children: [ + new OneSignalButton("Set Push-To-Start Live Activity", + _handleSetPushToStartLiveActivity, !_enableConsentButton) + ]), + new TableRow(children: [ + new OneSignalButton("Remove Push-To-Start Live Activity", + _handleRemovePushToStartLiveActivity, !_enableConsentButton) + ]), ], ), ), diff --git a/ios/Classes/OSFlutterLiveActivities.m b/ios/Classes/OSFlutterLiveActivities.m index bb91344a..5a63fef4 100644 --- a/ios/Classes/OSFlutterLiveActivities.m +++ b/ios/Classes/OSFlutterLiveActivities.m @@ -27,6 +27,7 @@ #import "OSFlutterLiveActivities.h" #import +#import "OneSignalLiveActivities/OneSignalLiveActivities-Swift.h" #import "OSFlutterCategories.h" @implementation OSFlutterLiveActivities @@ -45,6 +46,14 @@ - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result { [self enterLiveActivity:call withResult:result]; else if ([@"OneSignal#exitLiveActivity" isEqualToString:call.method]) [self exitLiveActivity:call withResult:result]; + else if ([@"OneSignal#setPushToStartToken" isEqualToString:call.method]) + [self setPushToStartToken:call withResult:result]; + else if ([@"OneSignal#removePushToStartToken" isEqualToString:call.method]) + [self removePushToStartToken:call withResult:result]; + else if ([@"OneSignal#setupDefault" isEqualToString:call.method]) + [self setupDefault:call withResult:result]; + else if ([@"OneSignal#startDefault" isEqualToString:call.method]) + [self startDefault:call withResult:result]; else result(FlutterMethodNotImplemented); } @@ -70,4 +79,59 @@ - (void)exitLiveActivity:(FlutterMethodCall *)call withResult:(FlutterResult)res }]; } -@end \ No newline at end of file +- (void)setPushToStartToken:(FlutterMethodCall *)call withResult:(FlutterResult)result { + NSString *activityType = call.arguments[@"activityType"]; + NSString *token = call.arguments[@"token"]; + + @autoreleasepool { + NSError* err=nil; + [OneSignalLiveActivitiesManagerImpl setPushToStartToken:activityType withToken:token error:&err]; + if (err) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"activityType must be the name of your ActivityAttributes struct"]]; + } + } +} + +- (void)removePushToStartToken:(FlutterMethodCall *)call withResult:(FlutterResult)result { + NSString *activityType = call.arguments[@"activityType"]; + + @autoreleasepool { + NSError* err=nil; + [OneSignalLiveActivitiesManagerImpl removePushToStartToken:activityType error:&err]; + if (err) { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"activityType must be the name of your ActivityAttributes struct"]]; + } + } +} + +- (void)setupDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result { + NSDictionary *options = call.arguments[@"options"]; + + LiveActivitySetupOptions *laOptions = nil; + + if (options != [NSNull null]) { + laOptions = [LiveActivitySetupOptions alloc]; + [laOptions setEnablePushToStart:[options[@"enablePushToStart"] boolValue]]; + [laOptions setEnablePushToUpdate:[options[@"enablePushToUpdate"] boolValue]]; + } + + if (@available(iOS 16.1, *)) { + [OneSignalLiveActivitiesManagerImpl setupDefaultWithOptions:laOptions]; + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot setupDefault on iOS < 16.1"]]; + } +} + +- (void)startDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result { + NSString *activityId = call.arguments[@"activityId"]; + NSDictionary *attributes = call.arguments[@"attributes"]; + NSDictionary *content = call.arguments[@"content"]; + + if (@available(iOS 16.1, *)) { + [OneSignalLiveActivitiesManagerImpl startDefault:activityId attributes:attributes content:content]; + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot startDefault on iOS < 16.1"]]; + } +} + +@end diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index ccff659f..81093625 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -6,8 +6,14 @@ class OneSignalLiveActivities { // private channels used to bridge to ObjC/Java MethodChannel _channel = const MethodChannel('OneSignal#liveactivities'); - /// Only applies to iOS - /// Associates a temporary push token with an Activity ID on the OneSignal server. + /** + * Indicate this device has exited a live activity, identified within OneSignal by the `activityId`. + * + * Only applies to iOS + * + * @param activityId: The activity identifier the live activity on this device will receive updates for. + * @param token: The activity's update token to receive the updates. + **/ Future enterLiveActivity(String activityId, String token) async { if (Platform.isIOS) { return await _channel.invokeMethod("OneSignal#enterLiveActivity", @@ -15,12 +21,128 @@ class OneSignalLiveActivities { } } - /// Only applies to iOS - /// Deletes activityId associated temporary push token on the OneSignal server. + /** + * Indicate this device has exited a live activity, identified within OneSignal by the `activityId`. + * + * Only applies to iOS + * + * @param activityId: The activity identifier the live activity on this device will no longer receive updates for. + **/ Future exitLiveActivity(String activityId) async { if (Platform.isIOS) { return await _channel.invokeMethod( "OneSignal#exitLiveActivity", {'activityId': activityId}); } } + + /** + * Enable the OneSignalSDK to setup the default`DefaultLiveActivityAttributes` structure, + * which conforms to the `OneSignalLiveActivityAttributes`. When using this function, the + * widget attributes are owned by the OneSignal SDK, which will allow the SDK to handle the + * entire lifecycle of the live activity. All that is needed from an app-perspective is to + * create a Live Activity widget in a widget extension, with a `ActivityConfiguration` for + * `DefaultLiveActivityAttributes`. This is most useful for users that (1) only have one Live + * Activity widget and (2) are using a cross-platform framework and do not want to create the + * cross-platform <-> iOS native bindings to manage ActivityKit. + * + * Only applies to iOS + * + * @param options: An optional structure to provide for more granular setup options. + */ + Future setupDefault({LiveActivitySetupOptions? options=null}) async { + if (Platform.isIOS) { + dynamic optionsMap = null; + + if(options != null) { + optionsMap = { + 'enablePushToStart': options.enablePushToStart, + 'enablePushToUpdate': options.enablePushToUpdate, + }; + } + + return await _channel.invokeMethod( + "OneSignal#setupDefault", {'options': optionsMap }); + } + } + + /** + * Start a new LiveActivity that is modelled by the default`DefaultLiveActivityAttributes` + * structure. The `DefaultLiveActivityAttributes` is initialized with the dynamic `attributes` + * and `content` passed in. + * + * Only applies to iOS + * + * @param activityId: The activity identifier the live activity on this device will be started + * and eligible to receive updates for. + * @param attributes: A dynamic type containing the static attributes passed into `DefaultLiveActivityAttributes`. + * @param content: A dynamic type containing the content attributes passed into `DefaultLiveActivityAttributes`. + */ + Future startDefault(String activityId, dynamic attributes, dynamic content) async { + if (Platform.isIOS) { + return await _channel.invokeMethod( + "OneSignal#startDefault", { 'activityId': activityId, 'attributes': attributes, 'content': content }); + } + } + + /** + * Indicate this device is capable of receiving pushToStart live activities for the + * `activityType`. The `activityType` **must** be the name of the struct conforming + * to `ActivityAttributes` that will be used to start the live activity. + * + * Only applies to iOS + * + * @param activityType: The name of the specific `ActivityAttributes` structure tied + * to the live activity. + * @param token: The activity type's pushToStart token. + */ + Future setPushToStartToken(String activityType, String token) async { + if (Platform.isIOS) { + return await _channel.invokeMethod("OneSignal#setPushToStartToken", + {'activityType': activityType, 'token': token}); + } + } + + /** + * Indicate this device is no longer capable of receiving pushToStart live activities + * for the `activityType`. The `activityType` **must** be the name of the struct conforming + * to `ActivityAttributes` that will be used to start the live activity. + * + * Only applies to iOS + * + * @param activityType: The name of the specific `ActivityAttributes` structure tied + * to the live activity. + */ + Future removePushToStartToken(String activityType) async { + if (Platform.isIOS) { + return await _channel.invokeMethod( + "OneSignal#removePushToStartToken", {'activityType': activityType}); + } + } } + +/** + * The setup options for `OneSignal.LiveActivities.setupDefault`. + */ +class LiveActivitySetupOptions { + bool _enablePushToStart = true; + bool _enablePushToUpdate = true; + + LiveActivitySetupOptions({bool enablePushToStart = true, bool enablePushToUpdate = true}) { + this._enablePushToStart = enablePushToStart; + this._enablePushToUpdate = enablePushToUpdate; + } + + /** + * When true, OneSignal will listen for pushToStart tokens. + */ + bool get enablePushToStart { + return this._enablePushToStart; + } + + /** + * When true, OneSignal will listen for pushToUpdate tokens for each started live activity. + */ + bool get enablePushToUpdate { + return this._enablePushToUpdate; + } +} \ No newline at end of file From 077ef93f851c59bd979564eef99bf8132bde800e Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 13 May 2024 13:24:29 -0400 Subject: [PATCH 2/7] Update podfiles to use OneSignalXCFramework 5.2.0 --- example/ios/Podfile | 6 ++--- example/ios/Podfile.lock | 42 ++++++++++++++++++----------------- ios/onesignal_flutter.podspec | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/example/ios/Podfile b/example/ios/Podfile index e5f0c91f..33fe22f4 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -29,16 +29,14 @@ flutter_ios_podfile_setup target 'Runner' do flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - - pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' end target 'OneSignalNotificationServiceExtension' do - pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' + pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' end target 'ExampleWidgetExtension' do - pod 'OneSignalXCFramework', :path => '~/Development/OneSignal/onesignal-ios-sdk' + pod 'OneSignalXCFramework', '>= 5.0.2', '< 6.0.0' end post_install do |installer| diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 0777e286..6f5efb0f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -2,10 +2,10 @@ PODS: - Flutter (1.0.0) - onesignal_flutter (5.1.5): - Flutter - - OneSignalXCFramework (= 5.1.5) - - OneSignalXCFramework (5.1.5): - - OneSignalXCFramework/OneSignalComplete (= 5.1.5) - - OneSignalXCFramework/OneSignal (5.1.5): + - OneSignalXCFramework (= 5.2.0) + - OneSignalXCFramework (5.2.0): + - OneSignalXCFramework/OneSignalComplete (= 5.2.0) + - OneSignalXCFramework/OneSignal (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalExtension - OneSignalXCFramework/OneSignalLiveActivities @@ -13,38 +13,38 @@ PODS: - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalOutcomes - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalComplete (5.1.5): + - OneSignalXCFramework/OneSignalComplete (5.2.0): - OneSignalXCFramework/OneSignal - OneSignalXCFramework/OneSignalInAppMessages - OneSignalXCFramework/OneSignalLocation - - OneSignalXCFramework/OneSignalCore (5.1.5) - - OneSignalXCFramework/OneSignalExtension (5.1.5): + - OneSignalXCFramework/OneSignalCore (5.2.0) + - OneSignalXCFramework/OneSignalExtension (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalInAppMessages (5.1.5): + - OneSignalXCFramework/OneSignalInAppMessages (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalOutcomes - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLiveActivities (5.1.5): + - OneSignalXCFramework/OneSignalLiveActivities (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalLocation (5.1.5): + - OneSignalXCFramework/OneSignalLocation (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore - OneSignalXCFramework/OneSignalUser - - OneSignalXCFramework/OneSignalNotifications (5.1.5): + - OneSignalXCFramework/OneSignalNotifications (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalExtension - OneSignalXCFramework/OneSignalOutcomes - - OneSignalXCFramework/OneSignalOSCore (5.1.5): + - OneSignalXCFramework/OneSignalOSCore (5.2.0): - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalOutcomes (5.1.5): + - OneSignalXCFramework/OneSignalOutcomes (5.2.0): - OneSignalXCFramework/OneSignalCore - - OneSignalXCFramework/OneSignalUser (5.1.5): + - OneSignalXCFramework/OneSignalUser (5.2.0): - OneSignalXCFramework/OneSignalCore - OneSignalXCFramework/OneSignalNotifications - OneSignalXCFramework/OneSignalOSCore @@ -53,21 +53,23 @@ PODS: DEPENDENCIES: - Flutter (from `Flutter`) - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`) - - OneSignalXCFramework (from `~/Development/OneSignal/onesignal-ios-sdk`) + - OneSignalXCFramework (< 6.0.0, >= 5.0.2) + +SPEC REPOS: + trunk: + - OneSignalXCFramework EXTERNAL SOURCES: Flutter: :path: Flutter onesignal_flutter: :path: ".symlinks/plugins/onesignal_flutter/ios" - OneSignalXCFramework: - :path: "~/Development/OneSignal/onesignal-ios-sdk" SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 - onesignal_flutter: cfda436375f94613766e5b17e1a4bf86ef701a7a - OneSignalXCFramework: f30c480b2de63da9c2c0195415cda40635552f13 + onesignal_flutter: 6e7b22bc9bbdb32cbaf79728e624a02264adec94 + OneSignalXCFramework: bdf74fdc06888f9466dc21e826fe1549ed143095 -PODFILE CHECKSUM: 17387f6b1d9ca4dd8a6766c6855b77d7e10a0bd6 +PODFILE CHECKSUM: 4866dde54f21b323e83902730ef350ff4a561f44 COCOAPODS: 1.15.2 diff --git a/ios/onesignal_flutter.podspec b/ios/onesignal_flutter.podspec index ca1269ec..7df09cd5 100644 --- a/ios/onesignal_flutter.podspec +++ b/ios/onesignal_flutter.podspec @@ -13,7 +13,7 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.dependency 'OneSignalXCFramework', '5.1.5' + s.dependency 'OneSignalXCFramework', '5.2.0' s.ios.deployment_target = '11.0' s.static_framework = true end From e6e797f6e2851ffd91dd0967a08f9270491b1f13 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 13 May 2024 13:36:51 -0400 Subject: [PATCH 3/7] Fix doc comment format --- lib/src/liveactivities.dart | 109 +++++++++++++----------------------- 1 file changed, 38 insertions(+), 71 deletions(-) diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 81093625..26f219e0 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -6,14 +6,10 @@ class OneSignalLiveActivities { // private channels used to bridge to ObjC/Java MethodChannel _channel = const MethodChannel('OneSignal#liveactivities'); - /** - * Indicate this device has exited a live activity, identified within OneSignal by the `activityId`. - * - * Only applies to iOS - * - * @param activityId: The activity identifier the live activity on this device will receive updates for. - * @param token: The activity's update token to receive the updates. - **/ + /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. The + /// [token] is the ActivityKit's update token that will be used to update the live activity. + /// + /// Only applies to iOS. Future enterLiveActivity(String activityId, String token) async { if (Platform.isIOS) { return await _channel.invokeMethod("OneSignal#enterLiveActivity", @@ -21,13 +17,9 @@ class OneSignalLiveActivities { } } - /** - * Indicate this device has exited a live activity, identified within OneSignal by the `activityId`. - * - * Only applies to iOS - * - * @param activityId: The activity identifier the live activity on this device will no longer receive updates for. - **/ + /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. + /// + /// Only applies to iOS. Future exitLiveActivity(String activityId) async { if (Platform.isIOS) { return await _channel.invokeMethod( @@ -35,20 +27,17 @@ class OneSignalLiveActivities { } } - /** - * Enable the OneSignalSDK to setup the default`DefaultLiveActivityAttributes` structure, - * which conforms to the `OneSignalLiveActivityAttributes`. When using this function, the - * widget attributes are owned by the OneSignal SDK, which will allow the SDK to handle the - * entire lifecycle of the live activity. All that is needed from an app-perspective is to - * create a Live Activity widget in a widget extension, with a `ActivityConfiguration` for - * `DefaultLiveActivityAttributes`. This is most useful for users that (1) only have one Live - * Activity widget and (2) are using a cross-platform framework and do not want to create the - * cross-platform <-> iOS native bindings to manage ActivityKit. - * - * Only applies to iOS - * - * @param options: An optional structure to provide for more granular setup options. - */ + /// Enable the OneSignalSDK to setup the default`DefaultLiveActivityAttributes` structure, + /// which conforms to the `OneSignalLiveActivityAttributes`. When using this function, the + /// widget attributes are owned by the OneSignal SDK, which will allow the SDK to handle the + /// entire lifecycle of the live activity. All that is needed from an app-perspective is to + /// create a Live Activity widget in a widget extension, with a `ActivityConfiguration` for + /// `DefaultLiveActivityAttributes`. This is most useful for users that (1) only have one Live + /// Activity widget and (2) are using a cross-platform framework and do not want to create the + /// cross-platform <-> iOS native bindings to manage ActivityKit. An optional [options] + /// parameter can be provided for more granular setup options. + /// + /// Only applies to iOS. Future setupDefault({LiveActivitySetupOptions? options=null}) async { if (Platform.isIOS) { dynamic optionsMap = null; @@ -65,18 +54,12 @@ class OneSignalLiveActivities { } } - /** - * Start a new LiveActivity that is modelled by the default`DefaultLiveActivityAttributes` - * structure. The `DefaultLiveActivityAttributes` is initialized with the dynamic `attributes` - * and `content` passed in. - * - * Only applies to iOS - * - * @param activityId: The activity identifier the live activity on this device will be started - * and eligible to receive updates for. - * @param attributes: A dynamic type containing the static attributes passed into `DefaultLiveActivityAttributes`. - * @param content: A dynamic type containing the content attributes passed into `DefaultLiveActivityAttributes`. - */ + /// Start a new LiveActivity that is modelled by the default`DefaultLiveActivityAttributes` + /// structure. The `DefaultLiveActivityAttributes` is initialized with the dynamic [attributes] + /// and [content] passed in. The live activity started can be updated with the [activityId] + /// provided. + /// + /// Only applies to iOS. Future startDefault(String activityId, dynamic attributes, dynamic content) async { if (Platform.isIOS) { return await _channel.invokeMethod( @@ -84,17 +67,12 @@ class OneSignalLiveActivities { } } - /** - * Indicate this device is capable of receiving pushToStart live activities for the - * `activityType`. The `activityType` **must** be the name of the struct conforming - * to `ActivityAttributes` that will be used to start the live activity. - * - * Only applies to iOS - * - * @param activityType: The name of the specific `ActivityAttributes` structure tied - * to the live activity. - * @param token: The activity type's pushToStart token. - */ + /// Indicate this device is capable of receiving pushToStart live activities for the + /// [activityType]. The [activityType] **must** be the name of the struct conforming + /// to `ActivityAttributes` that will be used to start the live activity. The [token] + /// is ActivityKit's pushToStart token that will be used to start the live activity. + /// + /// Only applies to iOS. Future setPushToStartToken(String activityType, String token) async { if (Platform.isIOS) { return await _channel.invokeMethod("OneSignal#setPushToStartToken", @@ -102,16 +80,11 @@ class OneSignalLiveActivities { } } - /** - * Indicate this device is no longer capable of receiving pushToStart live activities - * for the `activityType`. The `activityType` **must** be the name of the struct conforming - * to `ActivityAttributes` that will be used to start the live activity. - * - * Only applies to iOS - * - * @param activityType: The name of the specific `ActivityAttributes` structure tied - * to the live activity. - */ + /// Indicate this device is no longer capable of receiving pushToStart live activities + /// for the [activityType]. The [activityType] **must** be the name of the struct conforming + /// to `ActivityAttributes` that will be used to start the live activity. + /// + /// Only applies to iOS. Future removePushToStartToken(String activityType) async { if (Platform.isIOS) { return await _channel.invokeMethod( @@ -120,9 +93,7 @@ class OneSignalLiveActivities { } } -/** - * The setup options for `OneSignal.LiveActivities.setupDefault`. - */ +/// The setup options for [OneSignal.LiveActivities.setupDefault]. class LiveActivitySetupOptions { bool _enablePushToStart = true; bool _enablePushToUpdate = true; @@ -132,16 +103,12 @@ class LiveActivitySetupOptions { this._enablePushToUpdate = enablePushToUpdate; } - /** - * When true, OneSignal will listen for pushToStart tokens. - */ + /// When true, OneSignal will listen for pushToStart tokens. bool get enablePushToStart { return this._enablePushToStart; } - /** - * When true, OneSignal will listen for pushToUpdate tokens for each started live activity. - */ + /// When true, OneSignal will listen for pushToUpdate tokens for each started live activity. bool get enablePushToUpdate { return this._enablePushToUpdate; } From 9fa959f2ce32eaf87103d91221555aef434e4710 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 13 May 2024 13:40:47 -0400 Subject: [PATCH 4/7] FIx for avoid_init_to_null --- lib/src/liveactivities.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 26f219e0..9a54efd9 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -38,9 +38,9 @@ class OneSignalLiveActivities { /// parameter can be provided for more granular setup options. /// /// Only applies to iOS. - Future setupDefault({LiveActivitySetupOptions? options=null}) async { + Future setupDefault({LiveActivitySetupOptions? options}) async { if (Platform.isIOS) { - dynamic optionsMap = null; + dynamic optionsMap; if(options != null) { optionsMap = { From efcfea7b882b7493e041e7cdb980741bb9391da2 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 13 May 2024 13:46:29 -0400 Subject: [PATCH 5/7] run dart format for liveactivities.dart --- lib/src/liveactivities.dart | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/src/liveactivities.dart b/lib/src/liveactivities.dart index 9a54efd9..aaf0f65e 100644 --- a/lib/src/liveactivities.dart +++ b/lib/src/liveactivities.dart @@ -19,7 +19,7 @@ class OneSignalLiveActivities { /// Indicate this device has exited a live activity, identified within OneSignal by the [activityId]. /// - /// Only applies to iOS. + /// Only applies to iOS. Future exitLiveActivity(String activityId) async { if (Platform.isIOS) { return await _channel.invokeMethod( @@ -41,16 +41,16 @@ class OneSignalLiveActivities { Future setupDefault({LiveActivitySetupOptions? options}) async { if (Platform.isIOS) { dynamic optionsMap; - - if(options != null) { + + if (options != null) { optionsMap = { 'enablePushToStart': options.enablePushToStart, 'enablePushToUpdate': options.enablePushToUpdate, }; - } + } - return await _channel.invokeMethod( - "OneSignal#setupDefault", {'options': optionsMap }); + return await _channel + .invokeMethod("OneSignal#setupDefault", {'options': optionsMap}); } } @@ -60,10 +60,14 @@ class OneSignalLiveActivities { /// provided. /// /// Only applies to iOS. - Future startDefault(String activityId, dynamic attributes, dynamic content) async { + Future startDefault( + String activityId, dynamic attributes, dynamic content) async { if (Platform.isIOS) { - return await _channel.invokeMethod( - "OneSignal#startDefault", { 'activityId': activityId, 'attributes': attributes, 'content': content }); + return await _channel.invokeMethod("OneSignal#startDefault", { + 'activityId': activityId, + 'attributes': attributes, + 'content': content + }); } } @@ -98,7 +102,8 @@ class LiveActivitySetupOptions { bool _enablePushToStart = true; bool _enablePushToUpdate = true; - LiveActivitySetupOptions({bool enablePushToStart = true, bool enablePushToUpdate = true}) { + LiveActivitySetupOptions( + {bool enablePushToStart = true, bool enablePushToUpdate = true}) { this._enablePushToStart = enablePushToStart; this._enablePushToUpdate = enablePushToUpdate; } @@ -112,4 +117,4 @@ class LiveActivitySetupOptions { bool get enablePushToUpdate { return this._enablePushToUpdate; } -} \ No newline at end of file +} From 452f6bd9519e8306ecf9f38cf5c5fa13a7e96853 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 13 May 2024 13:50:09 -0400 Subject: [PATCH 6/7] run dart format for example app --- example/lib/main.dart | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 0dfa1b2a..dd51f862 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -274,7 +274,14 @@ class _MyAppState extends State { void _handleStartDefaultLiveActivity() { if (_liveActivityId == null) return; print("Starting default live activity"); - OneSignal.LiveActivities.startDefault(_liveActivityId!, {"title": "Welcome!"}, { "message": { "en": "Hello World!" }, "intValue": 3, "doubleValue": 3.14, "boolValue": true}); + OneSignal.LiveActivities.startDefault(_liveActivityId!, { + "title": "Welcome!" + }, { + "message": {"en": "Hello World!"}, + "intValue": 3, + "doubleValue": 3.14, + "boolValue": true + }); } void _handleEnterLiveActivity() { @@ -292,7 +299,8 @@ class _MyAppState extends State { void _handleSetPushToStartLiveActivity() { if (_liveActivityId == null) return; print("Setting Push-To-Start live activity"); - OneSignal.LiveActivities.setPushToStartToken(_liveActivityId!, "FAKE_TOKEN"); + OneSignal.LiveActivities.setPushToStartToken( + _liveActivityId!, "FAKE_TOKEN"); } void _handleRemovePushToStartLiveActivity() { @@ -501,12 +509,16 @@ class _MyAppState extends State { _handleExitLiveActivity, !_enableConsentButton) ]), new TableRow(children: [ - new OneSignalButton("Set Push-To-Start Live Activity", - _handleSetPushToStartLiveActivity, !_enableConsentButton) + new OneSignalButton( + "Set Push-To-Start Live Activity", + _handleSetPushToStartLiveActivity, + !_enableConsentButton) ]), new TableRow(children: [ - new OneSignalButton("Remove Push-To-Start Live Activity", - _handleRemovePushToStartLiveActivity, !_enableConsentButton) + new OneSignalButton( + "Remove Push-To-Start Live Activity", + _handleRemovePushToStartLiveActivity, + !_enableConsentButton) ]), ], ), From bd03ab74ad3b6cd0e5e019ee1e00627851465ef5 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 14 May 2024 11:37:46 -0400 Subject: [PATCH 7/7] Add iOS version checks consistently Remove autorelease pool --- ios/Classes/OSFlutterLiveActivities.m | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ios/Classes/OSFlutterLiveActivities.m b/ios/Classes/OSFlutterLiveActivities.m index 5a63fef4..b7c4a44d 100644 --- a/ios/Classes/OSFlutterLiveActivities.m +++ b/ios/Classes/OSFlutterLiveActivities.m @@ -82,26 +82,34 @@ - (void)exitLiveActivity:(FlutterMethodCall *)call withResult:(FlutterResult)res - (void)setPushToStartToken:(FlutterMethodCall *)call withResult:(FlutterResult)result { NSString *activityType = call.arguments[@"activityType"]; NSString *token = call.arguments[@"token"]; + NSError* err=nil; - @autoreleasepool { - NSError* err=nil; + if (@available(iOS 17.2, *)) { [OneSignalLiveActivitiesManagerImpl setPushToStartToken:activityType withToken:token error:&err]; if (err) { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"activityType must be the name of your ActivityAttributes struct"]]; } + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot setPushToStartToken on iOS < 17.2"]]; } + + result(nil); } - (void)removePushToStartToken:(FlutterMethodCall *)call withResult:(FlutterResult)result { NSString *activityType = call.arguments[@"activityType"]; + NSError* err=nil; - @autoreleasepool { - NSError* err=nil; + if (@available(iOS 17.2, *)) { [OneSignalLiveActivitiesManagerImpl removePushToStartToken:activityType error:&err]; if (err) { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"activityType must be the name of your ActivityAttributes struct"]]; } + } else { + [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot removePushToStartToken on iOS < 17.2"]]; } + + result(nil); } - (void)setupDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result { @@ -120,6 +128,8 @@ - (void)setupDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot setupDefault on iOS < 16.1"]]; } + + result(nil); } - (void)startDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result { @@ -132,6 +142,8 @@ - (void)startDefault:(FlutterMethodCall *)call withResult:(FlutterResult)result } else { [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot startDefault on iOS < 16.1"]]; } + + result(nil); } @end