@omp343/rn-ad-mediation 0.1.4 → 0.1.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.
@@ -1,8 +1,8 @@
1
1
  package com.rnadmediation
2
2
 
3
3
  import com.facebook.react.bridge.ReactApplicationContext
4
- import com.facebook.react.bridge.ReactMethod
5
4
  import com.facebook.react.module.annotations.ReactModule
5
+ import com.facebook.fbreact.specs.NativeRnAdMediationSpec // 🔥 THIS WAS MISSING
6
6
  import com.yourcompany.adsdk.AdMediation
7
7
 
8
8
  @ReactModule(name = RnAdMediationModule.NAME)
@@ -10,9 +10,6 @@ class RnAdMediationModule(
10
10
  reactContext: ReactApplicationContext
11
11
  ) : NativeRnAdMediationSpec(reactContext) {
12
12
 
13
- override fun getName(): String = NAME
14
-
15
- @ReactMethod
16
13
  override fun initialize(
17
14
  admobAppId: String,
18
15
  unityGameId: String?,
@@ -28,24 +25,16 @@ class RnAdMediationModule(
28
25
  )
29
26
  }
30
27
 
31
- @ReactMethod
32
28
  override fun showBanner() {
33
- currentActivity?.let {
34
- AdMediation.showBanner(it)
35
- }
36
- }
37
- @ReactMethod
38
- override fun showRewarded() {
39
- currentActivity?.let {
40
- AdMediation.showRewarded(it)
41
- }
29
+ currentActivity?.let { AdMediation.showBanner(it) }
42
30
  }
43
31
 
44
- @ReactMethod
45
32
  override fun showInterstitial() {
46
- currentActivity?.let {
47
- AdMediation.showInterstitial(it)
48
- }
33
+ currentActivity?.let { AdMediation.showInterstitial(it) }
34
+ }
35
+
36
+ override fun showRewarded() {
37
+ currentActivity?.let { AdMediation.showRewarded(it) }
49
38
  }
50
39
 
51
40
  companion object {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omp343/rn-ad-mediation",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "React Native ad mediation wrapper",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -12,7 +12,6 @@
12
12
  },
13
13
  "./package.json": "./package.json"
14
14
  },
15
-
16
15
  "files": [
17
16
  "src",
18
17
  "lib",
@@ -111,15 +110,14 @@
111
110
  ]
112
111
  },
113
112
  "codegenConfig": {
114
- "name": "RnAdMediation",
115
- "type": "modules",
116
- "jsSrcsDir": "src/specs",
117
- "android": {
118
- "javaPackageName": "com.rnadmediation"
119
- }
120
- }
121
- ,
122
- "prettier": {
113
+ "name": "RnAdMediation",
114
+ "type": "modules",
115
+ "jsSrcsDir": "src/specs",
116
+ "android": {
117
+ "javaPackageName": "com.rnadmediation"
118
+ }
119
+ },
120
+ "prettier": {
123
121
  "quoteProps": "consistent",
124
122
  "singleQuote": true,
125
123
  "tabWidth": 2,