com.onesignal.unity.ios 2.14.6 → 3.0.0-beta.4

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.
Files changed (33) hide show
  1. package/Editor/BuildPostProcessor.cs +297 -0
  2. package/Editor/{PostProcessBuildPlayer_iOS.cs.meta → BuildPostProcessor.cs.meta} +0 -0
  3. package/Editor/OneSignalIOSDependencies.xml +5 -0
  4. package/Editor/OneSignalIOSDependencies.xml.meta +3 -0
  5. package/Editor/PBXProjectExtensions.cs +52 -0
  6. package/Editor/PBXProjectExtensions.cs.meta +3 -0
  7. package/Runtime/AssemblyInfo.cs +28 -1
  8. package/Runtime/OneSignal.iOS.asmdef +4 -3
  9. package/Runtime/OneSignalIOS.Callbacks.cs +174 -0
  10. package/Runtime/OneSignalIOS.Callbacks.cs.meta +3 -0
  11. package/Runtime/OneSignalIOS.Interface.cs +99 -0
  12. package/Runtime/OneSignalIOS.Interface.cs.meta +3 -0
  13. package/Runtime/OneSignalIOS.cs +268 -457
  14. package/Runtime/OneSignalIOS.cs.meta +3 -10
  15. package/Runtime/OneSignalIOSInit.cs +39 -9
  16. package/Runtime/Plugins/iOS/Info.plist.meta +1 -3
  17. package/Runtime/Plugins/iOS/NotificationService.swift +25 -0
  18. package/Runtime/Plugins/iOS/{NotificationService.m.meta → NotificationService.swift.meta} +5 -4
  19. package/Runtime/Plugins/iOS/OneSignalUnityBridge.mm +417 -0
  20. package/Runtime/Plugins/iOS/{OneSignal.h.meta → OneSignalUnityBridge.mm.meta} +16 -5
  21. package/Runtime/Utilities/Later.cs +64 -0
  22. package/Runtime/Utilities/Later.cs.meta +11 -0
  23. package/Runtime/Utilities.meta +3 -0
  24. package/package.json +2 -2
  25. package/Editor/PostProcessBuildPlayer_iOS.cs +0 -399
  26. package/Runtime/Plugins/iOS/NotificationService.h +0 -13
  27. package/Runtime/Plugins/iOS/NotificationService.h.meta +0 -26
  28. package/Runtime/Plugins/iOS/NotificationService.m +0 -40
  29. package/Runtime/Plugins/iOS/OneSignal.h +0 -617
  30. package/Runtime/Plugins/iOS/OneSignalUnityRuntime.m +0 -542
  31. package/Runtime/Plugins/iOS/OneSignalUnityRuntime.m.meta +0 -24
  32. package/Runtime/Plugins/iOS/libOneSignal.a +0 -0
  33. package/Runtime/Plugins/iOS/libOneSignal.a.meta +0 -21
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Modified MIT License
3
+ *
4
+ * Copyright 2022 OneSignal
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * 1. The above copyright notice and this permission notice shall be included in
14
+ * all copies or substantial portions of the Software.
15
+ *
16
+ * 2. All copies of substantial portions of the Software may only be used in connection
17
+ * with services provided by OneSignal.
18
+ *
19
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
+ * THE SOFTWARE.
26
+ */
27
+
28
+ using System.Runtime.InteropServices;
29
+
30
+ namespace OneSignalSDK {
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ public sealed partial class OneSignalIOS : OneSignal {
35
+ /*
36
+ * Global callbacks
37
+ */
38
+
39
+ [DllImport("__Internal")] private static extern void _setNotificationReceivedCallback(NotificationWillShowInForegroundDelegate callback);
40
+ [DllImport("__Internal")] private static extern void _setNotificationOpenedCallback(StringListenerDelegate callback);
41
+
42
+ [DllImport("__Internal")] private static extern void _setInAppMessageWillDisplayCallback(StringListenerDelegate callback);
43
+ [DllImport("__Internal")] private static extern void _setInAppMessageDidDisplayCallback(StringListenerDelegate callback);
44
+ [DllImport("__Internal")] private static extern void _setInAppMessageWillDismissCallback(StringListenerDelegate callback);
45
+ [DllImport("__Internal")] private static extern void _setInAppMessageDidDismissCallback(StringListenerDelegate callback);
46
+ [DllImport("__Internal")] private static extern void _setInAppMessageClickedCallback(StringListenerDelegate callback);
47
+
48
+ [DllImport("__Internal")] private static extern void _setPermissionStateChangedCallback(StateListenerDelegate callback);
49
+ [DllImport("__Internal")] private static extern void _setSubscriptionStateChangedCallback(StateListenerDelegate callback);
50
+ [DllImport("__Internal")] private static extern void _setEmailSubscriptionStateChangedCallback(StateListenerDelegate callback);
51
+ [DllImport("__Internal")] private static extern void _setSMSSubscriptionStateChangedCallback(StateListenerDelegate callback);
52
+
53
+ /*
54
+ * Direct methods
55
+ */
56
+
57
+ [DllImport("__Internal")] private static extern string _getDeviceState();
58
+
59
+ [DllImport("__Internal")] private static extern void _setLogLevel(int logLevel, int alertLevel);
60
+ [DllImport("__Internal")] private static extern void _setPrivacyConsent(bool consent);
61
+ [DllImport("__Internal")] private static extern bool _getPrivacyConsent();
62
+ [DllImport("__Internal")] private static extern void _setRequiresPrivacyConsent(bool required);
63
+ [DllImport("__Internal")] private static extern bool _getRequiresPrivacyConsent();
64
+ [DllImport("__Internal")] private static extern void _initialize(string appId);
65
+ [DllImport("__Internal")] private static extern void _promptForPushNotificationsWithUserResponse(int hashCode, BooleanResponseDelegate callback);
66
+ [DllImport("__Internal")] private static extern void _postNotification(string optionsJson, int hashCode, StringResponseDelegate callback);
67
+ [DllImport("__Internal")] private static extern void _setTrigger(string key, string value);
68
+ [DllImport("__Internal")] private static extern void _setTriggers(string triggersJson);
69
+ [DllImport("__Internal")] private static extern void _removeTrigger(string key);
70
+ [DllImport("__Internal")] private static extern void _removeTriggers(string triggersJson);
71
+ [DllImport("__Internal")] private static extern string _getTrigger(string key);
72
+ [DllImport("__Internal")] private static extern string _getTriggers();
73
+ [DllImport("__Internal")] private static extern void _setInAppMessagesArePaused(bool paused);
74
+ [DllImport("__Internal")] private static extern bool _getInAppMessagesArePaused();
75
+
76
+ [DllImport("__Internal")] private static extern void _sendTag(string name, string value, int hashCode, BooleanResponseDelegate callback);
77
+ [DllImport("__Internal")] private static extern void _sendTags(string tagsJson, int hashCode, BooleanResponseDelegate callback);
78
+ [DllImport("__Internal")] private static extern void _getTags(int hashCode, StringResponseDelegate callback);
79
+ [DllImport("__Internal")] private static extern void _deleteTag(string name, int hashCode, BooleanResponseDelegate callback);
80
+ [DllImport("__Internal")] private static extern void _deleteTags(string tagsJson, int hashCode, BooleanResponseDelegate callback);
81
+
82
+ [DllImport("__Internal")] private static extern void _setExternalUserId(string externalId, string authHash, int hashCode, BooleanResponseDelegate callback);
83
+ [DllImport("__Internal")] private static extern void _setEmail(string email, string authHash, int hashCode, BooleanResponseDelegate callback);
84
+ [DllImport("__Internal")] private static extern void _setSMSNumber(string smsNumber, string authHash, int hashCode, BooleanResponseDelegate callback);
85
+
86
+ [DllImport("__Internal")] private static extern void _logoutEmail(int hashCode, BooleanResponseDelegate callback);
87
+ [DllImport("__Internal")] private static extern void _logoutSMSNumber(int hashCode, BooleanResponseDelegate callback);
88
+
89
+ [DllImport("__Internal")] private static extern void _setLanguage(string languageCode, int hashCode, BooleanResponseDelegate callback);
90
+
91
+ [DllImport("__Internal")] private static extern void _promptLocation();
92
+ [DllImport("__Internal")] private static extern void _setShareLocation(bool share);
93
+ [DllImport("__Internal")] private static extern bool _getShareLocation();
94
+
95
+ [DllImport("__Internal")] private static extern void _sendOutcome(string name, int hashCode, BooleanResponseDelegate callback);
96
+ [DllImport("__Internal")] private static extern void _sendUniqueOutcome(string name, int hashCode, BooleanResponseDelegate callback);
97
+ [DllImport("__Internal")] private static extern void _sendOutcomeWithValue(string name, float value, int hashCode, BooleanResponseDelegate callback);
98
+ }
99
+ }
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: 58d98a3bf598402ca24a771f7e37c3b3
3
+ timeCreated: 1631805035