@attentive-mobile/attentive-react-native-sdk 1.0.3-beta.1 → 1.0.5

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.
@@ -5,14 +5,14 @@
5
5
  // Created by Wyatt Davis on 2/13/23.
6
6
  //
7
7
 
8
- //#ifdef RCT_NEW_ARCH_ENABLED
9
- //#import "RNAttentiveReactNativeSdkSpec.h"
10
- //
11
- //@interface AttentiveReactNativeSdk : NSObject <NativeAttentiveReactNativeSdkSpec>
12
- //#else
8
+ #ifdef RCT_NEW_ARCH_ENABLED
9
+ #import "RNAttentiveReactNativeSdkSpec.h"
10
+
11
+ @interface AttentiveReactNativeSdk : NSObject <NativeAttentiveReactNativeSdkSpec>
12
+ #else
13
13
  #import <React/RCTBridgeModule.h>
14
14
 
15
15
  @interface AttentiveReactNativeSdk : NSObject <RCTBridgeModule>
16
- //#endif
16
+ #endif
17
17
 
18
18
  @end
@@ -21,7 +21,7 @@
21
21
  RCT_EXPORT_MODULE()
22
22
 
23
23
  RCT_EXPORT_METHOD(initialize:(NSDictionary*)configuration) {
24
- _sdk = [[ATTNNativeSDK alloc] initWithDomain:configuration[@"attentiveDomain"] mode:configuration[@"mode"] skipFatigueOnCreatives:configuration[@"skipFatigueOnCreatives"]];
24
+ _sdk = [[ATTNNativeSDK alloc] initWithDomain:configuration[@"attentiveDomain"] mode:configuration[@"mode"] skipFatigueOnCreatives:configuration[@"skipFatigueOnCreatives"] enableDebugger:configuration[@"enableDebugger"]];
25
25
  }
26
26
 
27
27
  RCT_EXPORT_METHOD(triggerCreative) {
@@ -71,14 +71,24 @@ RCT_EXPORT_METHOD(recordCustomEvent:(NSDictionary*)attrs) {
71
71
  [_sdk recordCustomEvent:attrs];
72
72
  }
73
73
 
74
+ RCT_EXPORT_METHOD(invokeAttentiveDebugHelper) {
75
+ [_sdk invokeAttentiveDebugHelper];
76
+ }
77
+
78
+ RCT_EXPORT_METHOD(exportDebugLogs:(RCTPromiseResolveBlock)resolve
79
+ reject:(RCTPromiseRejectBlock)reject) {
80
+ NSString *exportContent = [_sdk exportDebugLogs];
81
+ resolve(exportContent);
82
+ }
83
+
74
84
  // Don't compile this code when we build for the old architecture.
75
- //#ifdef RCT_NEW_ARCH_ENABLED
76
- //- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
77
- // (const facebook::react::ObjCTurboModule::InitParams &)params
78
- //{
79
- // return std::make_shared<facebook::react::NativeAttentiveReactNativeSdkSpecJSI>(params);
80
- //}
81
- //#endif
85
+ #ifdef RCT_NEW_ARCH_ENABLED
86
+ - (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
87
+ (const facebook::react::ObjCTurboModule::InitParams &)params
88
+ {
89
+ return std::make_shared<facebook::react::NativeAttentiveReactNativeSdkSpecJSI>(params);
90
+ }
91
+ #endif
82
92
 
83
93
  @end
84
94
 
@@ -193,7 +193,7 @@
193
193
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194
194
  GCC_WARN_UNUSED_FUNCTION = YES;
195
195
  GCC_WARN_UNUSED_VARIABLE = YES;
196
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
196
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
197
197
  MTL_ENABLE_DEBUG_INFO = YES;
198
198
  ONLY_ACTIVE_ARCH = YES;
199
199
  OTHER_LDFLAGS = (
@@ -247,7 +247,7 @@
247
247
  GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
248
248
  GCC_WARN_UNUSED_FUNCTION = YES;
249
249
  GCC_WARN_UNUSED_VARIABLE = YES;
250
- IPHONEOS_DEPLOYMENT_TARGET = 8.0;
250
+ IPHONEOS_DEPLOYMENT_TARGET = 14.0;
251
251
  MTL_ENABLE_DEBUG_INFO = NO;
252
252
  OTHER_LDFLAGS = (
253
253
  "$(inherited)",
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>AttentiveReactNativeSdk.xcscheme_^#shared#^_</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ </dict>
14
+ </plist>