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SBMWap+4Gmyov}MlMvexl;
zb|G_IYJJv5-@h|bs#kvP;Ls5uhl`cgttG8Ly<*-xw__s4
btXcmbTG6qQZ0LMh00000NkvXXu0mjfx4I7T
literal 0
HcmV?d00001
diff --git a/OneSignalExample/iOS/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png.meta b/OneSignalExample/iOS/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png.meta
new file mode 100644
index 000000000..21b191a4f
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/Assets.xcassets/onesignaldemo.imageset/onesignal-logo.png.meta
@@ -0,0 +1,153 @@
+fileFormatVersion: 2
+guid: 5330de67d64a34e109f6a3acb6986814
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 12
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 1
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 0
+ wrapV: 0
+ wrapW: 0
+ nPOTScale: 1
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 0
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 0
+ spriteTessellationDetail: -1
+ textureType: 0
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 3
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: iPhone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Android
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 3
+ buildTarget: Server
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ physicsShape: []
+ bones: []
+ spriteID:
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift
new file mode 100644
index 000000000..2edbef044
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift
@@ -0,0 +1,16 @@
+//
+// ExampleWidgetBundle.swift
+// ExampleWidget
+//
+// Created by Brian Smith on 5/29/24.
+//
+
+import WidgetKit
+import SwiftUI
+
+@main
+struct ExampleWidgetBundle: WidgetBundle {
+ var body: some Widget {
+ ExampleWidgetLiveActivity()
+ }
+}
diff --git a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift.meta b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift.meta
new file mode 100644
index 000000000..c11dd5bac
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetBundle.swift.meta
@@ -0,0 +1,37 @@
+fileFormatVersion: 2
+guid: 5b4b5ae244087446083c871541cf53b3
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift
new file mode 100644
index 000000000..5291428c7
--- /dev/null
+++ b/OneSignalExample/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("UNITY: " + (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/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift.meta b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift.meta
new file mode 100644
index 000000000..7ba061680
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/ExampleWidgetLiveActivity.swift.meta
@@ -0,0 +1,37 @@
+fileFormatVersion: 2
+guid: eee3df79e4a3b45208880907b672c964
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ tvOS: tvOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/OneSignalExample/iOS/ExampleWidget/Info.plist b/OneSignalExample/iOS/ExampleWidget/Info.plist
new file mode 100644
index 000000000..f42024eb2
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/Info.plist
@@ -0,0 +1,29 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ ExampleWidget
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ $(PRODUCT_BUNDLE_PACKAGE_TYPE)
+ CFBundleShortVersionString
+ 5.1.6
+ CFBundleVersion
+ 2
+ NSExtension
+
+ NSExtensionPointIdentifier
+ com.apple.widgetkit-extension
+
+
+
diff --git a/OneSignalExample/iOS/ExampleWidget/Info.plist.meta b/OneSignalExample/iOS/ExampleWidget/Info.plist.meta
new file mode 100644
index 000000000..3098607f2
--- /dev/null
+++ b/OneSignalExample/iOS/ExampleWidget/Info.plist.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9fd871a90f3ce4bf3875c717afe6ef95
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/com.onesignal.unity.android/Runtime/AndroidLiveActivitiesManager.cs b/com.onesignal.unity.android/Runtime/AndroidLiveActivitiesManager.cs
index 33311e0e1..c22b317e4 100644
--- a/com.onesignal.unity.android/Runtime/AndroidLiveActivitiesManager.cs
+++ b/com.onesignal.unity.android/Runtime/AndroidLiveActivitiesManager.cs
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
using UnityEngine;
+using System.Collections.Generic;
using System.Threading.Tasks;
using OneSignalSDK.LiveActivities;
using OneSignalSDK.Debug.Utilities;
@@ -40,5 +41,25 @@ public Task ExitAsync(string activityId) {
SDKDebug.Warn("This feature is only available for iOS.");
return Task.FromResult(false);
}
+
+ public void RemovePushToStartToken(string activityType)
+ {
+ SDKDebug.Warn("This feature is only available for iOS.");
+ }
+
+ public void SetPushToStartToken(string activityType, string token)
+ {
+ SDKDebug.Warn("This feature is only available for iOS.");
+ }
+
+ public void SetupDefault(LiveActivitySetupOptions options = null)
+ {
+ SDKDebug.Warn("This feature is only available for iOS.");
+ }
+
+ public void StartDefault(string activityId, IDictionary attributes, IDictionary content)
+ {
+ SDKDebug.Warn("This feature is only available for iOS.");
+ }
}
}
\ No newline at end of file
diff --git a/com.onesignal.unity.core/Editor/Platform/LiveActivitiesManager.cs b/com.onesignal.unity.core/Editor/Platform/LiveActivitiesManager.cs
index 60a8bfb01..a1034dc86 100644
--- a/com.onesignal.unity.core/Editor/Platform/LiveActivitiesManager.cs
+++ b/com.onesignal.unity.core/Editor/Platform/LiveActivitiesManager.cs
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
+using System.Collections.Generic;
using System.Threading.Tasks;
namespace OneSignalSDK.LiveActivities {
@@ -36,5 +37,25 @@ public Task EnterAsync(string activityId, string token) {
public Task ExitAsync(string activityId) {
return Task.FromResult(false);
}
+
+ public void RemovePushToStartToken(string activityType)
+ {
+
+ }
+
+ public void SetPushToStartToken(string activityType, string token)
+ {
+
+ }
+
+ public void SetupDefault(LiveActivitySetupOptions options = null)
+ {
+
+ }
+
+ public void StartDefault(string activityId, IDictionary attributes, IDictionary content)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/com.onesignal.unity.core/Runtime/LiveActivities/ILiveActivitiesManager.cs b/com.onesignal.unity.core/Runtime/LiveActivities/ILiveActivitiesManager.cs
index c4b7b8389..61a8f02ef 100644
--- a/com.onesignal.unity.core/Runtime/LiveActivities/ILiveActivitiesManager.cs
+++ b/com.onesignal.unity.core/Runtime/LiveActivities/ILiveActivitiesManager.cs
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
+using System.Collections.Generic;
using System.Threading.Tasks;
namespace OneSignalSDK.LiveActivities {
@@ -43,5 +44,54 @@ public interface ILiveActivitiesManager {
/// iOS Only
/// Awaitable boolean of whether the operation succeeded or failed
Task ExitAsync(string 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.
+ ///
+ /// An optional structure to provide for more granular setup options.
+ void SetupDefault(LiveActivitySetupOptions options = null);
+
+ ///
+ /// 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.
+ ///
+ /// The activity identifier the live activity on this device will be started
+ /// and eligible to receive updates for.
+ /// A dynamic type containing the static attributes passed into `DefaultLiveActivityAttributes`.
+ /// A dynamic type containing the content attributes passed into `DefaultLiveActivityAttributes`.
+ void StartDefault(string activityId, IDictionary attributes, IDictionary 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.
+ ///
+ /// The name of the specific `ActivityAttributes` structure tied to the live activity.
+ /// The (OS-provided) token that will be used to start a live activity of this `activityType` on this device.
+ void SetPushToStartToken(string activityType, string 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.
+ ///
+ /// The name of the specific `ActivityAttributes` structure tied to the live activity.
+ void RemovePushToStartToken(string activityType);
}
}
\ No newline at end of file
diff --git a/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs b/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs
new file mode 100644
index 000000000..ae2a5fb31
--- /dev/null
+++ b/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs
@@ -0,0 +1,47 @@
+/*
+ * Modified MIT License
+ *
+ * Copyright 2023 OneSignal
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * 1. The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * 2. All copies of substantial portions of the Software may only be used in connection
+ * with services provided by OneSignal.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+using System.Threading.Tasks;
+
+namespace OneSignalSDK.LiveActivities {
+ ///
+ /// The setup options for .
+ ///
+ public class LiveActivitySetupOptions
+ {
+ ///
+ /// When true, OneSignal will listen for pushToStart tokens for the `OneSignalLiveActivityAttributes` structure.
+ ///
+ public bool EnablePushToStart { get; set; }
+
+ ///
+ /// When true, OneSignal will listen for pushToUpdate tokens for each start live activity that uses the
+ /// `OneSignalLiveActivityAttributes` structure.
+ ///
+ public bool EnablePushToUpdate { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs.meta b/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs.meta
new file mode 100644
index 000000000..e495f73b6
--- /dev/null
+++ b/com.onesignal.unity.core/Runtime/LiveActivities/LiveActivitiesSetupOptions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 193ac3457a1c944a39943c880026f1a1
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/com.onesignal.unity.core/Samples~/OneSignalExampleBehaviour.cs b/com.onesignal.unity.core/Samples~/OneSignalExampleBehaviour.cs
index f2a0c64c5..a868cee9a 100644
--- a/com.onesignal.unity.core/Samples~/OneSignalExampleBehaviour.cs
+++ b/com.onesignal.unity.core/Samples~/OneSignalExampleBehaviour.cs
@@ -127,7 +127,17 @@ public class OneSignalExampleBehaviour : MonoBehaviour {
///
///
///
- public string liveActivityToken;
+ public string liveActivityIdToken;
+
+ ///
+ ///
+ ///
+ public string liveActivityType;
+
+ ///
+ ///
+ ///
+ public string liveActivityTypeToken;
///
/// we recommend initializing OneSignal early in your application's lifecycle such as in the Start method of a
@@ -141,6 +151,9 @@ private void Start() {
_log($"Initializing with appId {appId}");
OneSignal.Initialize(appId);
+ // Setup the default live activity
+ OneSignal.LiveActivities.SetupDefault();
+
// Setting ConsentRequired to true will prevent the OneSignalSDK from operating until
// PrivacyConsent is also set to true
OneSignal.ConsentRequired = consentRequired;
@@ -416,10 +429,28 @@ public void ToggleShareLocation() {
* iOS
*/
+ public void StartDefaultLiveActivity() {
+ _log($"Start Default Live Activity with id: {liveActivityId}...");
+
+ OneSignal.LiveActivities.StartDefault(
+ liveActivityId,
+ new Dictionary() {
+ { "title", "Welcome!" }
+ },
+ new Dictionary() {
+ { "message", new Dictionary() {
+ { "en", "Hello World!"}
+ }},
+ { "intValue", 3 },
+ { "doubleValue", 3.14 },
+ { "boolValue", true }
+ });
+ }
+
public async void EnterLiveActivityAsync() {
- _log($"Entering Live Activity with id: {liveActivityId} and token: {liveActivityToken} and awaiting result...");
+ _log($"Entering Live Activity with id: {liveActivityId} and token: {liveActivityIdToken} and awaiting result...");
- var result = await OneSignal.LiveActivities.EnterAsync(liveActivityId, liveActivityToken);
+ var result = await OneSignal.LiveActivities.EnterAsync(liveActivityId, liveActivityIdToken);
if (result)
_log("Live Activity enter success");
@@ -438,6 +469,18 @@ public async void ExitLiveActivityAsync() {
_log("Live Activity exit failed");
}
+ public void SetPushToStartToken() {
+ _log($"Set Push To Start Token for type: {liveActivityType} with token: {liveActivityTypeToken}...");
+
+ OneSignal.LiveActivities.SetPushToStartToken(liveActivityType, liveActivityTypeToken);
+ }
+
+ public void RemovePushToStartToken() {
+ _log($"Remove Push To Start Token for type: {liveActivityType}...");
+
+ OneSignal.LiveActivities.RemovePushToStartToken(liveActivityType);
+ }
+
#region Rendering
/*
* You can safely ignore everything in this region and below
@@ -466,7 +509,10 @@ public async void ExitLiveActivityAsync() {
public void SetOutcomeValue(string newVal) => outcomeValue = Convert.ToSingle(newVal);
public void SetLiveActivityId(string newVal) => liveActivityId = newVal;
- public void SetLiveActivityToken(string newVal) => liveActivityToken = newVal;
+ public void SetLiveActivityIdToken(string newVal) => liveActivityIdToken = newVal;
+
+ public void SetLiveActivityType(string newVal) => liveActivityType = newVal;
+ public void SetLiveActivityTypeToken(string newVal) => liveActivityTypeToken = newVal;
private void Awake() {
SDKDebug.LogIntercept += _log;
diff --git a/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm b/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm
index b46a72b45..c6273fb1c 100644
--- a/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm
+++ b/com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridgeLiveActivities.mm
@@ -29,7 +29,9 @@
#import
#import
#import
+#import "OneSignalLiveActivities/OneSignalLiveActivities-Swift.h"
#import
+#import "OneSignalBridgeUtil.h"
typedef void (*BooleanResponseDelegate)(int hashCode, bool response);
@@ -57,4 +59,60 @@ void _oneSignalExitLiveActivity(const char* activityId, int hashCode, BooleanRes
withSuccess:^(NSDictionary *result) { CALLBACK(YES); }
withFailure:^(NSError *error) { CALLBACK(NO); }];
}
+
+
+ void _oneSignalSetupDefaultLiveActivity(const char* optionsJson) {
+ LiveActivitySetupOptions *laOptions = nil;
+
+ if (optionsJson) {
+ NSDictionary *optionsDict = oneSignalDictionaryFromJsonString(optionsJson);
+
+ laOptions = [LiveActivitySetupOptions alloc];
+ [laOptions setEnablePushToStart:[optionsDict[@"enablePushToStart"] boolValue]];
+ [laOptions setEnablePushToUpdate:[optionsDict[@"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 _oneSignalStartDefaultLiveActivity(const char* activityId, const char* attributesJson, const char* contentJson) {
+ if (@available(iOS 16.1, *)) {
+ NSDictionary *attributes = oneSignalDictionaryFromJsonString(attributesJson);
+ NSDictionary *content = oneSignalDictionaryFromJsonString(contentJson);
+
+ [OneSignalLiveActivitiesManagerImpl startDefault:TO_NSSTRING(activityId) attributes:attributes content:content];
+ } else {
+ [OneSignalLog onesignalLog:ONE_S_LL_ERROR message:[NSString stringWithFormat:@"cannot startDefault on iOS < 16.1"]];
+ }
+ }
+
+ void _oneSignalSetPushToStartToken(const char* activityType, const char* token) {
+ NSError* err=nil;
+
+ if (@available(iOS 17.2, *)) {
+ [OneSignalLiveActivitiesManagerImpl setPushToStartToken:TO_NSSTRING(activityType) withToken:TO_NSSTRING(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"]];
+ }
+ }
+
+ void _oneSignalRemovePushToStartToken(const char* activityType) {
+ NSError* err=nil;
+ if (@available(iOS 17.2, *)) {
+ [OneSignalLiveActivitiesManagerImpl removePushToStartToken:TO_NSSTRING(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"]];
+ }
+ }
}
\ No newline at end of file
diff --git a/com.onesignal.unity.ios/Runtime/iOSLiveActivitiesManager.cs b/com.onesignal.unity.ios/Runtime/iOSLiveActivitiesManager.cs
index e58f9f3ae..41415f7b8 100644
--- a/com.onesignal.unity.ios/Runtime/iOSLiveActivitiesManager.cs
+++ b/com.onesignal.unity.ios/Runtime/iOSLiveActivitiesManager.cs
@@ -25,6 +25,7 @@
* THE SOFTWARE.
*/
+using System.Collections.Generic;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using OneSignalSDK.LiveActivities;
@@ -32,9 +33,14 @@
namespace OneSignalSDK.iOS.LiveActivities {
internal sealed class iOSLiveActivitiesManager : ILiveActivitiesManager {
+ [DllImport("__Internal")] private static extern void _oneSignalSetupDefaultLiveActivity(string optionsJson);
+ [DllImport("__Internal")] private static extern void _oneSignalStartDefaultLiveActivity(string activityId, string attributesJson, string contentJson);
[DllImport("__Internal")] private static extern void _oneSignalEnterLiveActivity(string activityId, string token, int hashCode, BooleanResponseDelegate callback);
[DllImport("__Internal")] private static extern void _oneSignalExitLiveActivity(string activityId, int hashCode, BooleanResponseDelegate callback);
+ [DllImport("__Internal")] private static extern void _oneSignalSetPushToStartToken(string activityType, string token);
+ [DllImport("__Internal")] private static extern void _oneSignalRemovePushToStartToken(string activityType);
+
private delegate void BooleanResponseDelegate(int hashCode, bool response);
public async Task EnterAsync(string activityId, string token) {
@@ -49,6 +55,36 @@ public async Task ExitAsync(string activityId) {
return await proxy;
}
+ public void RemovePushToStartToken(string activityType)
+ {
+ _oneSignalRemovePushToStartToken(activityType);
+ }
+
+ public void SetPushToStartToken(string activityType, string token)
+ {
+ _oneSignalSetPushToStartToken(activityType, token);
+ }
+
+ public void SetupDefault(LiveActivitySetupOptions options = null)
+ {
+ string optionsJson = null;
+ if (options != null)
+ {
+ optionsJson = Json.Serialize(new Dictionary
+ {
+ { "enablePushToStart", options.EnablePushToStart },
+ { "enablePushToUpdate", options.EnablePushToUpdate }
+ });
+ }
+
+ _oneSignalSetupDefaultLiveActivity(optionsJson);
+ }
+
+ public void StartDefault(string activityId, IDictionary attributes, IDictionary content)
+ {
+ _oneSignalStartDefaultLiveActivity(activityId, Json.Serialize(attributes), Json.Serialize(content));
+ }
+
[AOT.MonoPInvokeCallback(typeof(BooleanResponseDelegate))]
private static void BooleanCallbackProxy(int hashCode, bool response)
=> WaitingProxy.ResolveCallbackProxy(hashCode, response);