tapjoy-react-native-sdk 14.4.0 → 14.6.0
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 +8 -15
- package/android/gradle.properties +3 -3
- package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeView.kt +2 -2
- package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeViewManager.kt +21 -16
- package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkModule.kt +130 -87
- package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkPackage.kt +29 -5
- package/example/android/app/build.gradle +1 -1
- package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt +2 -8
- package/example/android/build.gradle +4 -4
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +5 -0
- package/example/ios/Podfile +2 -1
- package/example/ios/TapjoyReactNativeSdkExample/Info.plist +3 -1
- package/example/ios/TapjoyReactNativeSdkExample.xcodeproj/project.pbxproj +0 -45
- package/example/metro.config.js +9 -15
- package/example/package.json +19 -16
- package/example/scripts/set-arch.sh +25 -0
- package/example/src/App.tsx +1 -2
- package/example/src/MainScreen.tsx +76 -60
- package/example/src/OfferwallDiscoverScreen.tsx +105 -91
- package/example/src/OfferwallScreen.tsx +170 -156
- package/example/src/Styles.ts +3 -2
- package/example/src/UserProperties.tsx +170 -136
- package/ios/TJOfferwallDiscoverNativeViewManager.m +11 -1
- package/ios/TJOfferwallDiscoverNativeViewManager.swift +2 -2
- package/ios/TapjoyReactNativeSdk.m +36 -15
- package/ios/TapjoyReactNativeSdk.swift +24 -4
- package/lib/commonjs/NativeTapjoyReactNativeSdk.js +2 -0
- package/lib/commonjs/TJOfferwallDiscoverView.js +43 -16
- package/lib/commonjs/TJOfferwallDiscoverViewNativeComponent.js +6 -0
- package/lib/commonjs/TJPlacement.js +17 -13
- package/lib/commonjs/TJPrivacyPolicy.js +81 -11
- package/lib/commonjs/TJVersion.js +1 -1
- package/lib/commonjs/Tapjoy.js +16 -10
- package/lib/commonjs/index.js +2 -1
- package/lib/commonjs/utils/ArchitectureDetection.js +7 -0
- package/lib/typescript/NativeTapjoyReactNativeSdk.d.ts +53 -0
- package/lib/typescript/TJOfferwallDiscoverView.d.ts +3 -12
- package/lib/typescript/TJOfferwallDiscoverViewNativeComponent.d.ts +21 -0
- package/lib/typescript/TJPrivacyPolicy.d.ts +29 -1
- package/lib/typescript/Tapjoy.d.ts +1 -1
- package/lib/typescript/index.d.ts +5 -3
- package/lib/typescript/utils/ArchitectureDetection.d.ts +5 -0
- package/package.json +14 -16
- package/src/NativeTapjoyReactNativeSdk.ts +117 -0
- package/src/TJOfferwallDiscoverView.tsx +56 -39
- package/src/TJOfferwallDiscoverViewNativeComponent.ts +37 -0
- package/src/TJPlacement.ts +17 -13
- package/src/TJPrivacyPolicy.ts +84 -12
- package/src/TJVersion.ts +1 -1
- package/src/Tapjoy.ts +20 -13
- package/src/index.ts +13 -3
- package/src/utils/ArchitectureDetection.ts +14 -0
- package/tapjoy-react-native-sdk.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -8,7 +8,7 @@ buildscript {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
dependencies {
|
|
11
|
-
classpath "com.android.tools.build:gradle:8.1
|
|
11
|
+
classpath "com.android.tools.build:gradle:8.11.1"
|
|
12
12
|
// noinspection DifferentKotlinGradleVersion
|
|
13
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
14
14
|
classpath "com.facebook.react:react-native-gradle-plugin"
|
|
@@ -21,12 +21,7 @@ def isNewArchitectureEnabled() {
|
|
|
21
21
|
|
|
22
22
|
apply plugin: "com.android.library"
|
|
23
23
|
apply plugin: "kotlin-android"
|
|
24
|
-
|
|
25
|
-
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
26
|
-
|
|
27
|
-
if (isNewArchitectureEnabled()) {
|
|
28
|
-
apply plugin: "com.facebook.react"
|
|
29
|
-
}
|
|
24
|
+
apply plugin: "com.facebook.react"
|
|
30
25
|
|
|
31
26
|
def getExtOrDefault(name) {
|
|
32
27
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["TapjoyReactNativeSdk_" + name]
|
|
@@ -79,16 +74,14 @@ dependencies {
|
|
|
79
74
|
// For < 0.71, this will be from the local maven repo
|
|
80
75
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
81
76
|
//noinspection GradleDynamicVersion
|
|
82
|
-
implementation 'com.facebook.react:react-native:0.
|
|
77
|
+
implementation 'com.facebook.react:react-native:0.81.0'
|
|
83
78
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
84
|
-
implementation 'com.tapjoy:tapjoy-android-sdk:14.
|
|
79
|
+
implementation 'com.tapjoy:tapjoy-android-sdk:14.6.0'
|
|
85
80
|
implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"
|
|
86
81
|
}
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
codegenJavaPackageName = "com.tapjoyreactnativesdk"
|
|
93
|
-
}
|
|
83
|
+
react {
|
|
84
|
+
jsRootDir = file("../src/")
|
|
85
|
+
libraryName = "TapjoyReactNativeSdk"
|
|
86
|
+
codegenJavaPackageName = "com.tapjoyreactnativesdk"
|
|
94
87
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
TapjoyReactNativeSdk_kotlinVersion=1.
|
|
1
|
+
TapjoyReactNativeSdk_kotlinVersion=2.1.20
|
|
2
2
|
TapjoyReactNativeSdk_minSdkVersion=21
|
|
3
|
-
TapjoyReactNativeSdk_targetSdkVersion=
|
|
4
|
-
TapjoyReactNativeSdk_compileSdkVersion=
|
|
3
|
+
TapjoyReactNativeSdk_targetSdkVersion=36
|
|
4
|
+
TapjoyReactNativeSdk_compileSdkVersion=36
|
|
5
5
|
TapjoyReactNativeSdk_ndkversion=25.1.8937393
|
|
6
6
|
android.useAndroidX=true
|
|
@@ -79,8 +79,8 @@ class TJOfferwallDiscoverNativeView : TJOfferwallDiscoverView, TJOfferwallDiscov
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
class OfferwallDiscoverEvent(surfaceId: Int, viewId: Int, private val
|
|
83
|
-
override fun getEventName() =
|
|
82
|
+
class OfferwallDiscoverEvent(surfaceId: Int, viewId: Int, private val name: String, private val data: WritableMap) : Event<OfferwallDiscoverEvent>(surfaceId, viewId) {
|
|
83
|
+
override fun getEventName() = name
|
|
84
84
|
|
|
85
85
|
// All events for a given view can be coalesced.
|
|
86
86
|
override fun getCoalescingKey(): Short = 0
|
package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeViewManager.kt
CHANGED
|
@@ -3,23 +3,16 @@ package com.tapjoyreactnativesdk
|
|
|
3
3
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
4
|
import com.facebook.react.bridge.ReadableArray
|
|
5
5
|
import com.facebook.react.common.MapBuilder
|
|
6
|
+
import com.facebook.react.module.annotations.ReactModule
|
|
6
7
|
import com.facebook.react.uimanager.SimpleViewManager
|
|
7
8
|
import com.facebook.react.uimanager.ThemedReactContext
|
|
9
|
+
import com.facebook.react.uimanager.annotations.ReactProp
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
REQUEST_CONTENT("requestContent"),
|
|
11
|
-
CLEAR_CONTENT("clearContent");
|
|
12
|
-
|
|
13
|
-
fun getValue(): String {
|
|
14
|
-
return value
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
11
|
+
@ReactModule(name = TJOfferwallDiscoverNativeViewManager.REACT_CLASS)
|
|
18
12
|
class TJOfferwallDiscoverNativeViewManager(
|
|
19
13
|
private val callerContext: ReactApplicationContext
|
|
20
14
|
) : SimpleViewManager<TJOfferwallDiscoverNativeView>() {
|
|
21
15
|
|
|
22
|
-
var view: TJOfferwallDiscoverNativeView? = null;
|
|
23
16
|
override fun getName() = REACT_CLASS
|
|
24
17
|
|
|
25
18
|
companion object {
|
|
@@ -32,15 +25,27 @@ class TJOfferwallDiscoverNativeViewManager(
|
|
|
32
25
|
|
|
33
26
|
override fun receiveCommand(view: TJOfferwallDiscoverNativeView, commandId: String, args: ReadableArray?) {
|
|
34
27
|
super.receiveCommand(view, commandId, args)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
when (commandId) {
|
|
29
|
+
"requestContent" -> {
|
|
30
|
+
args?.getString(0)?.let { placement ->
|
|
31
|
+
view.requestContent(placement)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
"clearContent" -> {
|
|
35
|
+
view.clearContent()
|
|
36
|
+
}
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
39
|
|
|
42
|
-
override fun
|
|
43
|
-
return MapBuilder.of
|
|
40
|
+
override fun getCommandsMap(): Map<String, Int>? {
|
|
41
|
+
return MapBuilder.of(
|
|
42
|
+
"requestContent", 1,
|
|
43
|
+
"clearContent", 2
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
override fun getExportedCustomDirectEventTypeConstants(): Map<String, Any>? {
|
|
48
|
+
return MapBuilder.of(
|
|
44
49
|
"onRequestSuccess", MapBuilder.of("registrationName", "onRequestSuccess"),
|
|
45
50
|
"onRequestFailure", MapBuilder.of("registrationName", "onRequestFailure"),
|
|
46
51
|
"onContentReady", MapBuilder.of("registrationName", "onContentReady"),
|