Skip to content

Commit c7d0f17

Browse files
authored
Merge pull request #560 from OneSignal/release/3.0.7
Release 3.0.7
2 parents c000545 + a65ed57 commit c7d0f17

File tree

14 files changed

+183
-19
lines changed

14 files changed

+183
-19
lines changed

OneSignalExample/Assets/OneSignal/CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [3.0.7]
9+
### Changed
10+
- Updated included iOS SDK to [3.12.3](https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/3.12.3)
11+
- Added support for OneSignal iOS functionality `enterLiveActivity` and `exitLiveActivity`
12+
813
## [3.0.6]
914
### Fixed
1015
- Android builds failing without the Unity iOS module
@@ -170,7 +175,8 @@ If you run into any problems, please don’t hesitate to [open an issue](https:/
170175
- If you are updating from a previous version of the OneSignal Unity SDK please follow the Unity Asset Store instructions in
171176
the [README](https://github.com/OneSignal/OneSignal-Unity-SDK/README.md#unity-asset-store) to ensure a smooth transition.
172177

173-
[Unreleased]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.6...HEAD
178+
[Unreleased]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.7...HEAD
179+
[3.0.7]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.6...3.0.7
174180
[3.0.6]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.5...3.0.6
175181
[3.0.5]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.4...3.0.5
176182
[3.0.4]: https://github.com/OneSignal/OneSignal-Unity-SDK/compare/3.0.3...3.0.4
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.6
1+
3.0.7

OneSignalExample/Packages/packages-lock.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"depth": 0,
66
"source": "local",
77
"dependencies": {
8-
"com.onesignal.unity.core": "3.0.6"
8+
"com.onesignal.unity.core": "3.0.7"
99
}
1010
},
1111
"com.onesignal.unity.core": {
@@ -19,7 +19,7 @@
1919
"depth": 0,
2020
"source": "local",
2121
"dependencies": {
22-
"com.onesignal.unity.core": "3.0.6"
22+
"com.onesignal.unity.core": "3.0.7"
2323
}
2424
},
2525
"com.unity.ext.nunit": {

OneSignalExample/ProjectSettings/ProjectSettings.asset

+104-6
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ PlayerSettings:
134134
16:10: 1
135135
16:9: 1
136136
Others: 1
137-
bundleVersion: 3.0.6
137+
bundleVersion: 3.0.7
138138
preloadedAssets: []
139139
metroInputSource: 0
140140
wsaTransparentSwapchain: 0
@@ -162,7 +162,7 @@ PlayerSettings:
162162
tvOS: 0
163163
overrideDefaultApplicationIdentifier: 1
164164
AndroidBundleVersionCode: 2
165-
AndroidMinSdkVersion: 19
165+
AndroidMinSdkVersion: 22
166166
AndroidTargetSdkVersion: 0
167167
AndroidPreferredInstallLocation: 1
168168
aotOptions:
@@ -362,10 +362,110 @@ PlayerSettings:
362362
m_Height: 36
363363
m_Kind: 1
364364
m_SubKind:
365+
- m_BuildTarget: iPhone
366+
m_Icons:
367+
- m_Textures: []
368+
m_Width: 180
369+
m_Height: 180
370+
m_Kind: 0
371+
m_SubKind: iPhone
372+
- m_Textures: []
373+
m_Width: 120
374+
m_Height: 120
375+
m_Kind: 0
376+
m_SubKind: iPhone
377+
- m_Textures: []
378+
m_Width: 167
379+
m_Height: 167
380+
m_Kind: 0
381+
m_SubKind: iPad
382+
- m_Textures: []
383+
m_Width: 152
384+
m_Height: 152
385+
m_Kind: 0
386+
m_SubKind: iPad
387+
- m_Textures: []
388+
m_Width: 76
389+
m_Height: 76
390+
m_Kind: 0
391+
m_SubKind: iPad
392+
- m_Textures: []
393+
m_Width: 120
394+
m_Height: 120
395+
m_Kind: 3
396+
m_SubKind: iPhone
397+
- m_Textures: []
398+
m_Width: 80
399+
m_Height: 80
400+
m_Kind: 3
401+
m_SubKind: iPhone
402+
- m_Textures: []
403+
m_Width: 80
404+
m_Height: 80
405+
m_Kind: 3
406+
m_SubKind: iPad
407+
- m_Textures: []
408+
m_Width: 40
409+
m_Height: 40
410+
m_Kind: 3
411+
m_SubKind: iPad
412+
- m_Textures: []
413+
m_Width: 87
414+
m_Height: 87
415+
m_Kind: 1
416+
m_SubKind: iPhone
417+
- m_Textures: []
418+
m_Width: 58
419+
m_Height: 58
420+
m_Kind: 1
421+
m_SubKind: iPhone
422+
- m_Textures: []
423+
m_Width: 29
424+
m_Height: 29
425+
m_Kind: 1
426+
m_SubKind: iPhone
427+
- m_Textures: []
428+
m_Width: 58
429+
m_Height: 58
430+
m_Kind: 1
431+
m_SubKind: iPad
432+
- m_Textures: []
433+
m_Width: 29
434+
m_Height: 29
435+
m_Kind: 1
436+
m_SubKind: iPad
437+
- m_Textures: []
438+
m_Width: 60
439+
m_Height: 60
440+
m_Kind: 2
441+
m_SubKind: iPhone
442+
- m_Textures: []
443+
m_Width: 40
444+
m_Height: 40
445+
m_Kind: 2
446+
m_SubKind: iPhone
447+
- m_Textures: []
448+
m_Width: 40
449+
m_Height: 40
450+
m_Kind: 2
451+
m_SubKind: iPad
452+
- m_Textures: []
453+
m_Width: 20
454+
m_Height: 20
455+
m_Kind: 2
456+
m_SubKind: iPad
457+
- m_Textures: []
458+
m_Width: 1024
459+
m_Height: 1024
460+
m_Kind: 4
461+
m_SubKind: App Store
365462
m_BuildTargetBatching: []
366463
m_BuildTargetGraphicsJobs: []
367464
m_BuildTargetGraphicsJobMode: []
368-
m_BuildTargetGraphicsAPIs: []
465+
m_BuildTargetGraphicsAPIs:
466+
- m_BuildTarget: AndroidPlayer
467+
m_APIs: 0b00000008000000
468+
m_Automatic: 0
369469
m_BuildTargetVRSettings: []
370470
openGLRequireES31: 0
371471
openGLRequireES31AEP: 0
@@ -625,9 +725,7 @@ PlayerSettings:
625725
webGLThreadsSupport: 0
626726
webGLDecompressionFallback: 0
627727
scriptingDefineSymbols:
628-
1: IS_ONESIGNAL_EXAMPLE_APP
629-
4: IS_ONESIGNAL_EXAMPLE_APP
630-
7: IS_ONESIGNAL_EXAMPLE_APP
728+
0: IS_ONESIGNAL_EXAMPLE_APP
631729
additionalCompilerArguments: {}
632730
platformArchitecture: {}
633731
scriptingBackend:

com.onesignal.unity.android/Runtime/OneSignalAndroid.cs

+10
Original file line numberDiff line numberDiff line change
@@ -281,5 +281,15 @@ public override async Task<bool> SendOutcomeWithValue(string name, float value)
281281
_sdkClass.CallStatic("sendOutcomeWithValue", name, value, proxy);
282282
return await proxy;
283283
}
284+
285+
public override Task<bool> enterLiveActivity(string activityId, string token) {
286+
SDKDebug.Warn("This feature is only available for iOS.");
287+
return Task.FromResult(false);
288+
}
289+
290+
public override Task<bool> exitLiveActivity(string activityId) {
291+
SDKDebug.Warn("This feature is only available for iOS.");
292+
return Task.FromResult(false);
293+
}
284294
}
285295
}

