@adstage/react-native-sdk 1.0.2 → 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.
@@ -40,7 +40,7 @@ class AdStageModule(reactContext: ReactApplicationContext) :
40
40
  try {
41
41
  Log.d(TAG, "Initializing AdStage SDK...")
42
42
 
43
- val context = currentActivity ?: reactApplicationContext
43
+ val context = reactApplicationContext.currentActivity ?: reactApplicationContext
44
44
 
45
45
  // serverUrl이 빈 문자열이면 기본값 사용 (iOS와 동일한 처리)
46
46
  if (serverUrl.isEmpty()) {
@@ -233,7 +233,7 @@ class AdStageModule(reactContext: ReactApplicationContext) :
233
233
 
234
234
  @ReactMethod
235
235
  fun handleIntent() {
236
- currentActivity?.let { activity ->
236
+ reactApplicationContext.currentActivity?.let { activity ->
237
237
  AdStage.handleIntent(activity, activity.intent)
238
238
  }
239
239
  }
@@ -285,7 +285,7 @@ class AdStageModule(reactContext: ReactApplicationContext) :
285
285
  fun handlePromotionClick(promotionMap: ReadableMap, promise: Promise) {
286
286
  scope.launch {
287
287
  try {
288
- val context = currentActivity ?: reactApplicationContext
288
+ val context = reactApplicationContext.currentActivity ?: reactApplicationContext
289
289
 
290
290
  // ReadableMap에서 Promotion 객체 복원
291
291
  val promotion = mapToPromotion(promotionMap)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adstage/react-native-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AdStage SDK for React Native - 광고 어트리뷰션, 딥링크, 인앱 이벤트 트래킹",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",