reactnative-plugin-appice 1.5.5 → 1.5.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.
@@ -1,5 +1,6 @@
1
1
  package com.reactlibrary;
2
2
 
3
+ import android.annotation.TargetApi;
3
4
  import android.app.job.JobParameters;
4
5
  import android.app.job.JobService;
5
6
  import android.os.Build;
@@ -15,14 +15,14 @@ RCT_EXPORT_MODULE()
15
15
  return @{
16
16
  kAppICEPushNotificationClicked : kAppICEPushNotificationClicked,
17
17
  kn : kn,
18
- kem : kem,
19
- kph : kph,
18
+ kem : "e",
19
+ kph : "p",
20
20
  ka : ka,
21
21
  kg : kg,
22
- ked : ked,
23
- ket : ket,
22
+ ked : "edt",
23
+ ket : "emt",
24
24
  km : km,
25
- kis_emp : kis_emp
25
+ kis_emp : "em"
26
26
  };
27
27
  }
28
28
  - (dispatch_queue_t)methodQueue {
@@ -103,10 +103,11 @@ RCT_EXPORT_METHOD(pushNotificationClicked:(NSDictionary*)userInfo)
103
103
  {
104
104
  [[appICE sharedInstance] pushNotificationClickedEvent:userInfo];
105
105
  }
106
+
106
107
  RCT_EXPORT_METHOD(setUser:(NSDictionary*)userProfile)
107
108
  {
108
- NSArray *items = [NSArray arrayWithObjects:kCLYUserName,kCLYUserEmail,kCLYUserPhone,kCLYUserGender,kCLYUserBirthYear,kCLYUserAge,kCLYUserIsUserEmployed,kCLYUserEmploymentType,kCLYUserEducationType,kCLYUserIsUserMarried, nil];
109
- appICEUserDetails *app=[appICEUserDetails new];
109
+ NSArray *items = [NSArray arrayWithObjects:kAIUserName,kAIUserEmail,kAIUserPhone,kAIUserGender,kAIUserBirthYear,kAIUserAge,kAIUserIsUserEmployed,kAIUserEmploymentType,kAIUserEducationType,kAIUserIsUserMarried, nil];
110
+
110
111
  for(int i= 0; i< items.count ;i++)
111
112
  {
112
113
 
@@ -125,21 +126,21 @@ RCT_EXPORT_METHOD(setUser:(NSDictionary*)userProfile)
125
126
  app.gender = userProfile[items[i]];
126
127
  break;
127
128
  case 4:
128
- app.dob = userProfile[items[i]];
129
+ app.dob = [userProfile[items[i]]longValue];
129
130
  break;
130
131
  case 5:
131
- app.age = userProfile[items[i]];
132
+ app.age = [userProfile[items[i] ]intValue];
132
133
  break;
133
134
  case 6:
134
135
  app.is_user_employed = userProfile[items[i]];
135
136
  break;
136
- case 8:
137
+ case 7:
137
138
  app.employment_type = userProfile[items[i]];
138
139
  break;
139
- case 9:
140
+ case 8:
140
141
  app.education_type = userProfile[items[i]];
141
142
  break;
142
- case 10:
143
+ case 9:
143
144
  app.is_user_married = userProfile[items[i]];
144
145
  break;
145
146
  default:
@@ -149,15 +150,16 @@ RCT_EXPORT_METHOD(setUser:(NSDictionary*)userProfile)
149
150
  }
150
151
  if(app != nil)
151
152
  {
152
- [[appICE sharedInstance] setUserDetail:app];
153
+ [[appICE sharedInstance] setUserDetail:app];
153
154
  }
154
155
 
155
- }
156
+ }
156
157
 
157
158
  + (void)pushNotificationClicked:(NSDictionary *)userInfo {
158
159
  NSDictionary *event = @{ kAppICEPushNotificationClicked : userInfo};
159
160
  [[NSNotificationCenter defaultCenter] postNotificationName:kAppICEPushNotificationClicked object:nil userInfo:event];
160
161
  }
162
+
161
163
  + (void)pushNotificationReceived:(NSDictionary *)userInfo {
162
164
  [[appICE sharedInstance]pushNotificationReceived:userInfo];
163
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactnative-plugin-appice",
3
- "version": "1.5.5",
3
+ "version": "1.5.7",
4
4
  "description": "appICE React Native SDK",
5
5
  "main": "index.js",
6
6
  "files": [