@1selfworld/adchain-sdk-react-native 1.0.15 → 1.0.16
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/README.md
CHANGED
|
@@ -96,6 +96,33 @@ export default function App() {
|
|
|
96
96
|
- `openAdjoeOfferwall(placementId?)` - ADJOE 오퍼월 열기
|
|
97
97
|
- `openOfferwallNestAds(placementId)` - NestAds 오퍼월 열기
|
|
98
98
|
|
|
99
|
+
### 임베디드 오퍼월 컴포넌트
|
|
100
|
+
`AdchainOfferwallView`는 탭이나 화면에 직접 임베드할 수 있는 React Native 컴포넌트입니다.
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
import { AdchainOfferwallView } from '@1selfworld/adchain-sdk-react-native';
|
|
104
|
+
|
|
105
|
+
<AdchainOfferwallView
|
|
106
|
+
placementId="tab_embedded_offerwall"
|
|
107
|
+
style={{ flex: 1 }}
|
|
108
|
+
onOfferwallOpened={() => console.log('Opened')}
|
|
109
|
+
onOfferwallClosed={() => console.log('Closed')}
|
|
110
|
+
onBackPressOnFirstPage={() => {
|
|
111
|
+
// Android: WebView가 첫 페이지일 때 백버튼 처리
|
|
112
|
+
// 앱 종료, 다른 탭 이동 등의 로직 구현
|
|
113
|
+
}}
|
|
114
|
+
onBackNavigated={() => {
|
|
115
|
+
// Android: WebView 내부에서 뒤로가기 성공
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**백버튼 이벤트 (Android, v1.0.15+)**:
|
|
121
|
+
- `onBackPressOnFirstPage`: WebView 스택에 페이지가 1개만 있을 때 (더 이상 뒤로갈 수 없음)
|
|
122
|
+
- `onBackNavigated`: WebView 스택에서 성공적으로 뒤로 이동했을 때
|
|
123
|
+
|
|
124
|
+
앱 개발자는 이 이벤트를 받아서 앱 종료, 탭 전환 등의 동작을 직접 구현할 수 있습니다.
|
|
125
|
+
|
|
99
126
|
### 퀴즈 & 미션
|
|
100
127
|
- `loadQuizList(unitId)` - 퀴즈 목록 로드
|
|
101
128
|
- `clickQuiz(unitId, quizId)` - 퀴즈 클릭
|
|
@@ -180,14 +207,16 @@ npx expo run:ios
|
|
|
180
207
|
|
|
181
208
|
### Pod install 실패 (iOS)
|
|
182
209
|
- Git URL이 올바른지 확인
|
|
183
|
-
- 태그 v1.0.
|
|
210
|
+
- 태그 v1.0.45가 존재하는지 확인
|
|
184
211
|
- 시도: `cd ios && rm -rf Pods Podfile.lock && pod install`
|
|
185
212
|
|
|
186
213
|
## 버전 호환성
|
|
187
214
|
|
|
188
|
-
| 패키지 버전 | Android SDK | iOS SDK | Swift | Expo SDK |
|
|
189
|
-
|
|
190
|
-
| 1.0.
|
|
215
|
+
| 패키지 버전 | Android SDK | iOS SDK | Swift | Expo SDK | 주요 변경사항 |
|
|
216
|
+
|------------|-------------|---------|-------|----------|--------------|
|
|
217
|
+
| 1.0.15 | v1.0.29 | v1.0.45 | 5.5 | 50-53 | 백버튼 이벤트, NestAds 지원 |
|
|
218
|
+
| 1.0.13 | v1.0.28 | v1.0.45 | 5.5 | 50-53 | NestAds 오퍼월 추가 |
|
|
219
|
+
| 1.0.0 | v1.0.28 | v1.0.45 | 5.5 | 50-53 | 초기 릴리즈 |
|
|
191
220
|
|
|
192
221
|
## 알려진 제한사항
|
|
193
222
|
|
|
@@ -34,13 +34,13 @@ export interface AdchainOfferwallViewProps {
|
|
|
34
34
|
/**
|
|
35
35
|
* Callback when back button is pressed on the first page (WebView stack has only 1 item)
|
|
36
36
|
* This means the WebView cannot go back further, so the app should handle it (e.g., exit app or navigate to another tab)
|
|
37
|
-
* @since 1.0.
|
|
37
|
+
* @since 1.0.45
|
|
38
38
|
*/
|
|
39
39
|
onBackPressOnFirstPage?: () => void;
|
|
40
40
|
/**
|
|
41
41
|
* Callback when back button successfully navigated back in WebView (WebView stack has 2+ items)
|
|
42
42
|
* This means the WebView went back in its history
|
|
43
|
-
* @since 1.0.
|
|
43
|
+
* @since 1.0.45
|
|
44
44
|
*/
|
|
45
45
|
onBackNavigated?: () => void;
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -28,10 +28,10 @@ function withAdchainIOS(config) {
|
|
|
28
28
|
if (targetMatch) {
|
|
29
29
|
const targetName = targetMatch[1];
|
|
30
30
|
const podDeclaration = `
|
|
31
|
-
# AdChain SDK (Git Pod) - v1.0.
|
|
31
|
+
# AdChain SDK (Git Pod) - v1.0.45
|
|
32
32
|
# CocoaPods Trunk에 없으므로 Git 방식 사용
|
|
33
33
|
# Swift 5.5 (5.9 optional 파라미터 버그 회피)
|
|
34
|
-
pod 'AdChainSDK', :git => 'https://github.com/1selfworld-labs/adchain-sdk-ios-release.git', :tag => 'v1.0.
|
|
34
|
+
pod 'AdChainSDK', :git => 'https://github.com/1selfworld-labs/adchain-sdk-ios-release.git', :tag => 'v1.0.45'
|
|
35
35
|
`;
|
|
36
36
|
|
|
37
37
|
podfile = podfile.replace(
|
|
@@ -41,8 +41,8 @@ function withAdchainIOS(config) {
|
|
|
41
41
|
} else {
|
|
42
42
|
// Fallback
|
|
43
43
|
const podDeclaration = `
|
|
44
|
-
# AdChain SDK (Git Pod) - v1.0.
|
|
45
|
-
pod 'AdChainSDK', :git => 'https://github.com/1selfworld-labs/adchain-sdk-ios-release.git', :tag => 'v1.0.
|
|
44
|
+
# AdChain SDK (Git Pod) - v1.0.45
|
|
45
|
+
pod 'AdChainSDK', :git => 'https://github.com/1selfworld-labs/adchain-sdk-ios-release.git', :tag => 'v1.0.45'
|
|
46
46
|
`;
|
|
47
47
|
|
|
48
48
|
podfile = podfile.replace(
|
|
@@ -87,19 +87,19 @@ export interface AdchainOfferwallViewProps {
|
|
|
87
87
|
*/
|
|
88
88
|
onDataRequest?: (requestType: string, params: any) => any;
|
|
89
89
|
|
|
90
|
-
// ===== NEW: Back Button Handling (v1.0.
|
|
90
|
+
// ===== NEW: Back Button Handling (v1.0.45+) =====
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Callback when back button is pressed on the first page (WebView stack has only 1 item)
|
|
94
94
|
* This means the WebView cannot go back further, so the app should handle it (e.g., exit app or navigate to another tab)
|
|
95
|
-
* @since 1.0.
|
|
95
|
+
* @since 1.0.45
|
|
96
96
|
*/
|
|
97
97
|
onBackPressOnFirstPage?: () => void;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* Callback when back button successfully navigated back in WebView (WebView stack has 2+ items)
|
|
101
101
|
* This means the WebView went back in its history
|
|
102
|
-
* @since 1.0.
|
|
102
|
+
* @since 1.0.45
|
|
103
103
|
*/
|
|
104
104
|
onBackNavigated?: () => void;
|
|
105
105
|
}
|
|
@@ -117,8 +117,8 @@ interface NativeOfferwallViewProps {
|
|
|
117
117
|
onHeightChange?: (event: OfferwallHeightChangeEvent) => void;
|
|
118
118
|
onCustomEvent?: (event: OfferwallCustomEvent) => void;
|
|
119
119
|
onDataRequest?: (event: OfferwallDataRequestEvent) => void;
|
|
120
|
-
onBackPressOnFirstPage?: () => void; // NEW (v1.0.
|
|
121
|
-
onBackNavigated?: () => void; // NEW (v1.0.
|
|
120
|
+
onBackPressOnFirstPage?: () => void; // NEW (v1.0.45)
|
|
121
|
+
onBackNavigated?: () => void; // NEW (v1.0.45)
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// Require native component
|