com.onesignal.unity.ios 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/BuildPostProcessor.cs +7 -4
- package/Editor/OneSignalIOSDependencies.xml +1 -1
- package/Editor/PBXProjectExtensions.cs +3 -1
- package/Runtime/OneSignalIOS.Interface.cs +3 -0
- package/Runtime/OneSignalIOS.cs +12 -0
- package/Runtime/Plugins/iOS/OneSignalUnityBridge.mm +12 -1
- package/package.json +2 -2
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
* 6. Observe Badge value is 1. (If it is 3 there is an App Group issue)
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
+
#if UNITY_IOS
|
|
46
|
+
|
|
45
47
|
// Flag if an App Group should created for the main target and the NSE
|
|
46
48
|
// Try renaming NOTIFICATION_SERVICE_EXTENSION_TARGET_NAME below first before
|
|
47
49
|
// removing ADD_APP_GROUP if you run into Provisioning errors in Xcode that
|
|
@@ -75,13 +77,13 @@ namespace OneSignalSDK {
|
|
|
75
77
|
private static readonly string PluginLibrariesPath = Path.Combine(PackageName, "Runtime", "Plugins", "iOS");
|
|
76
78
|
private static readonly string PluginFilesPath = Path.Combine("Packages", PluginLibrariesPath);
|
|
77
79
|
|
|
78
|
-
private readonly string _appGroupName = $"group.{PlayerSettings.applicationIdentifier}.onesignal";
|
|
79
|
-
|
|
80
80
|
private string _outputPath;
|
|
81
81
|
private string _projectPath;
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
private readonly PBXProject _project = new PBXProject();
|
|
84
84
|
|
|
85
|
+
private string _appGroupName => $"group.{PlayerSettings.applicationIdentifier}.onesignal";
|
|
86
|
+
|
|
85
87
|
/// <summary>
|
|
86
88
|
/// must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's
|
|
87
89
|
/// added before "pod install" (50)
|
|
@@ -279,4 +281,5 @@ namespace OneSignalSDK {
|
|
|
279
281
|
File.WriteAllText(podfilePath, podfile);
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
|
-
}
|
|
284
|
+
}
|
|
285
|
+
#endif
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* THE SOFTWARE.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
#if UNITY_IOS
|
|
28
29
|
using UnityEditor.iOS.Xcode;
|
|
29
30
|
|
|
30
31
|
namespace OneSignalSDK {
|
|
@@ -43,4 +44,5 @@ namespace OneSignalSDK {
|
|
|
43
44
|
=> project.TargetGuidByName(PBXProject.GetUnityTargetName());
|
|
44
45
|
#endif
|
|
45
46
|
}
|
|
46
|
-
}
|
|
47
|
+
}
|
|
48
|
+
#endif
|
|
@@ -95,5 +95,8 @@ namespace OneSignalSDK {
|
|
|
95
95
|
[DllImport("__Internal")] private static extern void _sendOutcome(string name, int hashCode, BooleanResponseDelegate callback);
|
|
96
96
|
[DllImport("__Internal")] private static extern void _sendUniqueOutcome(string name, int hashCode, BooleanResponseDelegate callback);
|
|
97
97
|
[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);
|
|
98
101
|
}
|
|
99
102
|
}
|
package/Runtime/OneSignalIOS.cs
CHANGED
|
@@ -241,5 +241,17 @@ namespace OneSignalSDK {
|
|
|
241
241
|
_sendOutcomeWithValue(name, value, hashCode, BooleanCallbackProxy);
|
|
242
242
|
return await proxy;
|
|
243
243
|
}
|
|
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
|
+
}
|
|
244
256
|
}
|
|
245
257
|
}
|
|
@@ -425,6 +425,17 @@ void _sendOutcomeWithValue(const char* name, float value, int hashCode, BooleanR
|
|
|
425
425
|
value:@(value)
|
|
426
426
|
onSuccess:^(OSOutcomeEvent *outcome) { CALLBACK(outcome != nil); }];
|
|
427
427
|
}
|
|
428
|
-
}
|
|
429
428
|
|
|
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
|
+
}
|
|
430
435
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "com.onesignal.unity.ios",
|
|
3
3
|
"displayName": "OneSignal Unity SDK - iOS",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.7",
|
|
5
5
|
"unity": "2018.4",
|
|
6
6
|
"description": "OneSignal is the market leader in customer engagement, powering mobile push, web push, email, and in-app messages.",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"com.onesignal.unity.core": "3.0.
|
|
8
|
+
"com.onesignal.unity.core": "3.0.7"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"push-notifications",
|