react-native-s2offerwall 1.0.0 → 1.0.3

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.
@@ -74,5 +74,5 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
74
74
  dependencies {
75
75
  implementation "com.facebook.react:react-android"
76
76
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
77
- implementation("io.snapplay:s2offerwall-aos-sdk:1.0.17")
77
+ implementation("io.snapplay:s2offerwall-aos-sdk:1.0.18")
78
78
  }
@@ -117,6 +117,30 @@ RCT_EXPORT_METHOD(resetUserName:(RCTPromiseResolveBlock)resolve rejecter:(RCTPro
117
117
  resolve(nil);
118
118
  }
119
119
 
120
+ RCT_EXPORT_METHOD(setConsentDialogRequired:(BOOL)required
121
+ withResolver:(RCTPromiseResolveBlock)resolve
122
+ withRejecter:(RCTPromiseRejectBlock)reject)
123
+ {
124
+ resolve(nil);
125
+ }
126
+
127
+ RCT_EXPORT_METHOD(presentATTPopup:(RCTPromiseResolveBlock)resolve
128
+ rejecter:(RCTPromiseRejectBlock)reject)
129
+ {
130
+ // Swift 코드: guard let vc = ...
131
+ UIViewController *rootVC = [UIApplication sharedApplication].delegate.window.rootViewController;
132
+
133
+ if (!rootVC) {
134
+ reject(@"NO_VIEWCONTROLLER", @"No root view controller", nil);
135
+ return;
136
+ }
137
+
138
+ dispatch_async(dispatch_get_main_queue(), ^{
139
+ [S2Offerwall presentATTPopup:rootVC];
140
+ resolve(nil);
141
+ });
142
+ }
143
+
120
144
  // requestOfferwallData
121
145
  RCT_EXPORT_METHOD(requestOfferwallData:(NSString *)placementName
122
146
  isEmbeded:(BOOL)isEmbeded
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-s2offerwall",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "React native plugin for S2Offerwall",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
18
18
  s.private_header_files = "ios/**/*.h"
19
19
 
20
- s.dependency 's2offerwall', '~> 1.0.17'
20
+ s.dependency 's2offerwall', '~> 1.0.18'
21
21
  s.dependency 'React-Core'
22
22
 
23
23
  install_modules_dependencies(s)