@tyrads.com/tyrads-sdk 1.1.15 → 2.0.0-beta.1

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 (158) hide show
  1. package/android/build.gradle +18 -2
  2. package/android/src/main/java/com/tyradssdk/TyradsSdkComposeViewManager.kt +112 -0
  3. package/android/src/main/java/com/tyradssdk/TyradsSdkModule.kt +21 -9
  4. package/android/src/main/java/com/tyradssdk/TyradsSdkPackage.kt +2 -1
  5. package/ios/Tyrads/Tyrads.swift +43 -18
  6. package/ios/TyradsSdk.mm +3 -1
  7. package/ios/TyradsSdk.swift +5 -4
  8. package/lib/commonjs/acmo/core/marquee.js +60 -0
  9. package/lib/commonjs/acmo/core/marquee.js.map +1 -0
  10. package/lib/commonjs/acmo/core/storage/storage.js +36 -0
  11. package/lib/commonjs/acmo/core/storage/storage.js.map +1 -0
  12. package/lib/commonjs/acmo/core/types/types.d.js +2 -0
  13. package/lib/commonjs/acmo/core/types/types.d.js.map +1 -0
  14. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js +87 -0
  15. package/lib/commonjs/acmo/modules/dashboard/components/auto_scroller.js.map +1 -0
  16. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js +41 -0
  17. package/lib/commonjs/acmo/modules/dashboard/components/custom_card.js.map +1 -0
  18. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js +50 -0
  19. package/lib/commonjs/acmo/modules/dashboard/components/my_games_button.js.map +1 -0
  20. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js +163 -0
  21. package/lib/commonjs/acmo/modules/dashboard/components/offer_info_section.js.map +1 -0
  22. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js +103 -0
  23. package/lib/commonjs/acmo/modules/dashboard/components/premium_header.js.map +1 -0
  24. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js +186 -0
  25. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_1.js.map +1 -0
  26. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js +104 -0
  27. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_2.js.map +1 -0
  28. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js +43 -0
  29. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_3.js.map +1 -0
  30. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js +215 -0
  31. package/lib/commonjs/acmo/modules/dashboard/components/premium_option_4.js.map +1 -0
  32. package/lib/commonjs/acmo/modules/dashboard/repository.js +71 -0
  33. package/lib/commonjs/acmo/modules/dashboard/repository.js.map +1 -0
  34. package/lib/commonjs/acmo/modules/dashboard/top_offers.js +137 -0
  35. package/lib/commonjs/acmo/modules/dashboard/top_offers.js.map +1 -0
  36. package/lib/commonjs/assets/images/premium_star.png +0 -0
  37. package/lib/commonjs/assets/images/right_arrow.png +0 -0
  38. package/lib/commonjs/assets/images/star_pointed.png +0 -0
  39. package/lib/commonjs/i18n.js +112 -0
  40. package/lib/commonjs/i18n.js.map +1 -0
  41. package/lib/commonjs/index.js +58 -1
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/module/acmo/core/marquee.js +54 -0
  44. package/lib/module/acmo/core/marquee.js.map +1 -0
  45. package/lib/module/acmo/core/storage/storage.js +29 -0
  46. package/lib/module/acmo/core/storage/storage.js.map +1 -0
  47. package/lib/module/acmo/core/types/types.d.js +2 -0
  48. package/lib/module/acmo/core/types/types.d.js.map +1 -0
  49. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js +81 -0
  50. package/lib/module/acmo/modules/dashboard/components/auto_scroller.js.map +1 -0
  51. package/lib/module/acmo/modules/dashboard/components/custom_card.js +36 -0
  52. package/lib/module/acmo/modules/dashboard/components/custom_card.js.map +1 -0
  53. package/lib/module/acmo/modules/dashboard/components/my_games_button.js +45 -0
  54. package/lib/module/acmo/modules/dashboard/components/my_games_button.js.map +1 -0
  55. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js +158 -0
  56. package/lib/module/acmo/modules/dashboard/components/offer_info_section.js.map +1 -0
  57. package/lib/module/acmo/modules/dashboard/components/premium_header.js +98 -0
  58. package/lib/module/acmo/modules/dashboard/components/premium_header.js.map +1 -0
  59. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js +181 -0
  60. package/lib/module/acmo/modules/dashboard/components/premium_option_1.js.map +1 -0
  61. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js +99 -0
  62. package/lib/module/acmo/modules/dashboard/components/premium_option_2.js.map +1 -0
  63. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js +38 -0
  64. package/lib/module/acmo/modules/dashboard/components/premium_option_3.js.map +1 -0
  65. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js +210 -0
  66. package/lib/module/acmo/modules/dashboard/components/premium_option_4.js.map +1 -0
  67. package/lib/module/acmo/modules/dashboard/repository.js +65 -0
  68. package/lib/module/acmo/modules/dashboard/repository.js.map +1 -0
  69. package/lib/module/acmo/modules/dashboard/top_offers.js +130 -0
  70. package/lib/module/acmo/modules/dashboard/top_offers.js.map +1 -0
  71. package/lib/module/assets/images/premium_star.png +0 -0
  72. package/lib/module/assets/images/right_arrow.png +0 -0
  73. package/lib/module/assets/images/star_pointed.png +0 -0
  74. package/lib/module/i18n.js +107 -0
  75. package/lib/module/i18n.js.map +1 -0
  76. package/lib/module/index.js +59 -2
  77. package/lib/module/index.js.map +1 -1
  78. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts +11 -0
  79. package/lib/typescript/commonjs/src/acmo/core/marquee.d.ts.map +1 -0
  80. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts +3 -0
  81. package/lib/typescript/commonjs/src/acmo/core/storage/storage.d.ts.map +1 -0
  82. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts +10 -0
  83. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +1 -0
  84. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts +9 -0
  85. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -0
  86. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts +7 -0
  87. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -0
  88. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts +10 -0
  89. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -0
  90. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts +8 -0
  91. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -0
  92. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts +8 -0
  93. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -0
  94. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts +8 -0
  95. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -0
  96. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts +8 -0
  97. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -0
  98. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts +8 -0
  99. package/lib/typescript/commonjs/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -0
  100. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts +2 -0
  101. package/lib/typescript/commonjs/src/acmo/modules/dashboard/repository.d.ts.map +1 -0
  102. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts +10 -0
  103. package/lib/typescript/commonjs/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -0
  104. package/lib/typescript/commonjs/src/i18n.d.ts +3 -0
  105. package/lib/typescript/commonjs/src/i18n.d.ts.map +1 -0
  106. package/lib/typescript/commonjs/src/index.d.ts +15 -1
  107. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  108. package/lib/typescript/module/src/acmo/core/marquee.d.ts +11 -0
  109. package/lib/typescript/module/src/acmo/core/marquee.d.ts.map +1 -0
  110. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts +3 -0
  111. package/lib/typescript/module/src/acmo/core/storage/storage.d.ts.map +1 -0
  112. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts +10 -0
  113. package/lib/typescript/module/src/acmo/modules/dashboard/components/auto_scroller.d.ts.map +1 -0
  114. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts +9 -0
  115. package/lib/typescript/module/src/acmo/modules/dashboard/components/custom_card.d.ts.map +1 -0
  116. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts +7 -0
  117. package/lib/typescript/module/src/acmo/modules/dashboard/components/my_games_button.d.ts.map +1 -0
  118. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts +10 -0
  119. package/lib/typescript/module/src/acmo/modules/dashboard/components/offer_info_section.d.ts.map +1 -0
  120. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts +8 -0
  121. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_header.d.ts.map +1 -0
  122. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts +8 -0
  123. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_1.d.ts.map +1 -0
  124. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts +8 -0
  125. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_2.d.ts.map +1 -0
  126. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts +8 -0
  127. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_3.d.ts.map +1 -0
  128. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts +8 -0
  129. package/lib/typescript/module/src/acmo/modules/dashboard/components/premium_option_4.d.ts.map +1 -0
  130. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts +2 -0
  131. package/lib/typescript/module/src/acmo/modules/dashboard/repository.d.ts.map +1 -0
  132. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts +10 -0
  133. package/lib/typescript/module/src/acmo/modules/dashboard/top_offers.d.ts.map +1 -0
  134. package/lib/typescript/module/src/i18n.d.ts +3 -0
  135. package/lib/typescript/module/src/i18n.d.ts.map +1 -0
  136. package/lib/typescript/module/src/index.d.ts +15 -1
  137. package/lib/typescript/module/src/index.d.ts.map +1 -1
  138. package/package.json +12 -1
  139. package/readme.md +71 -0
  140. package/src/acmo/core/marquee.tsx +62 -0
  141. package/src/acmo/core/storage/storage.ts +28 -0
  142. package/src/acmo/core/types/types.d.ts +94 -0
  143. package/src/acmo/modules/dashboard/components/auto_scroller.tsx +85 -0
  144. package/src/acmo/modules/dashboard/components/custom_card.tsx +31 -0
  145. package/src/acmo/modules/dashboard/components/my_games_button.tsx +40 -0
  146. package/src/acmo/modules/dashboard/components/offer_info_section.tsx +144 -0
  147. package/src/acmo/modules/dashboard/components/premium_header.tsx +81 -0
  148. package/src/acmo/modules/dashboard/components/premium_option_1.tsx +161 -0
  149. package/src/acmo/modules/dashboard/components/premium_option_2.tsx +104 -0
  150. package/src/acmo/modules/dashboard/components/premium_option_3.tsx +46 -0
  151. package/src/acmo/modules/dashboard/components/premium_option_4.tsx +184 -0
  152. package/src/acmo/modules/dashboard/repository.ts +95 -0
  153. package/src/acmo/modules/dashboard/top_offers.tsx +131 -0
  154. package/src/assets/images/premium_star.png +0 -0
  155. package/src/assets/images/right_arrow.png +0 -0
  156. package/src/assets/images/star_pointed.png +0 -0
  157. package/src/i18n.ts +115 -0
  158. package/src/index.tsx +64 -2
