adwhale-sdk-react-native 2.7.202 → 2.7.204

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.
Files changed (41) hide show
  1. package/README.md +29 -6
  2. package/android/build.gradle +15 -15
  3. package/android/proguard-rules.pro +0 -111
  4. package/android/src/main/java/com/adwhalesdkreactnative/AdwhaleSdkReactNativePackage.java +37 -0
  5. package/android/src/main/java/com/adwhalesdkreactnative/NativeAdBinderFactory.java +19 -0
  6. package/android/src/main/java/com/adwhalesdkreactnative/RNAdWhaleMediationAdSettingModule.java +10 -2
  7. package/android/src/main/java/com/adwhalesdkreactnative/RNAdWhaleMediationAdView.java +15 -4
  8. package/android/src/main/java/com/adwhalesdkreactnative/RNAdWhaleMediationCustomNativeAdView.java +186 -196
  9. package/android/src/main/java/com/adwhalesdkreactnative/SimpleBinderFactory.java +55 -0
  10. package/lib/module/AdWhaleAdView.js +44 -0
  11. package/lib/module/AdWhaleAdView.js.map +1 -0
  12. package/lib/module/{AdWhaleMediationSdk.js → AdWhaleMediationAds.js} +14 -14
  13. package/lib/module/AdWhaleMediationAds.js.map +1 -0
  14. package/lib/module/NativeAdwhaleSdkReactNative.js.map +1 -1
  15. package/lib/module/index.js +9 -9
  16. package/lib/module/index.js.map +1 -1
  17. package/lib/typescript/src/AdWhaleAdView.d.ts +51 -0
  18. package/lib/typescript/src/AdWhaleAdView.d.ts.map +1 -0
  19. package/lib/typescript/src/{AdWhaleMediationSdk.d.ts → AdWhaleMediationAds.d.ts} +4 -3
  20. package/lib/typescript/src/AdWhaleMediationAds.d.ts.map +1 -0
  21. package/lib/typescript/src/AdWhaleNativeCustomView.d.ts +1 -1
  22. package/lib/typescript/src/AdWhaleNativeCustomView.d.ts.map +1 -1
  23. package/lib/typescript/src/NativeAdwhaleSdkReactNative.d.ts +6 -1
  24. package/lib/typescript/src/NativeAdwhaleSdkReactNative.d.ts.map +1 -1
  25. package/lib/typescript/src/index.d.ts +3 -3
  26. package/lib/typescript/src/index.d.ts.map +1 -1
  27. package/package.json +4 -4
  28. package/plugin/index.js +14 -367
  29. package/src/AdWhaleAdView.tsx +90 -0
  30. package/src/{AdWhaleMediationSdk.ts → AdWhaleMediationAds.ts} +15 -15
  31. package/src/AdWhaleNativeCustomView.tsx +1 -1
  32. package/src/NativeAdwhaleSdkReactNative.ts +7 -1
  33. package/src/index.ts +12 -12
  34. package/android/src/main/res/layout/custom_native_ad_layout.xml +0 -58
  35. package/lib/module/AdWhaleBannerView.js +0 -20
  36. package/lib/module/AdWhaleBannerView.js.map +0 -1
  37. package/lib/module/AdWhaleMediationSdk.js.map +0 -1
  38. package/lib/typescript/src/AdWhaleBannerView.d.ts +0 -25
  39. package/lib/typescript/src/AdWhaleBannerView.d.ts.map +0 -1
  40. package/lib/typescript/src/AdWhaleMediationSdk.d.ts.map +0 -1
  41. package/src/AdWhaleBannerView.tsx +0 -61
@@ -1,6 +1,6 @@
1
- // src/AdWhaleMediationSdk.ts
1
+ // src/AdWhaleMediationAds.ts
2
2
  import { NativeModules, Platform } from 'react-native';
3
- import NativeAdwhaleSdkReactNative from './NativeAdwhaleSdkReactNative';
3
+ import NativeAdwhaleSdkReactNative, { type InitializeResult } from './NativeAdwhaleSdkReactNative';
4
4
 
5
5
  const LINKING_ERROR =
6
6
  `AdWhale Mediation SDK native modules not linked.\n` +
