tapjoy-react-native-sdk 14.2.1 → 14.3.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.
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeViewManager.kt +1 -1
- package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkModule.kt +22 -1
- package/example/Gemfile +2 -1
- package/example/android/app/build.gradle +1 -1
- package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt +2 -1
- package/example/android/build.gradle +4 -4
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +1 -1
- package/example/android/gradlew +4 -1
- package/example/android/gradlew.bat +2 -0
- package/example/package-lock.json +8605 -0
- package/example/package.json +9 -5
- package/example/src/MainScreen.tsx +33 -27
- package/example/src/OfferwallScreen.tsx +67 -4
- package/example/src/Styles.ts +13 -5
- package/example/src/UserProperties.tsx +13 -1
- package/ios/TapjoyReactNativeSdk.swift +1 -3
- package/lib/commonjs/TJConnect.js +5 -0
- package/lib/commonjs/TJEntryPoint.js +14 -0
- package/lib/commonjs/TJOfferwallDiscoverView.js +25 -0
- package/lib/commonjs/TJPlacement.js +156 -0
- package/lib/commonjs/TJPrivacyPolicy.js +74 -0
- package/lib/commonjs/TJPurchase.js +8 -0
- package/lib/commonjs/TJSegment.js +8 -0
- package/lib/commonjs/TJStatus.js +7 -0
- package/lib/commonjs/TJUtil.js +14 -0
- package/lib/commonjs/TJVersion.js +14 -0
- package/lib/commonjs/Tapjoy.js +212 -0
- package/lib/commonjs/TapjoyEvent.js +1 -0
- package/lib/commonjs/index.js +10 -0
- package/lib/typescript/TJConnect.d.ts +4 -0
- package/lib/typescript/TJEntryPoint.d.ts +13 -0
- package/lib/typescript/TJOfferwallDiscoverView.d.ts +17 -0
- package/lib/typescript/TJPlacement.d.ts +96 -0
- package/lib/typescript/TJPrivacyPolicy.d.ts +14 -0
- package/lib/typescript/TJPurchase.d.ts +4 -0
- package/lib/typescript/TJSegment.d.ts +7 -0
- package/lib/typescript/TJStatus.d.ts +6 -0
- package/lib/typescript/TJUtil.d.ts +4 -0
- package/lib/typescript/TJVersion.d.ts +4 -0
- package/lib/typescript/Tapjoy.d.ts +148 -0
- package/lib/typescript/TapjoyEvent.d.ts +5 -0
- package/lib/typescript/index.d.ts +10 -0
- package/package.json +5 -4
- package/src/TJOfferwallDiscoverView.tsx +3 -2
- package/src/TJPlacement.ts +25 -3
- package/src/TJPrivacyPolicy.ts +9 -0
- package/src/TJVersion.ts +1 -1
- package/src/Tapjoy.ts +240 -0
- package/src/TapjoyEvent.ts +5 -0
- package/src/index.ts +1 -19
- package/tapjoy-react-native-sdk.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -69,7 +69,7 @@ repositories {
|
|
|
69
69
|
google()
|
|
70
70
|
maven {
|
|
71
71
|
name "Tapjoy's maven repo"
|
|
72
|
-
url "https://sdk.tapjoy.com
|
|
72
|
+
url "https://sdk.tapjoy.com"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -81,7 +81,7 @@ dependencies {
|
|
|
81
81
|
//noinspection GradleDynamicVersion
|
|
82
82
|
implementation 'com.facebook.react:react-native:0.74.1'
|
|
83
83
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
84
|
-
implementation 'com.tapjoy:tapjoy-android-sdk:14.
|
|
84
|
+
implementation 'com.tapjoy:tapjoy-android-sdk:14.3.1'
|
|
85
85
|
implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"
|
|
86
86
|
}
|
|
87
87
|
|
package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeViewManager.kt
CHANGED
|
@@ -33,7 +33,7 @@ class TJOfferwallDiscoverNativeViewManager(
|
|
|
33
33
|
override fun receiveCommand(view: TJOfferwallDiscoverNativeView, commandId: String, args: ReadableArray?) {
|
|
34
34
|
super.receiveCommand(view, commandId, args)
|
|
35
35
|
if (commandId == Command.REQUEST_CONTENT.getValue()) {
|
|
36
|
-
view.requestContent(args!!.getString(0))
|
|
36
|
+
view.requestContent(args!!.getString(0) ?: " ")
|
|
37
37
|
} else if (commandId == Command.CLEAR_CONTENT.getValue()) {
|
|
38
38
|
view.clearContent()
|
|
39
39
|
}
|
|
@@ -201,7 +201,8 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
201
201
|
promise.resolve(segment?.getValue() ?: TJSegment.UNKNOWN.getValue())
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Sets the maximum level of the user.
|
|
205
206
|
*
|
|
206
207
|
* @Param maxLevel: the maximum level
|
|
207
208
|
*/
|
|
@@ -210,6 +211,16 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
210
211
|
Tapjoy.setMaxLevel(maxLevel);
|
|
211
212
|
}
|
|
212
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Gets the maximum level of the user.
|
|
216
|
+
*
|
|
217
|
+
* @return the maximum level
|
|
218
|
+
*/
|
|
219
|
+
@ReactMethod
|
|
220
|
+
fun getMaxLevel(promise: Promise) {
|
|
221
|
+
promise.resolve(Tapjoy.getMaxLevel())
|
|
222
|
+
}
|
|
223
|
+
|
|
213
224
|
/**
|
|
214
225
|
* Sets the level of the user.
|
|
215
226
|
*
|
|
@@ -638,6 +649,16 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
638
649
|
Tapjoy.optOutAdvertisingID(this.currentActivity?.applicationContext, optOut)
|
|
639
650
|
}
|
|
640
651
|
|
|
652
|
+
@ReactMethod
|
|
653
|
+
fun getOptOutAdvertisingID(promise: Promise) {
|
|
654
|
+
val optOutStatus = Tapjoy.getOptOutAdvertisingID(this.currentActivity?.applicationContext)
|
|
655
|
+
if (optOutStatus != null) {
|
|
656
|
+
promise.resolve(optOutStatus)
|
|
657
|
+
} else {
|
|
658
|
+
promise.reject("Get Opt Out ID Error", Exception("error"))
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
641
662
|
private fun ReadableMap.toHashtable(): Hashtable<String, Any> {
|
|
642
663
|
val hashtable = Hashtable<String, Any>()
|
|
643
664
|
val iterator = this.keySetIterator()
|
package/example/Gemfile
CHANGED
|
@@ -5,4 +5,5 @@ ruby ">= 2.6.10"
|
|
|
5
5
|
|
|
6
6
|
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
|
|
7
7
|
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
|
|
8
|
-
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
8
|
+
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
+
gem 'xcodeproj', '< 1.26.0'
|
package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt
CHANGED
|
@@ -9,6 +9,7 @@ import com.facebook.react.ReactPackage
|
|
|
9
9
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
10
10
|
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
11
11
|
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
+
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
|
12
13
|
import com.facebook.soloader.SoLoader
|
|
13
14
|
|
|
14
15
|
class MainApplication : Application(), ReactApplication {
|
|
@@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication {
|
|
|
34
35
|
|
|
35
36
|
override fun onCreate() {
|
|
36
37
|
super.onCreate()
|
|
37
|
-
SoLoader.init(this,
|
|
38
|
+
SoLoader.init(this, OpenSourceMergedSoMapping)
|
|
38
39
|
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
39
40
|
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
40
41
|
load()
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
|
-
buildToolsVersion = "
|
|
4
|
-
minSdkVersion =
|
|
5
|
-
compileSdkVersion =
|
|
3
|
+
buildToolsVersion = "35.0.0"
|
|
4
|
+
minSdkVersion = 24
|
|
5
|
+
compileSdkVersion = 35
|
|
6
6
|
targetSdkVersion = 34
|
|
7
7
|
ndkVersion = "26.1.10909125"
|
|
8
8
|
kotlinVersion = "1.9.24"
|
|
@@ -24,7 +24,7 @@ allprojects {
|
|
|
24
24
|
repositories {
|
|
25
25
|
maven {
|
|
26
26
|
name "Tapjoy's maven repo"
|
|
27
|
-
url "https://sdk.tapjoy.com
|
|
27
|
+
url "https://sdk.tapjoy.com"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
}
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -32,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
|
|
|
32
32
|
# your application. You should enable this flag either if you want
|
|
33
33
|
# to write custom TurboModules/Fabric components OR use libraries that
|
|
34
34
|
# are providing them.
|
|
35
|
-
newArchEnabled=
|
|
35
|
+
newArchEnabled=true
|
|
36
36
|
|
|
37
37
|
# Use this property to enable or disable the Hermes JS engine.
|
|
38
38
|
# If set to false, you will be using JSC instead.
|
package/example/android/gradlew
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
# See the License for the specific language governing permissions and
|
|
16
16
|
# limitations under the License.
|
|
17
17
|
#
|
|
18
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
#
|
|
18
20
|
|
|
19
21
|
##############################################################################
|
|
20
22
|
#
|
|
@@ -84,7 +86,8 @@ done
|
|
|
84
86
|
# shellcheck disable=SC2034
|
|
85
87
|
APP_BASE_NAME=${0##*/}
|
|
86
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
87
|
-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null &&
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
+
' "$PWD" ) || exit
|
|
88
91
|
|
|
89
92
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
90
93
|
MAX_FD=maximum
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
@rem See the License for the specific language governing permissions and
|
|
14
14
|
@rem limitations under the License.
|
|
15
15
|
@rem
|
|
16
|
+
@rem SPDX-License-Identifier: Apache-2.0
|
|
17
|
+
@rem
|
|
16
18
|
|
|
17
19
|
@if "%DEBUG%" == "" @echo off
|
|
18
20
|
@rem ##########################################################################
|