diff --git a/LICENSE b/LICENSE index 44fd615b7..b02e2c479 100644 --- a/LICENSE +++ b/LICENSE @@ -111,3 +111,13 @@ Includes portions from DTTJailbreakDetection: 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. + +Includes portions from BSMobileProvision: + Copyright (c) 2013, The Blindsight Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/UnityOneSignalExample/Assets/Plugins/Android/OneSignal/libs/OneSignalSDK.jar b/UnityOneSignalExample/Assets/Plugins/Android/OneSignal/libs/OneSignalSDK.jar index a7f93ce1b..d04c35636 100644 Binary files a/UnityOneSignalExample/Assets/Plugins/Android/OneSignal/libs/OneSignalSDK.jar and b/UnityOneSignalExample/Assets/Plugins/Android/OneSignal/libs/OneSignalSDK.jar differ diff --git a/UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_gamethrive_large_icon_default.png b/UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png similarity index 100% rename from UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_gamethrive_large_icon_default.png rename to UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png diff --git a/UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_gamethrive_large_icon_default.png.meta b/UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png.meta similarity index 100% rename from UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_gamethrive_large_icon_default.png.meta rename to UnityOneSignalExample/Assets/Plugins/Android/OneSignalNotificationRes/res/drawable-xxhdpi-v11/ic_onesignal_large_icon_default.png.meta diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/Example/GameControllerExample.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/Example/GameControllerExample.cs index dada80f3e..f39307fc4 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/Example/GameControllerExample.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/Example/GameControllerExample.cs @@ -29,78 +29,110 @@ using System.Collections; using System.Collections.Generic; +using OneSignalPush.MiniJSON; + public class GameControllerExample : MonoBehaviour { - private static string extraMessage; - - void Start () { - extraMessage = null; - - // Enable line below to debug issues with setuping OneSignal. (logLevel, visualLogLevel) - //OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.INFO, OneSignal.LOG_LEVEL.INFO); - - // The only required method you need to call to setup OneSignal to recieve push notifications. - // Call before using any other methods on OneSignal. - // Should only be called once when your game is loaded. - // OneSignal.Init(OneSignal_AppId, GoogleProjectNumber, NotificationReceivedHandler(optional)); - OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", "703322744261", HandleNotification); - } - - // Gets called when the user opens the notification or gets one while in your game. - // The name of the method can be anything as long as the signature matches. - // Method must be static or this object should be marked as DontDestroyOnLoad - private static void HandleNotification(string message, Dictionary additionalData, bool isActive) { - print("GameControllerExample:HandleNotification"); - print(message); - - // When isActive is true this means the user is currently in your game. - // Use isActive and your own game logic so you don't interupt the user with a popup or menu when they are in the middle of playing your game. - if (additionalData != null) { - if (additionalData.ContainsKey("discount")) { - extraMessage = (string)additionalData["discount"]; - // Take user to your store. - } - else if (additionalData.ContainsKey("actionSelected")) { - // actionSelected equals the id on the button the user pressed. - // actionSelected will equal "__DEFAULT__" when the notification itself was tapped when buttons were present. - extraMessage = "Pressed ButtonId: " + additionalData["actionSelected"]; - } - } - } - - // Test Menu - // Includes SendTag/SendTags and getting the userID and pushToken - void OnGUI () { - GUIStyle customTextSize = new GUIStyle("button"); - customTextSize.fontSize = 30; - - GUIStyle guiBoxStyle = new GUIStyle("box"); - guiBoxStyle.fontSize = 30; - - GUI.Box(new Rect(10, 10, 390, 250), "Test Menu", guiBoxStyle); - - if (GUI.Button (new Rect (60, 80, 300, 60), "SendTags", customTextSize)) { - // You can tags users with key value pairs like this: - OneSignal.SendTag("UnityTestKey", "TestValue"); - // Or use an IDictionary if you need to set more than one tag. - OneSignal.SendTags(new Dictionary() { { "UnityTestKey2", "value2" }, { "UnityTestKey3", "value3" } }); - - // You can delete a single tag with it's key. - // OneSignal.DeleteTag("UnityTestKey"); - // Or delete many with an IList. - // OneSignal.DeleteTags(new List() {"UnityTestKey2", "UnityTestKey3" }); - } - - if (GUI.Button (new Rect (60, 170, 300, 60), "GetIds", customTextSize)) { + private static string extraMessage; + + void Start () { + extraMessage = null; + + // Enable line below to debug issues with setuping OneSignal. (logLevel, visualLogLevel) + //OneSignal.SetLogLevel(OneSignal.LOG_LEVEL.INFO, OneSignal.LOG_LEVEL.INFO); + + // The only required method you need to call to setup OneSignal to receive push notifications. + // Call before using any other methods on OneSignal. + // Should only be called once when your app is loaded. + // OneSignal.Init(OneSignal_AppId, GoogleProjectNumber, NotificationReceivedHandler(optional)); + OneSignal.Init("b2f7f966-d8cc-11e4-bed1-df8f05be55ba", "703322744261", HandleNotification); + + // Shows a Native iOS/Android alert dialog when the user is in your app when a notification comes in. + OneSignal.EnableInAppAlertNotification(true); + } + + // Gets called when the user opens the notification or gets one while in your app. + // The name of the method can be anything as long as the signature matches. + // Method must be static or this object should be marked as DontDestroyOnLoad + private static void HandleNotification(string message, Dictionary additionalData, bool isActive) { + print("GameControllerExample:HandleNotification:message" + message); + extraMessage = "Notification opened with text: " + message; + + // When isActive is true this means the user is currently in your game. + // Use isActive and your own game logic so you don't interrupt the user with a popup or menu when they are in the middle of playing your game. + if (additionalData != null) { + if (additionalData.ContainsKey("discount")) { + extraMessage = (string)additionalData["discount"]; + // Take user to your store. + } + else if (additionalData.ContainsKey("actionSelected")) { + // actionSelected equals the id on the button the user pressed. + // actionSelected will equal "__DEFAULT__" when the notification itself was tapped when buttons were present. + extraMessage = "Pressed ButtonId: " + additionalData["actionSelected"]; + } + } + } + + // Test Menu + // Includes SendTag/SendTags, getting the userID and pushToken, and scheduling an example notification + void OnGUI () { + GUIStyle customTextSize = new GUIStyle("button"); + customTextSize.fontSize = 30; + + GUIStyle guiBoxStyle = new GUIStyle("box"); + guiBoxStyle.fontSize = 30; + + GUI.Box(new Rect(10, 10, 390, 340), "Test Menu", guiBoxStyle); + + if (GUI.Button (new Rect (60, 80, 300, 60), "SendTags", customTextSize)) { + // You can tags users with key value pairs like this: + OneSignal.SendTag("UnityTestKey", "TestValue"); + // Or use an IDictionary if you need to set more than one tag. + OneSignal.SendTags(new Dictionary() { { "UnityTestKey2", "value2" }, { "UnityTestKey3", "value3" } }); + + // You can delete a single tag with it's key. + // OneSignal.DeleteTag("UnityTestKey"); + // Or delete many with an IList. + // OneSignal.DeleteTags(new List() {"UnityTestKey2", "UnityTestKey3" }); + } + + if (GUI.Button (new Rect (60, 170, 300, 60), "GetIds", customTextSize)) { OneSignal.GetIdsAvailable((userId, pushToken) => { - extraMessage = "UserID:\n" + userId + "\n\nPushToken:\n" + pushToken; - }); - } - - if (extraMessage != null) { - guiBoxStyle.alignment = TextAnchor.UpperLeft; - guiBoxStyle.wordWrap = true; - GUI.Box (new Rect (10, 300, Screen.width - 20, Screen.height - 310), extraMessage, guiBoxStyle); - } - } + extraMessage = "UserID:\n" + userId + "\n\nPushToken:\n" + pushToken; + }); + } + + if (GUI.Button (new Rect (60, 260, 300, 60), "TestNotification", customTextSize)) { + extraMessage = "Waiting to get a OneSignal userId. Uncomment OneSignal.SetLogLevel in the Start method if it hangs here to debug the issue."; + OneSignal.GetIdsAvailable((userId, pushToken) => { + if (pushToken != null) { + // See http://documentation.onesignal.com/v2.0/docs/notifications-create-notification for a full list of options. + // You can not use included_segments or any fields that require your OneSignal 'REST API Key' in your app for security reasons. + // If you need to use your OneSignal 'REST API Key' you will need your own server where you can make this call. + + var notification = new Dictionary(); + notification["contents"] = new Dictionary() { {"en", "Test Message"} }; + // Send notification to this device. + notification["include_player_ids"] = new List() { userId }; + // Example of scheduling a notification in the future. + notification["send_after"] = System.DateTime.Now.ToUniversalTime().AddSeconds(30).ToString("U"); + + extraMessage = "Posting test notification now."; + OneSignal.PostNotification(notification, (responseSuccess) => { + extraMessage = "Notification posted successful! Delayed by about 30 secounds to give you time to press the home button to see a notification vs an in-app alert.\n" + Json.Serialize(responseSuccess); + }, (responseFailure) => { + extraMessage = "Notification failed to post:\n" + Json.Serialize(responseFailure); + }); + } + else + extraMessage = "ERROR: Device is not registered."; + }); + } + + if (extraMessage != null) { + guiBoxStyle.alignment = TextAnchor.UpperLeft; + guiBoxStyle.wordWrap = true; + GUI.Box (new Rect (10, 390, Screen.width - 20, Screen.height - 400), extraMessage, guiBoxStyle); + } + } } diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignal.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignal.cs index 18f757fe6..b35db63c6 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignal.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignal.cs @@ -33,6 +33,10 @@ #define ANDROID_ONLY #endif +#if ONESIGNAL_PLATFORM && !UNITY_WP8 +#define SUPPORTS_LOGGING +#endif + using UnityEngine; using System.Collections; using System.Collections.Generic; @@ -49,6 +53,9 @@ public class OneSignal : MonoBehaviour { public delegate void IdsAvailable(string playerID, string pushToken); public delegate void TagsReceived(Dictionary tags); + public delegate void OnPostNotificationSuccess(Dictionary response); + public delegate void OnPostNotificationFailure(Dictionary response); + public static IdsAvailable idsAvailableDelegate = null; public static TagsReceived tagsReceivedDelegate = null; @@ -57,12 +64,16 @@ public enum LOG_LEVEL { } #if ONESIGNAL_PLATFORM + #if SUPPORTS_LOGGING private static LOG_LEVEL logLevel = LOG_LEVEL.INFO, visualLogLevel = LOG_LEVEL.NONE; + #endif private static OneSignalPlatform oneSignalPlatform = null; private static bool initialized = false; internal static NotificationReceived notificationDelegate = null; + internal static OnPostNotificationSuccess postNotificationSuccessDelegate = null; + internal static OnPostNotificationFailure postNotificationFailureDelegate = null; // Name of the GameObject that gets automaticly created in your game scene. private const string gameObjectName = "OneSignalRuntimeObject_KEEP"; @@ -113,7 +124,7 @@ public static void Init(string appId) { } public static void SetLogLevel(LOG_LEVEL inLogLevel, LOG_LEVEL inVisualLevel) { - #if ONESIGNAL_PLATFORM + #if SUPPORTS_LOGGING logLevel = inLogLevel; visualLogLevel = inVisualLevel; #endif } @@ -202,6 +213,38 @@ public static void EnableSound(bool enable) { #endif } + public static void EnableNotificationsWhenActive(bool enable) { + #if ANDROID_ONLY + ((OneSignalAndroid)oneSignalPlatform).EnableNotificationsWhenActive(enable); + #endif + } + + public static void EnableInAppAlertNotification(bool enable) { + #if ONESIGNAL_PLATFORM + oneSignalPlatform.EnableInAppAlertNotification(enable); + #endif + } + + public static void SetSubscription(bool enable) { + #if ONESIGNAL_PLATFORM + oneSignalPlatform.SetSubscription(enable); + #endif + } + + public static void PostNotification(Dictionary data) { + #if ONESIGNAL_PLATFORM + PostNotification(data, null, null); + #endif + } + + public static void PostNotification(Dictionary data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure) { + #if ONESIGNAL_PLATFORM + postNotificationSuccessDelegate = inOnPostNotificationSuccess; + postNotificationFailureDelegate = inOnPostNotificationFailure; + oneSignalPlatform.PostNotification(data); + #endif + } + /*** protected and private methods ****/ #if ONESIGNAL_PLATFORM @@ -229,5 +272,23 @@ private void onTagsReceived(string jsonString) { void OnApplicationPause(bool paused) { oneSignalPlatform.OnApplicationPause(paused); } + + // Called from the native SDK + private void onPostNotificationSuccess(string response) { + if (postNotificationSuccessDelegate != null) { + postNotificationSuccessDelegate(Json.Deserialize(response) as Dictionary); + postNotificationFailureDelegate = null; + postNotificationSuccessDelegate = null; + } + } + + // Called from the native SDK + private void onPostNotificationFailed(string response) { + if (postNotificationFailureDelegate != null) { + postNotificationFailureDelegate(Json.Deserialize(response) as Dictionary); + postNotificationFailureDelegate = null; + postNotificationSuccessDelegate = null; + } + } #endif } \ No newline at end of file diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalAndroid.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalAndroid.cs index aef4964c4..e47a7e1b5 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalAndroid.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalAndroid.cs @@ -91,5 +91,21 @@ public void EnableVibrate(bool enable) { public void EnableSound(bool enable) { mOneSignal.Call("enableSound", enable); } + + public void EnableInAppAlertNotification(bool enable) { + mOneSignal.Call("enableInAppAlertNotification", enable); + } + + public void EnableNotificationsWhenActive(bool enable) { + mOneSignal.Call("enableNotificationsWhenActive", enable); + } + + public void SetSubscription(bool enable) { + mOneSignal.Call("setSubscription", enable); + } + + public void PostNotification(Dictionary data) { + mOneSignal.Call("postNotification", Json.Serialize(data)); + } } #endif \ No newline at end of file diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalIOS.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalIOS.cs index 7585c0ce7..acf4d54cb 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalIOS.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalIOS.cs @@ -57,6 +57,15 @@ public class OneSignalIOS : OneSignalPlatform { [System.Runtime.InteropServices.DllImport("__Internal")] extern static public void _idsAvailable(); + [System.Runtime.InteropServices.DllImport("__Internal")] + extern static public void _enableInAppAlertNotification(bool enable); + + [System.Runtime.InteropServices.DllImport("__Internal")] + extern static public void _setSubscription(bool enable); + + [System.Runtime.InteropServices.DllImport("__Internal")] + extern static public void _postNotification(string json); + [System.Runtime.InteropServices.DllImport("__Internal")] extern static public void _setLogLevel(int logLevel, int visualLogLevel); @@ -93,6 +102,18 @@ public void IdsAvailable() { _idsAvailable(); } + public void EnableInAppAlertNotification(bool enable) { + _enableInAppAlertNotification(enable); + } + + public void SetSubscription(bool enable) { + _setSubscription(enable); + } + + public void PostNotification(Dictionary data) { + _postNotification(Json.Serialize(data)); + } + public void FireNotificationReceivedEvent(string jsonString, OneSignal.NotificationReceived notificationReceived) { var dict = Json.Deserialize(jsonString) as Dictionary; diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalPlatform.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalPlatform.cs index 5a174b422..41b4036a2 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalPlatform.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalPlatform.cs @@ -38,6 +38,9 @@ public interface OneSignalPlatform { void DeleteTags(IList keys); void OnApplicationPause(bool paused); void IdsAvailable(); + void EnableInAppAlertNotification(bool enable); + void SetSubscription(bool enable); + void PostNotification(Dictionary data); void FireNotificationReceivedEvent(string jsonString, OneSignal.NotificationReceived notificationReceived); } \ No newline at end of file diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalWP.cs b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalWP.cs index cd7c26bcf..a2ab16712 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalWP.cs +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/OneSignalWP.cs @@ -72,6 +72,15 @@ public void IdsAvailable() { }); } + // Not available the WP SDK. + public void EnableInAppAlertNotification(bool enable) { } + + // Not available in WP SDK. + public void SetSubscription(bool enable) {} + + // Not available in WP SDK. + public void PostNotification(Dictionary data) { } + // Doesn't apply to Windows Phone: The Callback is setup in the constructor so this is never called. public void FireNotificationReceivedEvent(string jsonString, OneSignal.NotificationReceived notificationReceived) {} diff --git a/UnityOneSignalExample/Assets/Plugins/OneSignal/VERSION b/UnityOneSignalExample/Assets/Plugins/OneSignal/VERSION index afa2b3515..abb165823 100644 --- a/UnityOneSignalExample/Assets/Plugins/OneSignal/VERSION +++ b/UnityOneSignalExample/Assets/Plugins/OneSignal/VERSION @@ -1 +1 @@ -1.8.0 \ No newline at end of file +1.9.0 \ No newline at end of file diff --git a/UnityOneSignalExample/Assets/Plugins/iOS/OneSignal.h b/UnityOneSignalExample/Assets/Plugins/iOS/OneSignal.h index 958ed6a61..c6a038189 100644 --- a/UnityOneSignalExample/Assets/Plugins/iOS/OneSignal.h +++ b/UnityOneSignalExample/Assets/Plugins/iOS/OneSignal.h @@ -23,7 +23,7 @@ typedef void (^OneSignalResultSuccessBlock)(NSDictionary* result); typedef void (^OneSignalFailureBlock)(NSError* error); -typedef void (^OneSignalIdsAvailableBlock)(NSString* playerId, NSString* pushToken); +typedef void (^OneSignalIdsAvailableBlock)(NSString* userId, NSString* pushToken); typedef void (^OneSignalHandleNotificationBlock)(NSString* message, NSDictionary* additionalData, BOOL isActive); /** @@ -94,5 +94,12 @@ typedef NS_ENUM(NSUInteger, ONE_S_LOG_LEVEL) { - (void)IdsAvailable:(OneSignalIdsAvailableBlock)idsAvailableBlock; +- (void)enableInAppAlertNotification:(BOOL)enable; +- (void)setSubscription:(BOOL)enable; + +- (void)postNotification:(NSDictionary*)jsonData; +- (void)postNotification:(NSDictionary*)jsonData onSuccess:(OneSignalResultSuccessBlock)successBlock onFailure:(OneSignalFailureBlock)failureBlock; +- (void)postNotificationWithJsonString:(NSString*)jsonData onSuccess:(OneSignalResultSuccessBlock)successBlock onFailure:(OneSignalFailureBlock)failureBlock; + @end diff --git a/UnityOneSignalExample/Assets/Plugins/iOS/OneSignalUnityRuntime.m b/UnityOneSignalExample/Assets/Plugins/iOS/OneSignalUnityRuntime.m index 53d7184b6..af1ba2d48 100644 --- a/UnityOneSignalExample/Assets/Plugins/iOS/OneSignalUnityRuntime.m +++ b/UnityOneSignalExample/Assets/Plugins/iOS/OneSignalUnityRuntime.m @@ -174,6 +174,28 @@ void _idsAvailable() { }]; } +void _enableInAppAlertNotification(BOOL enable) { + [oneSignal enableInAppAlertNotification:enable]; +} + +void _setSubscription(BOOL enable) { + [oneSignal setSubscription:enable]; +} + +void _postNotification(const char* jsonData) { + [oneSignal postNotificationWithJsonString:CreateNSString(jsonData) + onSuccess:^(NSDictionary* results) { + UnitySendMessage(unityListener, "onPostNotificationSuccess", dictionaryToJsonChar(results)); + } + onFailure:^(NSError* error) { + if (error.userInfo && error.userInfo[@"returned"]) + UnitySendMessage(unityListener, "onPostNotificationFailed", dictionaryToJsonChar(error.userInfo[@"returned"])); + else + UnitySendMessage(unityListener, "onPostNotificationFailed", "{\"error\": \"HTTP no response error\"}"); + }]; + +} + void _setLogLevel(int logLevel, int visualLogLevel) { [OneSignal setLogLevel:logLevel visualLevel: visualLogLevel]; } diff --git a/UnityOneSignalExample/Assets/Plugins/iOS/libOneSignal.a b/UnityOneSignalExample/Assets/Plugins/iOS/libOneSignal.a index 16e0b5571..94334af24 100644 Binary files a/UnityOneSignalExample/Assets/Plugins/iOS/libOneSignal.a and b/UnityOneSignalExample/Assets/Plugins/iOS/libOneSignal.a differ diff --git a/UnityOneSignalSDK.unitypackage b/UnityOneSignalSDK.unitypackage index 53db6ee13..4be3b8aec 100644 Binary files a/UnityOneSignalSDK.unitypackage and b/UnityOneSignalSDK.unitypackage differ