react-native-s2offerwall 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.
- package/ios/S2OfferwallModule.m +24 -0
- package/package.json +1 -1
package/ios/S2OfferwallModule.m
CHANGED
|
@@ -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
|