reactnative-plugin-appice 1.7.16 → 1.7.18

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.
@@ -167,11 +167,13 @@ RCT_EXPORT_METHOD(getUserId:(RCTResponseSenderBlock)callback)
167
167
  RCTLog(@"getUserIdArray %@", getUserIdArray);
168
168
 
169
169
  if (getUserIdArray && getUserIdArray.count > 0 && callback) {
170
- callback(@[getUserIdArray]);
170
+ NSError *error = nil;
171
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:getUserIdArray options:0 error:&error];
172
+ NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
173
+ [self returnResult:jsonString withCallback:callback andError:nil];
174
+
171
175
  } else {
172
- if (callback) {
173
- callback(@[[NSNull null]]);
174
- }
176
+ [self returnResult:nil withCallback:callback andError:nil];
175
177
  }
176
178
 
177
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactnative-plugin-appice",
3
- "version": "1.7.16",
3
+ "version": "1.7.18",
4
4
  "description": "appICE React Native SDK",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,8 +0,0 @@
1
- ## This file must *NOT* be checked into Version Control Systems,
2
- # as it contains information specific to your local configuration.
3
- #
4
- # Location of the SDK. This is only used by Gradle.
5
- # For customization when using a Version Control System, please read the
6
- # header note.
7
- #Thu Jul 11 15:09:32 IST 2024
8
- sdk.dir=/Users/amit/Library/Android/sdk