plotline-engage 1.0.0 → 1.0.2

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.
@@ -294,4 +294,9 @@ public class RNPlotline extends ReactContextBaseJavaModule {
294
294
  final Activity activity = getCurrentActivity();
295
295
  Plotline.trackPage(pageId, activity);
296
296
  }
297
+
298
+ @ReactMethod
299
+ public void debug() {
300
+ Plotline.debug(true);
301
+ }
297
302
  }
package/index.d.ts CHANGED
@@ -6,6 +6,7 @@ declare class plotline {
6
6
  showMockStudy(): void;
7
7
  setColor(colors: {[key: string]: string}): void;
8
8
  trackPage(pageId: string): void;
9
+ debug(): void;
9
10
  }
10
11
  declare const Plotline: plotline;
11
12
  export default Plotline;
package/index.js CHANGED
@@ -12,7 +12,6 @@ class plotline {
12
12
  }
13
13
 
14
14
  init (apiKey, refId, endpoint = null) {
15
- console.log("[Plotline] init called");
16
15
  RNPlotline.init(apiKey, refId, endpoint);
17
16
  }
18
17
 
@@ -33,9 +32,12 @@ class plotline {
33
32
  }
34
33
 
35
34
  trackPage (pageId) {
36
- console.log("[Plotline] track called");
37
35
  RNPlotline.trackPage(pageId);
38
36
  }
37
+
38
+ debug () {
39
+ RNPlotline.debug();
40
+ }
39
41
  }
40
42
 
41
43
  const Plotline = new plotline();
package/ios/RNPlotline.m CHANGED
@@ -6,15 +6,12 @@
6
6
 
7
7
  RCT_EXPORT_METHOD(init:(NSString *)apiKey userId:(NSString *)userId endpoint:(NSString *)endpoint)
8
8
  {
9
- printf("Plotline Init Called");
10
- [Plotline debugWithShouldDebug:true];
11
9
  if (endpoint != nil) {
12
10
  [Plotline initializeWithApiKey:apiKey userId:userId endpoint:endpoint];
13
11
  } else {
14
12
  [Plotline initializeWithApiKey:apiKey userId:userId];
15
13
  }
16
14
  [Plotline setPlotlineFrameworkWithFramework:@"REACT_NATIVE"];
17
- // [Plotline trackPageWithPageName:@"MainActivity"];
18
15
  }
19
16
 
20
17
  RCT_EXPORT_METHOD(track:(NSString *)eventName properties: (NSDictionary *) properties)
@@ -54,7 +51,6 @@ RCT_EXPORT_METHOD(debug)
54
51
 
55
52
  RCT_EXPORT_METHOD(trackPage:(NSString *)pageName)
56
53
  {
57
- printf("Plotline Track Page Called");
58
54
  [Plotline trackPageWithPageName:pageName];
59
55
  }
60
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plotline-engage",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "React Native plugin for Plotline",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"