com.onesignal.unity.android/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "com.onesignal.unity.android",
33
"displayName": "OneSignal Unity SDK - Android",
4-
"version": "3.0.6",
4+
"version": "3.0.7",
55
"unity": "2018.4",
66
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
77
"dependencies": {
8-
"com.onesignal.unity.core": "3.0.6"
8+
"com.onesignal.unity.core": "3.0.7"
99
},
1010
"keywords": [
1111
"push-notifications",

com.onesignal.unity.core/Editor/Platform/OneSignalNative.cs

+8
Original file line numberDiff line numberDiff line change
@@ -174,5 +174,13 @@ public override Task<bool> SendUniqueOutcome(string name) {
174174
public override Task<bool> SendOutcomeWithValue(string name, float value) {
175175
return Task.FromResult(false);
176176
}
177+
178+
public override Task<bool> enterLiveActivity(string activityId, string token) {
179+
return Task.FromResult(false);
180+
}
181+
182+
public override Task<bool> exitLiveActivity(string activityId) {
183+
return Task.FromResult(false);
184+
}
177185
}
178186
}

com.onesignal.unity.core/Runtime/OneSignal.cs

+18-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace OneSignalSDK {
3434
/// OneSignal SDK for Unity
3535
/// </summary>
3636
public abstract partial class OneSignal {
37-
public const string Version = "3.0.6";
37+
public const string Version = "3.0.7";
3838

3939
/// <summary>
4040
/// The default static instance of the OneSignal Unity SDK
@@ -385,7 +385,6 @@ internal set {
385385
/// <summary>
386386
/// Helper method to show the native prompt to ask the user for consent to share their location
387387
/// </summary>
388-
/// <remarks>iOS Only</remarks>
389388
public abstract void PromptLocation();
390389

391390
/// <summary>
@@ -415,5 +414,22 @@ internal set {
415414
public abstract Task<bool> SendOutcomeWithValue(string name, float value);
416415
#endregion
417416

417+
#region Live Activity
418+
/// <summary>
419+
/// Associates a customer defined activityId with a live activity temporary push token on OneSignal's server
420+
/// </summary>
421+
/// <remarks>iOS Only</remarks>
422+
/// <returns>Awaitable boolean of whether the operation succeeded or failed</returns>
423+
public abstract Task<bool> enterLiveActivity(string activityId, string token);
424+
425+
/// <summary>
426+
/// Deletes the association between a customer defined activityId with a Live Activity temporary push token on
427+
/// OneSignal's server
428+
/// </summary>
429+
/// <remarks>iOS Only</remarks>
430+
/// <returns>Awaitable boolean of whether the operation succeeded or failed</returns>
431+
public abstract Task<bool> exitLiveActivity(string activityId);
432+
#endregion
433+
418434
}
419435
}

com.onesignal.unity.core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.onesignal.unity.core",
33
"displayName": "OneSignal Unity SDK - Core",
4-
"version": "3.0.6",
4+
"version": "3.0.7",
55
"unity": "2018.4",
66
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
77
"dependencies": {
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<dependencies>
22
<iosPods>
3-
<iosPod name="OneSignalXCFramework" version="3.11.5" addToAllTargets="true" />
3+
<iosPod name="OneSignalXCFramework" version="3.12.3" addToAllTargets="true" />
44
</iosPods>
55
</dependencies>

com.onesignal.unity.ios/Runtime/OneSignalIOS.Interface.cs

+3
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,8 @@ public sealed partial class OneSignalIOS : OneSignal {
9595
[DllImport("__Internal")] private static extern void _sendOutcome(string name, int hashCode, BooleanResponseDelegate callback);
9696
[DllImport("__Internal")] private static extern void _sendUniqueOutcome(string name, int hashCode, BooleanResponseDelegate callback);
9797
[DllImport("__Internal")] private static extern void _sendOutcomeWithValue(string name, float value, int hashCode, BooleanResponseDelegate callback);
98+
99+
[DllImport("__Internal")] private static extern void _enterLiveActivity(string activityId, string token, int hashCode, BooleanResponseDelegate callback);
100+
[DllImport("__Internal")] private static extern void _exitLiveActivity(string activityId, int hashCode, BooleanResponseDelegate callback);
98101
}
99102
}

com.onesignal.unity.ios/Runtime/OneSignalIOS.cs

+12
Original file line numberDiff line numberDiff line change
@@ -241,5 +241,17 @@ public override async Task<bool> SendOutcomeWithValue(string name, float value)
241241
_sendOutcomeWithValue(name, value, hashCode, BooleanCallbackProxy);
242242
return await proxy;
243243
}
244+
245+
public override async Task<bool> enterLiveActivity(string activityId, string token) {
246+
var (proxy, hashCode) = _setupProxy<bool>();
247+
_enterLiveActivity(activityId, token, hashCode, BooleanCallbackProxy);
248+
return await proxy;
249+
}
250+
251+
public override async Task<bool> exitLiveActivity(string activityId) {
252+
var (proxy, hashCode) = _setupProxy<bool>();
253+
_exitLiveActivity(activityId, hashCode, BooleanCallbackProxy);
254+
return await proxy;
255+
}
244256
}
245257
}

