com.onesignal.unity.ios 5.0.0 → 5.0.1

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.
@@ -80,6 +80,7 @@ typedef void (*StateListenerDelegate)(const char* current, const char* previous)
80
80
 
81
81
  /*
82
82
  * Bridge methods
83
+ * We use strdup because Unity attempts to free the memory after we return the value
83
84
  */
84
85
 
85
86
  extern "C" {
@@ -156,11 +157,11 @@ extern "C" {
156
157
  }
157
158
 
158
159
  const char* _pushSubscriptionGetId() {
159
- return [OneSignal.User.pushSubscription.id UTF8String];
160
+ return strdup([OneSignal.User.pushSubscription.id UTF8String]);
160
161
  }
161
162
 
162
163
  const char* _pushSubscriptionGetToken() {
163
- return [OneSignal.User.pushSubscription.token UTF8String];
164
+ return strdup([OneSignal.User.pushSubscription.token UTF8String]);
164
165
  }
165
166
 
166
167
  bool _pushSubscriptionGetOptedIn() {
@@ -96,7 +96,7 @@ static bool swizzled = false;
96
96
 
97
97
  - (BOOL)oneSignalApplication:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
98
98
  [OneSignalWrapper setSdkType:@"unity"];
99
- [OneSignalWrapper setSdkVersion:@"050000"];
99
+ [OneSignalWrapper setSdkVersion:@"050001"];
100
100
  [OneSignal setLaunchOptions:launchOptions];
101
101
 
102
102
  if ([self respondsToSelector:@selector(oneSignalApplication:didFinishLaunchingWithOptions:)])
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": "5.0.0",
4
+ "version": "5.0.1",
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": "5.0.0"
8
+ "com.onesignal.unity.core": "5.0.1"
9
9
  },
10
10
  "keywords": [
11
11
  "push-notifications",