@@ -80,6 +80,14 @@ android {
80
80
  sourceCompatibility JavaVersion.VERSION_1_8
81
81
  targetCompatibility JavaVersion.VERSION_1_8
82
82
  }
83
+
84
+ buildFeatures {
85
+ compose true
86
+ }
87
+
88
+ composeOptions {
89
+ kotlinCompilerExtensionVersion '1.5.10'
90
+ }
83
91
  }
84
92
 
85
93
  repositories {
@@ -93,9 +101,17 @@ dependencies {
93
101
  // For < 0.71, this will be from the local maven repo
94
102
  // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
95
103
  //noinspection GradleDynamicVersion
96
- implementation "com.facebook.react:react-native:+"
97
104
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
98
- implementation ("com.github.tyrads-com:tyrads-sdk-android:rnp-1.1.5")
99
105
 
106
+ implementation "androidx.activity:activity-compose:1.7.0"
107
+ implementation "androidx.compose.ui:ui:1.5.0"
108
+ implementation "androidx.compose.material:material:1.5.10"
109
+ implementation "androidx.compose.ui:ui-tooling-preview:1.5.10"
110
+ implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
111
+
112
+ implementation "com.facebook.react:react-native:+"
113
+ implementation 'com.google.code.gson:gson:2.10.1'
114
+
115
+ implementation 'com.github.tyrads-com:tyrads-sdk-android:fd619c7f0c'
100
116
  }
101
117
 
@@ -0,0 +1,112 @@
1
+ package com.tyradssdk
2
+
3
+ import android.content.Context
4
+ import androidx.compose.runtime.Composable
5
+ import androidx.compose.ui.platform.ComposeView
6
+ import com.facebook.react.bridge.ReactContext
7
+ import com.facebook.react.uimanager.SimpleViewManager
8
+ import com.facebook.react.uimanager.ThemedReactContext
9
+ import com.facebook.react.uimanager.annotations.ReactProp
10
+ import com.tyrads.sdk.Tyrads
11
+ import android.util.Log
12
+ import androidx.compose.foundation.background
13
+ import androidx.compose.foundation.layout.Box
14
+ import androidx.compose.foundation.layout.fillMaxSize
15
+ import androidx.compose.material.Text
16
+ import androidx.compose.ui.Alignment
17
+ import androidx.compose.ui.Modifier
18
+ import androidx.compose.ui.graphics.Color
19
+ import androidx.compose.runtime.LaunchedEffect
20
+ import android.os.Handler
21
+ import android.os.Looper
22
+
23
+ class ComposeViewManager : SimpleViewManager<ComposeView>() {
24
+ override fun getName(): String {
25
+ return "TyradsSdkComposeView"
26
+ }
27
+
28
+ override fun createViewInstance(reactContext: ThemedReactContext): ComposeView {
29
+ Log.d("bmd", "ComposeView created")
30
+
31
+ val composeView = ComposeView(reactContext)
32
+
33
+ Handler(Looper.getMainLooper()).post {
34
+ Log.d("bmd", "Running setContent inside createViewInstance")
35
+
36
+ composeView.setContent {
37
+ Box(
38
+ modifier = Modifier
39
+ .fillMaxSize()
40
+ .background(Color.Yellow),
41
+ contentAlignment = Alignment.Center
42
+ ) {
43
+ Text("Test Compose", color = Color.Black)
44
+ }
45
+ }
46
+ }
47
+
48
+ return composeView
49
+ }
50
+
51
+ @ReactProp(name = "showMore")
52
+ fun setShowMore(view: ComposeView, showMore: Boolean) {
53
+ view.post {
54
+ view.setContent {
55
+ TopPremiumOffersComposable(showMore = showMore)
56
+ }
57
+ }
58
+ }
59
+
60
+ @ReactProp(name = "showMyOffers")
61
+ fun setShowMyOffers(view: ComposeView, showMyOffers: Boolean) {
62
+ view.post{
63
+ view.setContent {
64
+ TopPremiumOffersComposable(showMyOffers = showMyOffers)
65
+ }
66
+ }
67
+ }
68
+
69
+ @ReactProp(name = "showMyOffersEmptyView")
70
+ fun setShowMyOffersEmptyView(view: ComposeView, showMyOffersEmptyView: Boolean) {
71
+ view.post{
72
+ view.setContent {
73
+ TopPremiumOffersComposable(showMyOffersEmptyView = showMyOffersEmptyView)
74
+ }
75
+ }
76
+ }
77
+
78
+ @ReactProp(name = "viewStyle")
79
+ fun setViewStyle(view: ComposeView, viewStyle: Int) {
80
+ view.post{
81
+ view.setContent {
82
+ TopPremiumOffersComposable(style = viewStyle)
83
+ }
84
+ }
85
+ }
86
+
87
+ @Composable
88
+ private fun TopPremiumOffersComposable(
89
+ showMore: Boolean = true,
90
+ showMyOffers: Boolean = true,
91
+ showMyOffersEmptyView: Boolean = false,
92
+ style: Int = 2
93
+ ) {
94
+ LaunchedEffect(Unit){
95
+ Log.d("bmd", "TopPremiumOffersComposable called")
96
+ }
97
+ Box(
98
+ modifier = Modifier
99
+ .fillMaxSize()
100
+ .background(Color.Yellow),
101
+ contentAlignment = Alignment.Center
102
+ ) {
103
+ Text("Test Compose", color = Color.Black)
104
+ }
105
+ // Tyrads.getInstance().TopPremiumOffers(
106
+ // showMore = showMore,
107
+ // showMyOffers = showMyOffers,
108
+ // showMyOffersEmptyView = showMyOffersEmptyView,
109
+ // style = style
110
+ // )
111
+ }
112
+ }
@@ -4,6 +4,11 @@ import com.facebook.react.bridge.ReactApplicationContext
4
4
  import com.facebook.react.bridge.ReactContextBaseJavaModule
5
5
  import com.facebook.react.bridge.ReactMethod
6
6
  import com.facebook.react.bridge.Promise
7
+ import kotlinx.coroutines.CoroutineScope
8
+ import kotlinx.coroutines.Dispatchers
9
+ import kotlinx.coroutines.launch
10
+ import com.google.gson.Gson
11
+ import android.util.Log
7
12
  import com.tyrads.sdk.Tyrads
8
13
 
9
14
  class TyradsSdkModule(reactContext: ReactApplicationContext) :
@@ -22,20 +27,27 @@ class TyradsSdkModule(reactContext: ReactApplicationContext) :
22
27
  promise.reject("INIT_ERROR", e.message)
23
28
  }