com.onesignal.unity.ios/Runtime/Plugins/iOS/OneSignalUnityBridge.mm

+12-1
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,17 @@ void _sendOutcomeWithValue(const char* name, float value, int hashCode, BooleanR
425425
value:@(value)
426426
onSuccess:^(OSOutcomeEvent *outcome) { CALLBACK(outcome != nil); }];
427427
}
428-
}
429428

429+
void _enterLiveActivity(const char* activityId, const char* token, int hashCode, BooleanResponseDelegate callback) {
430+
[OneSignal enterLiveActivity:TO_NSSTRING(activityId)
431+
withToken:TO_NSSTRING(token)
432+
withSuccess:^(NSDictionary *result) { CALLBACK(YES); }
433+
withFailure:^(NSError *error) { CALLBACK(NO); }];
434+
}
430435

436+
void _exitLiveActivity(const char* activityId, int hashCode, BooleanResponseDelegate callback) {
437+
[OneSignal exitLiveActivity:TO_NSSTRING(activityId)
438+
withSuccess:^(NSDictionary *result) { CALLBACK(YES); }
439+
withFailure:^(NSError *error) { CALLBACK(NO); }];
440+
}
441+
}

com.onesignal.unity.ios/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "com.onesignal.unity.ios",
33
"displayName": "OneSignal Unity SDK - iOS",
4-
"version": "3.0.6",
4+
"version": "3.0.7",
55
"unity": "2018.4",
66
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
77
"dependencies": {
8-
"com.onesignal.unity.core": "3.0.6"
8+
"com.onesignal.unity.core": "3.0.7"
99
},
1010
"keywords": [
1111
"push-notifications",

0 commit comments

Comments
 (0)