@@ -25,7 +25,7 @@ const AdwhaleSdkReactNative = NativeAdwhaleSdkReactNative;
25
25
  if (!AdwhaleSdkReactNative) {
26
26
  console.warn(LINKING_ERROR);
27
27
  } else {
28
- console.log('[AdWhaleMediationSdk] Native module linked:', {
28
+ console.log('[AdWhaleMediationAds] Native module linked:', {
29
29
  hasInitialize: !!AdwhaleSdkReactNative.initialize,
30
30
  hasRequestGdprConsent: !!AdwhaleSdkReactNative.requestGdprConsent,
31
31
  hasGetConsentStatus: !!AdwhaleSdkReactNative.getConsentStatus,
@@ -35,8 +35,8 @@ if (!AdwhaleSdkReactNative) {
35
35
  });
36
36
  }
37
37
 
38
- export const AdWhaleMediationSdk = {
39
- initialize(): Promise<number> {
38
+ export const AdWhaleMediationAds = {
39
+ initialize(): Promise<InitializeResult> {
40
40
  if (!AdwhaleSdkReactNative?.initialize) {
41
41
  return Promise.reject(new Error(LINKING_ERROR));
42
42
  }
@@ -57,19 +57,19 @@ export const AdWhaleMediationSdk = {
57
57
  },
58
58
 
59
59
  setCoppa(enabled: boolean) {
60
- console.log('[AdWhaleMediationSdk] setCoppa called:', enabled);
60
+ console.log('[AdWhaleMediationAds] setCoppa called:', enabled);
61
61
  if (!AdwhaleSdkReactNative?.setCoppa) {
62
- console.warn('[AdWhaleMediationSdk] setCoppa is not implemented in native module');
62
+ console.warn('[AdWhaleMediationAds] setCoppa is not implemented in native module');
63
63
  return;
64
64
  }
65
65
  AdwhaleSdkReactNative.setCoppa(enabled);
66
66
  },
67
67
 
68
68
  requestGdprConsent(): Promise<{ isSuccess: boolean; message: string }> {
69
- console.log('[AdWhaleMediationSdk] requestGdprConsent called');
69
+ console.log('[AdWhaleMediationAds] requestGdprConsent called');
70
70
  if (!AdwhaleSdkReactNative?.requestGdprConsent) {
71
71
  const error = new Error('requestGdprConsent is not implemented in native module');
72
- console.error('[AdWhaleMediationSdk]', error);
72
+ console.error('[AdWhaleMediationAds]', error);
73
73
  return Promise.reject(error);
74
74
  }
75
75
  return AdwhaleSdkReactNative.requestGdprConsent();
@@ -80,28 +80,28 @@ export const AdWhaleMediationSdk = {
80
80
  gdpr: string;
81
81
  personalizedConsent: boolean;
82
82
  }> {
83
- console.log('[AdWhaleMediationSdk] getConsentStatus called');
83
+ console.log('[AdWhaleMediationAds] getConsentStatus called');
84
84
  if (!AdwhaleSdkReactNative?.getConsentStatus) {
85
85
  const error = new Error('getConsentStatus is not implemented in native module');
86
- console.error('[AdWhaleMediationSdk]', error);
86
+ console.error('[AdWhaleMediationAds]', error);
87
87
  return Promise.reject(error);
88
88
  }
89
89
  return AdwhaleSdkReactNative.getConsentStatus();
90
90
  },
91
91
 
92
92
  resetGdprConsentStatus() {
93
- console.log('[AdWhaleMediationSdk] resetGdprConsentStatus called');
93
+ console.log('[AdWhaleMediationAds] resetGdprConsentStatus called');
94
94
  if (!AdwhaleSdkReactNative?.resetGdprConsentStatus) {
95
- console.warn('[AdWhaleMediationSdk] resetGdprConsentStatus is not implemented in native module');
95
+ console.warn('[AdWhaleMediationAds] resetGdprConsentStatus is not implemented in native module');
96
96
  return;
97
97
  }
98
98
  AdwhaleSdkReactNative.resetGdprConsentStatus();
99
99
  },
100
100
 
101
101
  setGdpr(consent: boolean) {
102
- console.log('[AdWhaleMediationSdk] setGdpr called:', consent);
102
+ console.log('[AdWhaleMediationAds] setGdpr called:', consent);
103
103
  if (!AdwhaleSdkReactNative?.setGdpr) {
104
- console.warn('[AdWhaleMediationSdk] setGdpr is not implemented in native module');
104
+ console.warn('[AdWhaleMediationAds] setGdpr is not implemented in native module');
105
105
  return;
106
106
  }
107
107
  AdwhaleSdkReactNative.setGdpr(consent);
@@ -20,10 +20,10 @@ export interface AdWhaleNativeCustomGcoder {
20
20
  export interface AdWhaleNativeCustomViewProps {
21
21
  style?: StyleProp<ViewStyle>;
22
22
  placementUid: string;
23
+ factoryId: string;
23
24
  placementName?: string;
24
25
  region?: string;
25
26
  gcoder?: AdWhaleNativeCustomGcoder;
26
- layoutName: string;
27
27
 
28
28
  onAdLoaded?: () => void;
29
29
  onAdFailedToLoad?: (event: AdWhaleNativeCustomError) => void;
@@ -1,7 +1,13 @@
1
1
  import { TurboModuleRegistry, type TurboModule } from 'react-native';
2
2
 
3
+ export interface InitializeResult {
4
+ statusCode: number;
5
+ message: string;
6
+ isSuccess: boolean;
7
+ }
8
+
3
9
  export interface Spec extends TurboModule {
4
- initialize(): Promise<number>;
10
+ initialize(): Promise<InitializeResult>;
5
11
  setCoppa(isEnabled: boolean): void;
6
12
  requestGdprConsent(): Promise<{
7
13
  isSuccess: boolean;
package/src/index.ts CHANGED
@@ -1,26 +1,26 @@
1
1
  // src/index.tsx
2
2
 
3
3
  // ✅ 1) SDK 초기화 / 설정 (TurboModule 래퍼)
4
- export { AdWhaleMediationSdk } from './AdWhaleMediationSdk';
4
+ export { AdWhaleMediationAds } from './AdWhaleMediationAds';
5
5
  // 사용 예:
6
- // AdWhaleMediationSdk.initialize()
7
- // AdWhaleMediationSdk.setLoggerEnabled(true)
8
- // AdWhaleMediationSdk.setCoppa(true)
9
- // AdWhaleMediationSdk.requestGdprConsent()
10
- // AdWhaleMediationSdk.getConsentStatus()
11
- // AdWhaleMediationSdk.resetGdprConsentStatus()
12
- // AdWhaleMediationSdk.setGdpr(true)
6
+ // AdWhaleMediationAds.initialize()
7
+ // AdWhaleMediationAds.setLoggerEnabled(true)
8
+ // AdWhaleMediationAds.setCoppa(true)
9
+ // AdWhaleMediationAds.requestGdprConsent()
10
+ // AdWhaleMediationAds.getConsentStatus()
11
+ // AdWhaleMediationAds.resetGdprConsentStatus()
12
+ // AdWhaleMediationAds.setGdpr(true)
13
13
 
14
14
 
15
15
  // ✅ 2) 배너 광고 View 컴포넌트
16
16
  export {
17
- AdWhaleBannerView,
18
- } from './AdWhaleBannerView';
17
+ AdWhaleAdView,
18
+ AdWhaleAdSize,
19
+ } from './AdWhaleAdView';
19
20
  export type {
20
- AdWhaleBannerSize,
21
21
  AdWhaleBannerError,
22
22
  AdWhaleBannerViewProps,
23
- } from './AdWhaleBannerView';
23
+ } from './AdWhaleAdView';
24
24
 
25
25
 
26
26
  // ✅ 3) 전면 광고 API
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
- android:layout_width="match_parent"
4
- android:layout_height="wrap_content"
5
- android:background="#EAEAEA"
6
- android:padding="8dp">
7
-
8
- <ImageView
9
- android:id="@+id/view_icon"
10
- android:layout_width="60dp"
11
- android:layout_height="60dp"
12
- android:layout_alignParentStart="true"
13
- android:layout_alignParentTop="true"
14
- android:scaleType="centerCrop" />
15
-
16
- <TextView
17
- android:id="@+id/view_title"
18
- android:layout_width="wrap_content"
19
- android:layout_height="wrap_content"
20
- android:layout_toEndOf="@id/view_icon"
21
- android:layout_alignTop="@id/view_icon"
22
- android:layout_marginStart="8dp"
23
- android:textStyle="bold"
24
- android:textSize="16sp"
25
- android:textColor="#000000"
26
- android:maxLines="1"
27
- android:ellipsize="end" />
28
-
29
- <TextView
30
- android:id="@+id/view_body"
31
- android:layout_width="wrap_content"
32
- android:layout_height="wrap_content"
33
- android:layout_toEndOf="@id/view_icon"
34
- android:layout_below="@id/view_title"
35
- android:layout_marginStart="8dp"
36
- android:layout_marginTop="4dp"
37
- android:textSize="12sp"
38
- android:textColor="#333333"
39
- android:maxLines="2"
40
- android:ellipsize="end" />
41
-
42
- <FrameLayout
43
- android:id="@+id/view_media"
44
- android:layout_width="match_parent"
45
- android:layout_height="180dp"
46
- android:layout_below="@id/view_icon"
47
- android:layout_marginTop="8dp"
48
- android:background="#CCCCCC" />
49
-
50
- <Button
51
- android:id="@+id/button_cta"
52
- android:layout_width="match_parent"
53
- android:layout_height="40dp"
54
- android:layout_below="@id/view_media"
55
- android:layout_marginTop="8dp"
56
- android:text="Call to Action" />
57
-
58
- </RelativeLayout>
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- // src/AdWhaleBannerView.tsx
4
- import React from 'react';
5
- import { requireNativeComponent } from 'react-native';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- const RNAdWhaleMediationAdView = requireNativeComponent('RNAdWhaleMediationAdView');
8
- export const AdWhaleBannerView = ({
9
- onAdLoadFailed,
10
- ...restProps
11
- }) => {
12
- const handleAdLoadFailed = e => {
13
- onAdLoadFailed?.(e.nativeEvent);
14
- };
15
- return /*#__PURE__*/_jsx(RNAdWhaleMediationAdView, {
16
- ...restProps,
17
- onAdLoadFailed: onAdLoadFailed ? handleAdLoadFailed : undefined
18
- });
19
- };
20
- //# sourceMappingURL=AdWhaleBannerView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","requireNativeComponent","jsx","_jsx","RNAdWhaleMediationAdView","AdWhaleBannerView","onAdLoadFailed","restProps","handleAdLoadFailed","e","nativeEvent","undefined"],"sourceRoot":"../../src","sources":["AdWhaleBannerView.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,sBAAsB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAyCtD,MAAMC,wBAAwB,GAC5BH,sBAAsB,CAAoB,0BAA0B,CAAC;AAEvE,OAAO,MAAMI,iBAAmD,GAAGA,CAAC;EAClEC,cAAc;EACd,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,kBAAuD,GAAGC,CAAC,IAAI;IACnEH,cAAc,GAAGG,CAAC,CAACC,WAAW,CAAC;EACjC,CAAC;EAED,oBACEP,IAAA,CAACC,wBAAwB;IAAA,GACnBG,SAAS;IACbD,cAAc,EAAEA,cAAc,GAAGE,kBAAkB,GAAGG;EAAU,CACjE,CAAC;AAEN,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["NativeModules","Platform","NativeAdwhaleSdkReactNative","LINKING_ERROR","OS","RNAdWhaleMediationLoggerModule","AdwhaleSdkReactNative","console","warn","log","hasInitialize","initialize","hasRequestGdprConsent","requestGdprConsent","hasGetConsentStatus","getConsentStatus","hasResetGdprConsentStatus","resetGdprConsentStatus","hasSetGdpr","setGdpr","hasSetCoppa","setCoppa","AdWhaleMediationSdk","Promise","reject","Error","setLoggerEnabled","enabled","setLogLevel","getLogLevel","error","consent"],"sourceRoot":"../../src","sources":["AdWhaleMediationSdk.ts"],"mappings":";;AAAA;AACA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AACtD,OAAOC,2BAA2B,MAAM,kCAA+B;AAEvE,MAAMC,aAAa,GACjB,oDAAoD,GACpD,cAAc,GACd,6EAA6E,GAC7E,mCAAmC,GACnC,0BAA0B,GAC1B,aAAaF,QAAQ,CAACG,E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CAAC;IAC7D,IAAI,CAACzB,qBAAqB,EAAEa,OAAO,EAAE;MACnCZ,OAAO,CAACC,IAAI,CAAC,mEAAmE,CAAC;MACjF;IACF;IACAF,qBAAqB,CAACa,OAAO,CAACY,OAAO,CAAC;EACxC;AACF,CAAC","ignoreList":[]}
@@ -1,25 +0,0 @@
1
- import React from 'react';
2
- import type { StyleProp, ViewStyle } from 'react-native';
3
- export type AdWhaleBannerSize = '320x50' | '320x100' | '300x250' | '250x250' | 'ADAPTIVE_ANCHOR';
4
- export interface AdWhaleBannerError {
5
- statusCode: number;
6
- message: string;
7
- }
8
- export interface AdWhaleBannerGcoder {
9
- lt: number;
10
- lng: number;
11
- }
12
- export interface AdWhaleBannerViewProps {
13
- style?: StyleProp<ViewStyle>;
14
- placementUid: string;
15
- placementName?: string;
16
- region?: string;
17
- gcoder?: AdWhaleBannerGcoder;
18
- adSize: AdWhaleBannerSize;
19
- loadAd?: boolean;
20
- onAdLoaded?: () => void;
21
- onAdLoadFailed?: (event: AdWhaleBannerError) => void;
22
- onAdClicked?: () => void;
23
- }
24
- export declare const AdWhaleBannerView: React.FC<AdWhaleBannerViewProps>;
25
- //# sourceMappingURL=AdWhaleBannerView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AdWhaleBannerView.d.ts","sourceRoot":"","sources":["../../../src/AdWhaleBannerView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAwB,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,iBAAiB,CAAC;AAEtB,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAYD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAc9D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AdWhaleMediationSdk.d.ts","sourceRoot":"","sources":["../../../src/AdWhaleMediationSdk.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,mBAAmB;kBAChB,OAAO,CAAC,MAAM,CAAC;8BAOH,OAAO;mBAIlB,OAAO,CAAC,MAAM,CAAC;sBASZ,OAAO;0BASH,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;wBAUlD,OAAO,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,mBAAmB,EAAE,OAAO,CAAC;KAC9B,CAAC;;qBAmBe,OAAO;CAQzB,CAAC"}
@@ -1,61 +0,0 @@
1
- // src/AdWhaleBannerView.tsx
2
- import React from 'react';
3
- import { requireNativeComponent } from 'react-native';
4
- import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native';
5
-
6
- export type AdWhaleBannerSize =
7
- | '320x50'
8
- | '320x100'
9
- | '300x250'
10
- | '250x250'
11
- | 'ADAPTIVE_ANCHOR';
12
-
13
- export interface AdWhaleBannerError {
14
- statusCode: number;
15
- message: string;
16
- }
17
-
18
- export interface AdWhaleBannerGcoder {
19
- lt: number;
20
- lng: number;
21
- }
22
-
23
- export interface AdWhaleBannerViewProps {
24
- style?: StyleProp<ViewStyle>;
25
- placementUid: string;
26
- placementName?: string;
27
- region?: string;
28
- gcoder?: AdWhaleBannerGcoder;
29
- adSize: AdWhaleBannerSize;
30
- loadAd?: boolean;
31
-
32
- onAdLoaded?: () => void;
33
- onAdLoadFailed?: (event: AdWhaleBannerError) => void;
34
- onAdClicked?: () => void;
35
- }
36
-
37
- type NativeErrorEvent = NativeSyntheticEvent<AdWhaleBannerError>;
38
-
39
- interface NativeAdViewProps
40
- extends Omit<AdWhaleBannerViewProps, 'onAdLoadFailed'> {
41
- onAdLoadFailed?: (e: NativeErrorEvent) => void;
42
- }
43
-
44
- const RNAdWhaleMediationAdView =
45
- requireNativeComponent<NativeAdViewProps>('RNAdWhaleMediationAdView');
46
-
47
- export const AdWhaleBannerView: React.FC<AdWhaleBannerViewProps> = ({
48
- onAdLoadFailed,
49
- ...restProps
50
- }) => {
51
- const handleAdLoadFailed: NativeAdViewProps['onAdLoadFailed'] = e => {
52
- onAdLoadFailed?.(e.nativeEvent);
53
- };
54
-
55
- return (
56
- <RNAdWhaleMediationAdView
57
- {...restProps}
58
- onAdLoadFailed={onAdLoadFailed ? handleAdLoadFailed : undefined}
59
- />
60
- );
61
- };