24
29
  }
25
-
30
+
26
31
  @ReactMethod
27
32
  fun loginUser(userId: String, promise: Promise) {
28
- try {
29
- Tyrads.getInstance().loginUser(userId)
30
- promise.resolve(null)
31
- } catch (e: Exception) {
32
- promise.reject("LOGIN_ERROR", e.message)
33
+ Tyrads.getInstance().tyradScope.launch {
34
+ try {
35
+ val apiHeaders = Tyrads.getInstance().loginUser(userId)
36
+ Log.i("bmd", "apiHeaders: $apiHeaders")
37
+ if (apiHeaders != null) {
38
+ val jsonString = Gson().toJson(apiHeaders)
39
+ promise.resolve(jsonString)
40
+ } else {
41
+ promise.resolve(null)
42
+ }
43
+ } catch (e: Exception) {
44
+ promise.reject("LOGIN_ERROR", e.message)
45
+ }
33
46
  }
34
47
  }
35
-
36
48
  @ReactMethod
37
- fun showOffers() {
38
- Tyrads.getInstance().showOffers()
49
+ fun showOffers(route: String? = null, campaignID: Int? = null) {
50
+ Tyrads.getInstance().showOffers(route = route, campaignID = campaignID)
39
51
  }
40
52
 
41
53
  companion object {
@@ -7,11 +7,12 @@ import com.facebook.react.uimanager.ViewManager
7
7
 
8
8
 
9
9
  class TyradsSdkPackage : ReactPackage {
10
+
10
11
  override fun createNativeModules(reactContext: ReactApplicationContext): List<NativeModule> {
11
12
  return listOf(TyradsSdkModule(reactContext))
12
13
  }
13
14
 
14
15
  override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
15
- return emptyList()
16
+ return listOf(ComposeViewManager())
16
17
  }
17
18
  }
@@ -2,6 +2,7 @@ import Foundation
2
2
  import UIKit
3
3
  import AppTrackingTransparency
4
4
  import AdSupport
5
+ import WebKit
5
6
 
6
7
 
7
8
 
@@ -41,7 +42,7 @@ public class Tyrads {
41
42
  @objc public func loginUser(_ userID: String? = nil) {
42
43
  do {
43
44
  let userId = userID ?? UserDefaults.standard.string(forKey: "acmo-tyrads-sdk-user-id") ?? ""
44
-
45
+
45
46
  let identifierType = "IDFA"
46
47
  var advertisingId = ""
47
48
  if #available(iOS 14, *) {
@@ -74,14 +75,14 @@ public class Tyrads {
74
75
  "identifierType": identifierType,
75
76
  "identifier": advertisingId
76
77
  ]
77
-
78
+
78
79
  log("Initializing with data: \(fd)")
79
-
80
+
80
81
  guard let url = URL(string: AcmoConfig.BASE_URL + "initialize") else {
81
82
  log("Failed to create URL")
82
83
  return
83
84
  }
84
-
85
+
85
86
  var request = URLRequest(url: url)
86
87
  request.httpMethod = "POST"
87
88
  request.setValue(AcmoConfig.SDK_PLATFORM, forHTTPHeaderField: "X-SDK-Platform")
@@ -89,29 +90,29 @@ public class Tyrads {
89
90
  request.setValue("application/json", forHTTPHeaderField: "Content-Type")
90
91
  request.setValue(self.apiKey, forHTTPHeaderField: "X-API-Key")
91
92
  request.setValue(self.apiSecret, forHTTPHeaderField: "X-API-Secret")
92
-
93
+
93
94
  do {
94
95
  request.httpBody = try JSONSerialization.data(withJSONObject: fd)
95
96
  } catch {
96
97
  log("Failed to serialize request body: \(error)")
97
98
  return
98
99
  }
99
-
100
+
100
101
  let task = URLSession.shared.dataTask(with: request) { data, response, error in
101
-
102
+
102
103
  if let error = error {
103
104
  self.log("Network request failed: \(error)")
104
105
  return
105
106
  }
106
-
107
+
107
108
  guard let data = data else {
108
109
  self.log("No data received from the server")
109
110
  return
110
111
  }
111
-
112
+
112
113
  if let responseString = String(data: data, encoding: .utf8) {
113
114
  self.log("Received response: \(responseString)")
114
-
115
+
115
116
  let jsonData = responseString.data(using: .utf8)!
116
117
  let decoder = JSONDecoder()
117
118
  guard let acmoInitModel = try? decoder.decode(AcmoInitModel.self, from: jsonData) else {
@@ -124,14 +125,14 @@ public class Tyrads {
124
125
  self.log("Login successful. Publisher User ID: \(self.publisherUserID), New User: \(self.newUser)")
125
126
  self.initializationWait.signal()
126
127
  }
127
-
128
-
128
+
129
+
129
130
  }
130
-
131
+
131
132
  task.resume()
132
133
  log("Network request started")
133
134
 
134
-
135
+
135
136
  } catch {
136
137
  log("An error occurred: \(error)")
137
138
  }
@@ -139,13 +140,37 @@ public class Tyrads {
139
140
 
140
141
 
141
142
 
142
- /// Shows the Tyrads offer wall.
143
- @objc public func showOffers() {
143
+
144
+ public func showOffers(_ launchMode: Int = 3, route: String? = nil, campaignID: Int? = nil) {
144
145
  self.initializationWait.wait()
145
- let urlString: String = "https://websdk.tyrads.com/?apiKey=\(Tyrads.instance.apiKey)&apiSecret=\(Tyrads.instance.apiSecret)&userID=\(Tyrads.instance.publisherUserID)&newUser=\(Tyrads.instance.newUser)&platform=\(AcmoConfig.SDK_PLATFORM)&hc=\(Tyrads.instance.loginData?.data.publisherApp.headerColor ?? "")&mc=\(Tyrads.instance.loginData?.data.publisherApp.mainColor ?? "")";
146
+ var urlString =
147
+ "https://websdk.tyrads.com/?apiKey=\(Tyrads.instance.apiKey)&apiSecret=\(Tyrads.instance.apiSecret)&userID=\(Tyrads.instance.publisherUserID)&newUser=\(Tyrads.instance.newUser)&platform=\(AcmoConfig.SDK_PLATFORM)&hc=\(Tyrads.instance.loginData?.data.publisherApp.headerColor ?? "")&mc=\(Tyrads.instance.loginData?.data.publisherApp.mainColor ?? "")&launchMode=\(launchMode)&route=\(route ?? "")&campaignID=\(campaignID)"
148
+
146
149
 
147
150
  if let url = URL(string: urlString) {
148
- UIApplication.shared.open(url, options: [:], completionHandler: { _ in })
151
+ switch launchMode {
152
+ case 1, 2:
153
+ DispatchQueue.main.async {
154
+ let webView = WKWebView(frame: UIScreen.main.bounds)
155
+ webView.load(URLRequest(url: url))
156
+
157
+ let viewController = UIViewController()
158
+ viewController.view = webView
159
+ viewController.modalPresentationStyle = .fullScreen // Add this line to set the presentation style
160
+
161
+ if let rootViewController = UIApplication.shared.windows.first?.rootViewController {
162
+ rootViewController.present(viewController, animated: true, completion: nil)
163
+ }
164
+ }
165
+ case 3:
166
+ DispatchQueue.main.async {
167
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
168
+ }
169
+ default:
170
+ DispatchQueue.main.async {
171
+ UIApplication.shared.open(url, options: [:], completionHandler: nil)
172
+ }
173
+ }
149
174
  }
150
175
  }
151
176
  }
package/ios/TyradsSdk.mm CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  RCT_EXTERN_METHOD(init:(NSString *)apiKey secretKey:(NSString *)secretKey)
6
6
  RCT_EXTERN_METHOD(loginUser:(NSString *)userId)
7
- RCT_EXTERN_METHOD(showOffers)
7
+ RCT_EXTERN_METHOD(showOffers:(NSInteger)launchMode
8
+ route:(NSString)route
9
+ campaignID:(NSInteger)campaignID)
8
10
 
9
11
  @end
@@ -18,9 +18,10 @@ class TyradsSdk: NSObject {
18
18
  // Implement your login logic here
19
19
  }
20
20
 
21
- @objc
22
- func showOffers() {
21
+
22
+ @objc func showOffers(_ launchMode: Int = 3, route: String? = nil, campaignID: Int = 0) {
23
23
  NSLog("TyradsModule: showOffers called")
24
- Tyrads.instance.showOffers()
25
- }
24
+ Tyrads.instance.showOffers(launchMode, route: route, campaignID: campaignID == 0 ? nil : campaignID )
25
+ }
26
+
26
27
  }
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ const MarqueeText = ({
13
+ text,
14
+ speed = 15,
15
+ repeat = 100,
16
+ style
17
+ }) => {
18
+ const translateX = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
19
+ (0, _react.useEffect)(() => {
20
+ const textWidth = text.length * 4;
21
+ const screenWidth = _reactNative.Dimensions.get('window').width;
22
+ const animation = _reactNative.Animated.loop(_reactNative.Animated.sequence([_reactNative.Animated.timing(translateX, {
23
+ toValue: -textWidth,
24
+ duration: (textWidth + screenWidth) * speed,
25
+ useNativeDriver: true
26
+ }), _reactNative.Animated.timing(translateX, {
27
+ toValue: screenWidth,
28
+ duration: 0,
29
+ useNativeDriver: true
30
+ })]), {
31
+ iterations: repeat
32
+ });
33
+ animation.start();
34
+ return () => animation.stop();
35
+ }, [text, speed, repeat, translateX]);
36
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
37
+ style: styles.container,
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.Text, {
39
+ numberOfLines: 1,
40
+ style: [styles.text, style, {
41
+ transform: [{
42
+ translateX
43
+ }]
44
+ }],
45
+ children: text
46
+ })
47
+ });
48
+ };
49
+ const styles = _reactNative.StyleSheet.create({
50
+ container: {
51
+ overflow: 'hidden',
52
+ width: '100%'
53
+ },
54
+ text: {
55
+ fontSize: 16,
56
+ fontWeight: 'bold'
57
+ }
58
+ });
59
+ var _default = exports.default = MarqueeText;
60
+ //# sourceMappingURL=marquee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MarqueeText","text","speed","repeat","style","translateX","useRef","Animated","Value","current","useEffect","textWidth","length","screenWidth","Dimensions","width","animation","loop","sequence","timing","toValue","duration","useNativeDriver","iterations","start","stop","jsx","View","styles","container","children","Text","numberOfLines","transform","StyleSheet","create","overflow","fontSize","fontWeight","_default","exports"],"sourceRoot":"..\\..\\..\\..\\src","sources":["acmo/core/marquee.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAsF,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAA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;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtD,OAAA,GAEYc,WAAW","ignoreList":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.saveData = exports.getData = void 0;
7
+ var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ const saveData = async (key, object) => {
10
+ try {
11
+ const jsonValue = JSON.stringify(object);
12
+ await _asyncStorage.default.setItem(key, jsonValue);
13
+ } catch (e) {
14
+ if (e instanceof Error) {
15
+ console.error('Error saving object:', e.message);
16
+ } else {
17
+ console.error('An unknown error occurred while saving.');
18
+ }
19
+ }
20
+ };
21
+ exports.saveData = saveData;
22
+ const getData = async key => {
23
+ try {
24
+ const jsonValue = await _asyncStorage.default.getItem(key);
25
+ return jsonValue != null ? JSON.parse(jsonValue) : null;
26
+ } catch (e) {
27
+ if (e instanceof Error) {
28
+ console.error('Error getting object:', e.message);
29
+ } else {
30
+ console.error('An unknown error occurred while getting.');
31
+ }
32
+ return null;
33
+ }
34
+ };
35
+ exports.getData = getData;
36
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_asyncStorage","_interopRequireDefault","require","e","__esModule","default","saveData","key","object","jsonValue","JSON","stringify","AsyncStorage","setItem","Error","console","error","message","exports","getData","getItem","parse"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["acmo/core/storage/storage.ts"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAqE,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9D,MAAMG,QAAQ,GAAG,MAAAA,CAAOC,GAAW,EAAEC,MAAW,KAAoB;EACzE,IAAI;IACF,MAAMC,SAAiB,GAAGC,IAAI,CAACC,SAAS,CAACH,MAAM,CAAC;IAChD,MAAMI,qBAAY,CAACC,OAAO,CAACN,GAAG,EAAEE,SAAS,CAAC;EAC5C,CAAC,CAAC,OAAON,CAAM,EAAE;IACf,IAAIA,CAAC,YAAYW,KAAK,EAAE;MACtBC,OAAO,CAACC,KAAK,CAAC,sBAAsB,EAAEb,CAAC,CAACc,OAAO,CAAC;IAClD,CAAC,MAAM;MACLF,OAAO,CAACC,KAAK,CAAC,yCAAyC,CAAC;IAC1D;EACF;AACF,CAAC;AAACE,OAAA,CAAAZ,QAAA,GAAAA,QAAA;AAEK,MAAMa,OAAO,GAAG,MAAUZ,GAAW,IAAwB;EAClE,IAAI;IACF,MAAME,SAAwB,GAAG,MAAMG,qBAAY,CAACQ,OAAO,CAACb,GAAG,CAAC;IAChE,OAAOE,SAAS,IAAI,IAAI,GAAGC,IAAI,CAACW,KAAK,CAACZ,SAAS,CAAC,GAAQ,IAAI;EAC9D,CAAC,CAAC,OAAON,CAAM,EAAE;IACf,IAAIA,CAAC,YAAYW,KAAK,EAAE;MACtBC,OAAO,CAACC,KAAK,CAAC,uBAAuB,EAAEb,CAAC,CAACc,OAAO,CAAC;IACnD,CAAC,MAAM;MACLF,OAAO,CAACC,KAAK,CAAC,0CAA0C,CAAC;IAC3D;IACA,OAAO,IAAI;EACb;AACF,CAAC;AAACE,OAAA,CAAAC,OAAA,GAAAA,OAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["acmo/core/types/types.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ const {
13
+ width
14
+ } = _reactNative.Dimensions.get('window');
15
+ const AutoScrollPagerWithIndicators = ({
16
+ totalPages,
17
+ delayInMillis = 5000,
18
+ premiumColor,
19
+ content
20
+ }) => {
21
+ const [currentPage, setCurrentPage] = (0, _react.useState)(0);
22
+ const scrollViewRef = (0, _react.useRef)(null);
23
+ (0, _react.useEffect)(() => {
24
+ const intervalId = setInterval(() => {
25
+ const nextBanner = (currentPage + 1) % totalPages;
26
+ setCurrentPage(nextBanner);
27
+ scrollViewRef.current?.scrollTo({
28
+ x: nextBanner * width,
29
+ animated: true
30
+ });
31
+ }, delayInMillis);
32
+ return () => clearInterval(intervalId);
33
+ }, [currentPage, totalPages, delayInMillis]);
34
+ (0, _react.useEffect)(() => {
35
+ scrollViewRef.current?.scrollTo({
36
+ x: currentPage * width,
37
+ animated: false
38
+ });
39
+ }, [currentPage]);
40
+ const renderIndicators = () => {
41
+ const indicators = [];
42
+ for (let i = 0; i < totalPages; i++) {
43
+ indicators.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
44
+ style: [styles.indicator, {
45
+ backgroundColor: currentPage === i ? premiumColor || '#1C90DF' : 'lightgray'
46
+ }]
47
+ }, i));
48
+ }
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
50
+ style: styles.indicatorContainer,
51
+ children: indicators
52
+ });
53
+ };
54
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
55
+ style: styles.container,
56
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
57
+ ref: scrollViewRef,
58
+ horizontal: true,
59
+ pagingEnabled: true,
60
+ showsHorizontalScrollIndicator: true,
61
+ scrollEnabled: false,
62
+ contentContainerStyle: {
63
+ width: totalPages * width
64
+ },
65
+ children: Array.from({
66
+ length: totalPages
67
+ }, (_, i) => content(i))
68
+ }), renderIndicators()]
69
+ });
70
+ };
71
+ const styles = _reactNative.StyleSheet.create({
72
+ container: {
73
+ alignItems: 'center'
74
+ },
75
+ indicatorContainer: {
76
+ flexDirection: 'row',
77
+ marginTop: 10
78
+ },
79
+ indicator: {
80
+ width: 8,
81
+ height: 8,
82
+ borderRadius: 4,
83
+ marginHorizontal: 2
84
+ }
85
+ });
86
+ var _default = exports.default = AutoScrollPagerWithIndicators;
87
+ //# sourceMappingURL=auto_scroller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","width","Dimensions","AutoScrollPagerWithIndicators","totalPages","delayInMillis","premiumColor","content","currentPage","setCurrentPage","useState","scrollViewRef","useRef","useEffect","intervalId","setInterval","nextBanner","current","scrollTo","x","animated","clearInterval","renderIndicators","indicators","push","jsx","View","style","styles","indicator","backgroundColor","indicatorContainer","children","jsxs","container","ScrollView","ref","horizontal","pagingEnabled","showsHorizontalScrollIndicator","scrollEnabled","contentContainerStyle","Array","from","length","_","StyleSheet","create","alignItems","flexDirection","marginTop","height","borderRadius","marginHorizontal","_default","exports"],"sourceRoot":"..\\..\\..\\..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C;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,GAEYgB,6BAA6B","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ const CustomCard = ({
12
+ children,
13
+ style
14
+ }) => {
15
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
16
+ style: [styles.card, style],
17
+ children: children
18
+ });
19
+ };
20
+ const styles = _reactNative.StyleSheet.create({
21
+ card: {
22
+ backgroundColor: 'white',
23
+ borderTopLeftRadius: 20,
24
+ borderTopRightRadius: 20,
25
+ borderBottomLeftRadius: 14,
26
+ borderBottomRightRadius: 14,
27
+ paddingTop: 6,
28
+ paddingBottom: 5,
29
+ shadowColor: '#000',
30
+ shadowOffset: {
31
+ width: 4,
32
+ height: 4
33
+ },
34
+ shadowOpacity: 0.2,
35
+ shadowRadius: 4,
36
+ elevation: 4,
37
+ alignSelf: 'center'
38
+ }
39
+ });
40
+ var _default = exports.default = CustomCard;
41
+ //# sourceMappingURL=custom_card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","CustomCard","children","style","jsx","View","styles","card","StyleSheet","create","backgroundColor","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","paddingTop","paddingBottom","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","alignSelf","_default","exports"],"sourceRoot":"..\\..\\..\\..\\..\\..\\src","sources":["acmo/modules/dashboard/components/custom_card.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAAgE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOhE,MAAMG,UAAqC,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAM,CAAC,KAAK;EACrE,oBAAO,IAAAN,WAAA,CAAAO,GAAA,EAACR,YAAA,CAAAS,IAAI;IAACF,KAAK,EAAE,CAACG,MAAM,CAACC,IAAI,EAAEJ,KAAK,CAAE;IAAAD,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAC7D,CAAC;AAED,MAAMI,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,eAAe,EAAE,OAAO;IACxBC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,sBAAsB,EAAE,EAAE;IAC1BC,uBAAuB,EAAE,EAAE;IAC3BC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChBC,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1B,OAAA,GAEYC,UAAU","ignoreList":[]}