tapjoy-react-native-sdk 14.3.1 → 14.5.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 +3 -3
- package/android/gradle.properties +3 -3
- package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeView.kt +2 -2
- package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkModule.kt +57 -13
- package/example/Gemfile +9 -1
- package/example/android/app/build.gradle +3 -3
- package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt +2 -8
- package/example/android/build.gradle +5 -5
- 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 +5 -0
- package/example/android/gradlew +2 -3
- package/example/babel.config.js +0 -9
- package/example/ios/AppDelegate.swift +55 -0
- package/example/ios/Podfile +0 -1
- package/example/ios/TapjoyReactNativeSdkExample/Info.plist +1 -1
- package/example/ios/TapjoyReactNativeSdkExample.xcodeproj/project.pbxproj +5 -62
- package/example/metro.config.js +10 -16
- package/example/package.json +20 -19
- package/example/src/App.tsx +1 -2
- package/example/src/MainScreen.tsx +107 -58
- 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 +150 -135
- package/ios/TapjoyReactNativeSdk.m +4 -1
- package/ios/TapjoyReactNativeSdk.swift +14 -6
- package/lib/commonjs/TJLoggingLevel.js +8 -0
- package/lib/commonjs/TJVersion.js +1 -1
- package/lib/commonjs/Tapjoy.js +41 -1
- package/lib/commonjs/TapjoyEvent.js +1 -1
- package/lib/commonjs/index.js +2 -1
- package/lib/typescript/TJLoggingLevel.d.ts +7 -0
- package/lib/typescript/Tapjoy.d.ts +31 -0
- package/lib/typescript/TapjoyEvent.d.ts +1 -1
- package/lib/typescript/index.d.ts +4 -1
- package/package.json +8 -15
- package/src/TJLoggingLevel.ts +8 -0
- package/src/TJStatus.ts +1 -1
- package/src/TJVersion.ts +1 -1
- package/src/Tapjoy.ts +46 -3
- package/src/TapjoyEvent.ts +2 -2
- package/src/index.ts +4 -0
- package/tapjoy-react-native-sdk.podspec +1 -1
- package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.h +0 -6
- package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.mm +0 -31
- package/example/ios/TapjoyReactNativeSdkExample/main.m +0 -10
- package/example/ios/TapjoyReactNativeSdkExampleTests/Info.plist +0 -24
- package/example/ios/TapjoyReactNativeSdkExampleTests/TapjoyReactNativeSdkExampleTests.m +0 -66
- package/example/package-lock.json +0 -8605
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"
|
|
@@ -79,9 +79,9 @@ dependencies {
|
|
|
79
79
|
// For < 0.71, this will be from the local maven repo
|
|
80
80
|
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
|
|
81
81
|
//noinspection GradleDynamicVersion
|
|
82
|
-
implementation 'com.facebook.react:react-native:0.
|
|
82
|
+
implementation 'com.facebook.react:react-native:0.81.0'
|
|
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.5.0'
|
|
85
85
|
implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"
|
|
86
86
|
}
|
|
87
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
|
|
@@ -18,6 +18,7 @@ import com.tapjoy.TJPrivacyPolicy;
|
|
|
18
18
|
import com.tapjoy.TJSegment;
|
|
19
19
|
import com.tapjoy.TapjoyPluginAPI;
|
|
20
20
|
import com.tapjoy.TJEntryPoint
|
|
21
|
+
import com.tapjoy.TJLogLevel
|
|
21
22
|
import java.util.Hashtable
|
|
22
23
|
import kotlin.collections.HashMap
|
|
23
24
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
@@ -72,7 +73,7 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
72
73
|
fun connect(sdkKey: String, connectFlags: ReadableMap, promise: Promise) {
|
|
73
74
|
TapjoyPluginAPI.setPlugin("ReactNative");
|
|
74
75
|
|
|
75
|
-
Tapjoy.connect(this.
|
|
76
|
+
Tapjoy.connect(this.getCurrentActivity()?.applicationContext, sdkKey, connectFlags.toHashtable(), object : TJConnectListener() {
|
|
76
77
|
override fun onConnectSuccess() {
|
|
77
78
|
promise.resolve(true)
|
|
78
79
|
}
|
|
@@ -189,6 +190,25 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
|
|
193
|
+
/**
|
|
194
|
+
* Assign a custom parameter associated with any following placement requests that contains an ad type. We will return this value on the currency callback.
|
|
195
|
+
* Only applicable for publishers who manage their own currency servers. This value does NOT get unset with each subsequent placement request.
|
|
196
|
+
* @param customParameter
|
|
197
|
+
* The custom parameter to assign to this device
|
|
198
|
+
*/
|
|
199
|
+
@ReactMethod
|
|
200
|
+
fun setCustomParameter(customParameter: String) {
|
|
201
|
+
Tapjoy.setCustomParameter(customParameter)
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Returns the currently set custom parameter.
|
|
206
|
+
* @return the value of the currently set custom parameter.
|
|
207
|
+
*/
|
|
208
|
+
@ReactMethod
|
|
209
|
+
fun getCustomParameter(promise: Promise) {
|
|
210
|
+
promise.resolve(Tapjoy.getCustomParameter())
|
|
211
|
+
}
|
|
192
212
|
/**
|
|
193
213
|
* Sets the segment of the user
|
|
194
214
|
*
|
|
@@ -302,6 +322,25 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
302
322
|
Tapjoy.removeUserTag(tag)
|
|
303
323
|
}
|
|
304
324
|
|
|
325
|
+
@ReactMethod
|
|
326
|
+
fun setLoggingLevel(level: Int) {
|
|
327
|
+
when (level) {
|
|
328
|
+
0 -> Tapjoy.setLoggingLevel(TJLogLevel.ERROR)
|
|
329
|
+
1 -> Tapjoy.setLoggingLevel(TJLogLevel.WARNING)
|
|
330
|
+
2 -> Tapjoy.setLoggingLevel(TJLogLevel.INFO)
|
|
331
|
+
3 -> Tapjoy.setLoggingLevel(TJLogLevel.DEBUG)
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@ReactMethod
|
|
336
|
+
fun getLoggingLevel(promise: Promise) {
|
|
337
|
+
when (Tapjoy.getLoggingLevel()) {
|
|
338
|
+
TJLogLevel.ERROR -> promise.resolve(0)
|
|
339
|
+
TJLogLevel.WARNING -> promise.resolve(1)
|
|
340
|
+
TJLogLevel.INFO -> promise.resolve(2)
|
|
341
|
+
TJLogLevel.DEBUG -> promise.resolve(3)
|
|
342
|
+
}
|
|
343
|
+
}
|
|
305
344
|
|
|
306
345
|
@ReactMethod
|
|
307
346
|
fun setDebugEnabled(enabled: Boolean) {
|
|
@@ -364,14 +403,6 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
364
403
|
placements.remove(placement.name)
|
|
365
404
|
}
|
|
366
405
|
|
|
367
|
-
override fun onPurchaseRequest(placement: TJPlacement, actionRequest: TJActionRequest, name: String) {
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
override fun onRewardRequest(placement: TJPlacement, actionRequest: TJActionRequest, currencyName: String, value: Int) {
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
|
|
375
406
|
override fun onClick(placement: TJPlacement) {
|
|
376
407
|
|
|
377
408
|
}
|
|
@@ -646,12 +677,12 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
646
677
|
|
|
647
678
|
@ReactMethod
|
|
648
679
|
fun optOutAdvertisingID(optOut: Boolean) {
|
|
649
|
-
Tapjoy.optOutAdvertisingID(this.
|
|
680
|
+
Tapjoy.optOutAdvertisingID(this.getCurrentActivity()?.applicationContext, optOut)
|
|
650
681
|
}
|
|
651
682
|
|
|
652
683
|
@ReactMethod
|
|
653
684
|
fun getOptOutAdvertisingID(promise: Promise) {
|
|
654
|
-
val optOutStatus = Tapjoy.getOptOutAdvertisingID(this.
|
|
685
|
+
val optOutStatus = Tapjoy.getOptOutAdvertisingID(this.getCurrentActivity()?.applicationContext)
|
|
655
686
|
if (optOutStatus != null) {
|
|
656
687
|
promise.resolve(optOutStatus)
|
|
657
688
|
} else {
|
|
@@ -664,8 +695,21 @@ class TapjoyReactNativeSdkModule(reactContext: ReactApplicationContext) :
|
|
|
664
695
|
val iterator = this.keySetIterator()
|
|
665
696
|
while (iterator.hasNextKey()) {
|
|
666
697
|
val key = iterator.nextKey()
|
|
667
|
-
|
|
668
|
-
|
|
698
|
+
when (this.getType(key)) {
|
|
699
|
+
ReadableType.String -> {
|
|
700
|
+
this.getString(key)?.let { hashtable[key] = it }
|
|
701
|
+
}
|
|
702
|
+
ReadableType.Number -> {
|
|
703
|
+
val numberValue = this.getDouble(key)
|
|
704
|
+
val asInt = numberValue.toInt()
|
|
705
|
+
hashtable[key] = if (numberValue == asInt.toDouble()) asInt else numberValue
|
|
706
|
+
}
|
|
707
|
+
ReadableType.Boolean -> {
|
|
708
|
+
hashtable[key] = this.getBoolean(key)
|
|
709
|
+
}
|
|
710
|
+
ReadableType.Null, ReadableType.Map, ReadableType.Array -> {
|
|
711
|
+
}
|
|
712
|
+
}
|
|
669
713
|
}
|
|
670
714
|
return hashtable
|
|
671
715
|
}
|
package/example/Gemfile
CHANGED
|
@@ -6,4 +6,12 @@ ruby ">= 2.6.10"
|
|
|
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
8
|
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
|
|
9
|
-
gem 'xcodeproj', '< 1.26.0'
|
|
9
|
+
gem 'xcodeproj', '< 1.26.0'
|
|
10
|
+
|
|
11
|
+
gem 'concurrent-ruby', '< 1.3.4'
|
|
12
|
+
|
|
13
|
+
# Ruby 3.4.0 has removed some libraries from the standard library.
|
|
14
|
+
gem 'bigdecimal'
|
|
15
|
+
gem 'logger'
|
|
16
|
+
gem 'benchmark'
|
|
17
|
+
gem 'mutex_m'
|
|
@@ -62,14 +62,14 @@ def enableProguardInReleaseBuilds = false
|
|
|
62
62
|
* The preferred build flavor of JavaScriptCore (JSC)
|
|
63
63
|
*
|
|
64
64
|
* For example, to use the international variant, you can use:
|
|
65
|
-
*
|
|
65
|
+
* def jscFlavor = io.github.react-native-community:jsc-android-intl:2026004.+`
|
|
66
66
|
*
|
|
67
67
|
* The international variant includes ICU i18n library and necessary data
|
|
68
68
|
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
|
69
69
|
* give correct results when using with locales other than en-US. Note that
|
|
70
70
|
* this variant is about 6MiB larger per architecture than default.
|
|
71
71
|
*/
|
|
72
|
-
def jscFlavor = '
|
|
72
|
+
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
|
|
73
73
|
|
|
74
74
|
android {
|
|
75
75
|
ndkVersion rootProject.ext.ndkVersion
|
|
@@ -117,6 +117,6 @@ dependencies {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
implementation 'com.google.android.gms:play-services-appset:16.0.2'
|
|
120
|
-
implementation 'com.tapjoy:tapjoy-android-sdk:14.
|
|
120
|
+
implementation 'com.tapjoy:tapjoy-android-sdk:14.5.0'
|
|
121
121
|
|
|
122
122
|
}
|
package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt
CHANGED
|
@@ -4,13 +4,11 @@ import android.app.Application
|
|
|
4
4
|
import com.facebook.react.PackageList
|
|
5
5
|
import com.facebook.react.ReactApplication
|
|
6
6
|
import com.facebook.react.ReactHost
|
|
7
|
+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
|
7
8
|
import com.facebook.react.ReactNativeHost
|
|
8
9
|
import com.facebook.react.ReactPackage
|
|
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
|
|
13
|
-
import com.facebook.soloader.SoLoader
|
|
14
12
|
|
|
15
13
|
class MainApplication : Application(), ReactApplication {
|
|
16
14
|
|
|
@@ -35,10 +33,6 @@ class MainApplication : Application(), ReactApplication {
|
|
|
35
33
|
|
|
36
34
|
override fun onCreate() {
|
|
37
35
|
super.onCreate()
|
|
38
|
-
|
|
39
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
40
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
41
|
-
load()
|
|
42
|
-
}
|
|
36
|
+
loadReactNative(this)
|
|
43
37
|
}
|
|
44
38
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
|
-
buildToolsVersion = "
|
|
3
|
+
buildToolsVersion = "36.0.0"
|
|
4
4
|
minSdkVersion = 24
|
|
5
|
-
compileSdkVersion =
|
|
6
|
-
targetSdkVersion =
|
|
7
|
-
ndkVersion = "
|
|
8
|
-
kotlinVersion = "1.
|
|
5
|
+
compileSdkVersion = 36
|
|
6
|
+
targetSdkVersion = 36
|
|
7
|
+
ndkVersion = "27.1.12297006"
|
|
8
|
+
kotlinVersion = "2.1.20"
|
|
9
9
|
}
|
|
10
10
|
repositories {
|
|
11
11
|
google()
|
|
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.14.3-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
|
@@ -37,3 +37,8 @@ newArchEnabled=true
|
|
|
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.
|
|
39
39
|
hermesEnabled=true
|
|
40
|
+
|
|
41
|
+
# Use this property to enable edge-to-edge display support.
|
|
42
|
+
# This allows your app to draw behind system bars for an immersive UI.
|
|
43
|
+
# Note: Only works with ReactActivity and should not be used with custom Activity.
|
|
44
|
+
edgeToEdgeEnabled=false
|
package/example/android/gradlew
CHANGED
|
@@ -86,8 +86,7 @@ done
|
|
|
86
86
|
# shellcheck disable=SC2034
|
|
87
87
|
APP_BASE_NAME=${0##*/}
|
|
88
88
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
|
89
|
-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
|
90
|
-
' "$PWD" ) || exit
|
|
89
|
+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
|
91
90
|
|
|
92
91
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
|
93
92
|
MAX_FD=maximum
|
|
@@ -206,7 +205,7 @@ fi
|
|
|
206
205
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|
207
206
|
|
|
208
207
|
# Collect all arguments for the java command:
|
|
209
|
-
# * DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
208
|
+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
210
209
|
# and any embedded shellness will be escaped.
|
|
211
210
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
212
211
|
# treated as '${Hostname}' itself on the command line.
|
package/example/babel.config.js
CHANGED
|
@@ -4,14 +4,5 @@ const pak = require('../package.json');
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
presets: ['module:@react-native/babel-preset'],
|
|
6
6
|
plugins: [
|
|
7
|
-
[
|
|
8
|
-
'module-resolver',
|
|
9
|
-
{
|
|
10
|
-
extensions: ['.tsx', '.ts', '.js', '.json'],
|
|
11
|
-
alias: {
|
|
12
|
-
[pak.name]: path.join(__dirname, '..', pak.source),
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
7
|
],
|
|
17
8
|
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//
|
|
2
|
+
// AppDelegate.swift
|
|
3
|
+
// TapjoyReactNativeSdkExample
|
|
4
|
+
//
|
|
5
|
+
// Created by Luke Bowman on 13/05/2025.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import UIKit
|
|
9
|
+
import React
|
|
10
|
+
import React_RCTAppDelegate
|
|
11
|
+
import ReactAppDependencyProvider
|
|
12
|
+
|
|
13
|
+
@main
|
|
14
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
|
15
|
+
var window: UIWindow?
|
|
16
|
+
|
|
17
|
+
var reactNativeDelegate: ReactNativeDelegate?
|
|
18
|
+
var reactNativeFactory: RCTReactNativeFactory?
|
|
19
|
+
|
|
20
|
+
func application(
|
|
21
|
+
_ application: UIApplication,
|
|
22
|
+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
|
|
23
|
+
) -> Bool {
|
|
24
|
+
let delegate = ReactNativeDelegate()
|
|
25
|
+
let factory = RCTReactNativeFactory(delegate: delegate)
|
|
26
|
+
delegate.dependencyProvider = RCTAppDependencyProvider()
|
|
27
|
+
|
|
28
|
+
reactNativeDelegate = delegate
|
|
29
|
+
reactNativeFactory = factory
|
|
30
|
+
|
|
31
|
+
window = UIWindow(frame: UIScreen.main.bounds)
|
|
32
|
+
|
|
33
|
+
factory.startReactNative(
|
|
34
|
+
withModuleName: "TapjoyReactNativeSdkExample",
|
|
35
|
+
in: window,
|
|
36
|
+
launchOptions: launchOptions
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
return true
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
|
|
44
|
+
override func sourceURL(for bridge: RCTBridge) -> URL? {
|
|
45
|
+
self.bundleURL()
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
override func bundleURL() -> URL? {
|
|
49
|
+
#if DEBUG
|
|
50
|
+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
|
|
51
|
+
#else
|
|
52
|
+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
|
|
53
|
+
#endif
|
|
54
|
+
}
|
|
55
|
+
}
|
package/example/ios/Podfile
CHANGED
|
@@ -7,45 +7,28 @@
|
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
|
-
00E356F31AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.m */; };
|
|
11
10
|
0C80B921A6F3F58F76C31292 /* libPods-TapjoyReactNativeSdkExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-TapjoyReactNativeSdkExample.a */; };
|
|
12
|
-
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
|
|
13
11
|
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
|
14
|
-
|
|
12
|
+
5BA1D00A2DD34B1F00CF7906 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BA1D0092DD34B1600CF7906 /* AppDelegate.swift */; };
|
|
15
13
|
7699B88040F8A987B510C191 /* libPods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.a */; };
|
|
16
14
|
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
|
|
17
15
|
B58E4E7E8EDB14A1C5F1CBAA /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = EDEB0408D1807C711EE2B6BB /* PrivacyInfo.xcprivacy */; };
|
|
18
16
|
/* End PBXBuildFile section */
|
|
19
17
|
|
|
20
|
-
/* Begin PBXContainerItemProxy section */
|
|
21
|
-
00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
|
|
22
|
-
isa = PBXContainerItemProxy;
|
|
23
|
-
containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
|
|
24
|
-
proxyType = 1;
|
|
25
|
-
remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
|
|
26
|
-
remoteInfo = TapjoyReactNativeSdkExample;
|
|
27
|
-
};
|
|
28
|
-
/* End PBXContainerItemProxy section */
|
|
29
|
-
|
|
30
18
|
/* Begin PBXFileReference section */
|
|
31
19
|
00E356EE1AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TapjoyReactNativeSdkExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
32
|
-
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
|
33
|
-
00E356F21AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TapjoyReactNativeSdkExampleTests.m; sourceTree = "<group>"; };
|
|
34
20
|
13B07F961A680F5B00A75B9A /* TapjoyReactNativeSdkExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TapjoyReactNativeSdkExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
35
|
-
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = TapjoyReactNativeSdkExample/AppDelegate.h; sourceTree = "<group>"; };
|
|
36
|
-
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = TapjoyReactNativeSdkExample/AppDelegate.mm; sourceTree = "<group>"; };
|
|
37
21
|
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = TapjoyReactNativeSdkExample/Images.xcassets; sourceTree = "<group>"; };
|
|
38
|
-
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = TapjoyReactNativeSdkExample/Info.plist; sourceTree = "<group>"; };
|
|
39
|
-
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TapjoyReactNativeSdkExample/main.m; sourceTree = "<group>"; };
|
|
40
22
|
19F6CBCC0A4E27FBF8BF4A61 /* libPods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
41
23
|
3B4392A12AC88292D35C810B /* Pods-TapjoyReactNativeSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TapjoyReactNativeSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-TapjoyReactNativeSdkExample/Pods-TapjoyReactNativeSdkExample.debug.xcconfig"; sourceTree = "<group>"; };
|
|
42
24
|
5709B34CF0A7D63546082F79 /* Pods-TapjoyReactNativeSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TapjoyReactNativeSdkExample.release.xcconfig"; path = "Target Support Files/Pods-TapjoyReactNativeSdkExample/Pods-TapjoyReactNativeSdkExample.release.xcconfig"; sourceTree = "<group>"; };
|
|
43
25
|
5B7EB9410499542E8C5724F5 /* Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests/Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.debug.xcconfig"; sourceTree = "<group>"; };
|
|
26
|
+
5BA1D0092DD34B1600CF7906 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
|
44
27
|
5DCACB8F33CDC322A6C60F78 /* libPods-TapjoyReactNativeSdkExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-TapjoyReactNativeSdkExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
45
28
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = TapjoyReactNativeSdkExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
|
46
29
|
89C6BE57DB24E9ADA2F236DE /* Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.release.xcconfig"; path = "Target Support Files/Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests/Pods-TapjoyReactNativeSdkExample-TapjoyReactNativeSdkExampleTests.release.xcconfig"; sourceTree = "<group>"; };
|
|
47
30
|
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
|
48
|
-
EDEB0408D1807C711EE2B6BB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = TapjoyReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
|
31
|
+
EDEB0408D1807C711EE2B6BB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = TapjoyReactNativeSdkExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
|
49
32
|
/* End PBXFileReference section */
|
|
50
33
|
|
|
51
34
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -68,32 +51,12 @@
|
|
|
68
51
|
/* End PBXFrameworksBuildPhase section */
|
|
69
52
|
|
|
70
53
|
/* Begin PBXGroup section */
|
|
71
|
-
00E356EF1AD99517003FC87E /* TapjoyReactNativeSdkExampleTests */ = {
|
|
72
|
-
isa = PBXGroup;
|
|
73
|
-
children = (
|
|
74
|
-
00E356F21AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.m */,
|
|
75
|
-
00E356F01AD99517003FC87E /* Supporting Files */,
|
|
76
|
-
);
|
|
77
|
-
path = TapjoyReactNativeSdkExampleTests;
|
|
78
|
-
sourceTree = "<group>";
|
|
79
|
-
};
|
|
80
|
-
00E356F01AD99517003FC87E /* Supporting Files */ = {
|
|
81
|
-
isa = PBXGroup;
|
|
82
|
-
children = (
|
|
83
|
-
00E356F11AD99517003FC87E /* Info.plist */,
|
|
84
|
-
);
|
|
85
|
-
name = "Supporting Files";
|
|
86
|
-
sourceTree = "<group>";
|
|
87
|
-
};
|
|
88
54
|
13B07FAE1A68108700A75B9A /* TapjoyReactNativeSdkExample */ = {
|
|
89
55
|
isa = PBXGroup;
|
|
90
56
|
children = (
|
|
91
|
-
|
|
92
|
-
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
|
|
57
|
+
5BA1D0092DD34B1600CF7906 /* AppDelegate.swift */,
|
|
93
58
|
13B07FB51A68108700A75B9A /* Images.xcassets */,
|
|
94
|
-
13B07FB61A68108700A75B9A /* Info.plist */,
|
|
95
59
|
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
|
|
96
|
-
13B07FB71A68108700A75B9A /* main.m */,
|
|
97
60
|
EDEB0408D1807C711EE2B6BB /* PrivacyInfo.xcprivacy */,
|
|
98
61
|
);
|
|
99
62
|
name = TapjoyReactNativeSdkExample;
|
|
@@ -121,7 +84,6 @@
|
|
|
121
84
|
children = (
|
|
122
85
|
13B07FAE1A68108700A75B9A /* TapjoyReactNativeSdkExample */,
|
|
123
86
|
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
|
124
|
-
00E356EF1AD99517003FC87E /* TapjoyReactNativeSdkExampleTests */,
|
|
125
87
|
83CBBA001A601CBA00E9B192 /* Products */,
|
|
126
88
|
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
|
127
89
|
BBD78D7AC51CEA395F1C20DB /* Pods */,
|
|
@@ -161,14 +123,12 @@
|
|
|
161
123
|
A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
|
|
162
124
|
00E356EA1AD99517003FC87E /* Sources */,
|
|
163
125
|
00E356EB1AD99517003FC87E /* Frameworks */,
|
|
164
|
-
00E356EC1AD99517003FC87E /* Resources */,
|
|
165
126
|
C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
|
|
166
127
|
F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
|
|
167
128
|
);
|
|
168
129
|
buildRules = (
|
|
169
130
|
);
|
|
170
131
|
dependencies = (
|
|
171
|
-
00E356F51AD99517003FC87E /* PBXTargetDependency */,
|
|
172
132
|
);
|
|
173
133
|
name = TapjoyReactNativeSdkExampleTests;
|
|
174
134
|
productName = TapjoyReactNativeSdkExampleTests;
|
|
@@ -234,13 +194,6 @@
|
|
|
234
194
|
/* End PBXProject section */
|
|
235
195
|
|
|
236
196
|
/* Begin PBXResourcesBuildPhase section */
|
|
237
|
-
00E356EC1AD99517003FC87E /* Resources */ = {
|
|
238
|
-
isa = PBXResourcesBuildPhase;
|
|
239
|
-
buildActionMask = 2147483647;
|
|
240
|
-
files = (
|
|
241
|
-
);
|
|
242
|
-
runOnlyForDeploymentPostprocessing = 0;
|
|
243
|
-
};
|
|
244
197
|
13B07F8E1A680F5B00A75B9A /* Resources */ = {
|
|
245
198
|
isa = PBXResourcesBuildPhase;
|
|
246
199
|
buildActionMask = 2147483647;
|
|
@@ -408,7 +361,6 @@
|
|
|
408
361
|
isa = PBXSourcesBuildPhase;
|
|
409
362
|
buildActionMask = 2147483647;
|
|
410
363
|
files = (
|
|
411
|
-
00E356F31AD99517003FC87E /* TapjoyReactNativeSdkExampleTests.m in Sources */,
|
|
412
364
|
);
|
|
413
365
|
runOnlyForDeploymentPostprocessing = 0;
|
|
414
366
|
};
|
|
@@ -416,21 +368,12 @@
|
|
|
416
368
|
isa = PBXSourcesBuildPhase;
|
|
417
369
|
buildActionMask = 2147483647;
|
|
418
370
|
files = (
|
|
419
|
-
|
|
420
|
-
13B07FC11A68108700A75B9A /* main.m in Sources */,
|
|
371
|
+
5BA1D00A2DD34B1F00CF7906 /* AppDelegate.swift in Sources */,
|
|
421
372
|
);
|
|
422
373
|
runOnlyForDeploymentPostprocessing = 0;
|
|
423
374
|
};
|
|
424
375
|
/* End PBXSourcesBuildPhase section */
|
|
425
376
|
|
|
426
|
-
/* Begin PBXTargetDependency section */
|
|
427
|
-
00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
|
|
428
|
-
isa = PBXTargetDependency;
|
|
429
|
-
target = 13B07F861A680F5B00A75B9A /* TapjoyReactNativeSdkExample */;
|
|
430
|
-
targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
|
|
431
|
-
};
|
|
432
|
-
/* End PBXTargetDependency section */
|
|
433
|
-
|
|
434
377
|
/* Begin XCBuildConfiguration section */
|
|
435
378
|
00E356F61AD99517003FC87E /* Debug */ = {
|
|
436
379
|
isa = XCBuildConfiguration;
|
package/example/metro.config.js
CHANGED
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
const escape = require('escape-string-regexp');
|
|
3
|
-
const exclusionList = require('metro-config/src/defaults/exclusionList');
|
|
4
3
|
const pak = require('../package.json');
|
|
5
4
|
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
|
6
5
|
|
|
7
6
|
const root = path.resolve(__dirname, '..');
|
|
8
|
-
|
|
9
|
-
const modules = Object.keys({
|
|
10
|
-
...pak.peerDependencies,
|
|
11
|
-
});
|
|
7
|
+
const modules = Object.keys(pak.peerDependencies);
|
|
12
8
|
|
|
13
9
|
/**
|
|
14
10
|
* Metro configuration
|
|
15
11
|
* https://reactnative.dev/docs/metro
|
|
16
12
|
*
|
|
17
|
-
* @type {import('metro-config').MetroConfig}
|
|
13
|
+
* @type {import('@react-native/metro-config').MetroConfig}
|
|
18
14
|
*/
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
const defaultConfig = getDefaultConfig(__dirname);
|
|
17
|
+
|
|
18
|
+
const blockList = modules.map(
|
|
19
|
+
(m) => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
module.exports = mergeConfig(defaultConfig, {
|
|
21
23
|
projectRoot: __dirname,
|
|
22
24
|
watchFolders: [root],
|
|
23
25
|
|
|
24
|
-
// We need to make sure that only one version is loaded for peerDependencies
|
|
25
|
-
// So we block them at the root, and alias them to the versions in example's node_modules
|
|
26
26
|
resolver: {
|
|
27
|
-
|
|
28
|
-
modules.map(
|
|
29
|
-
(m) =>
|
|
30
|
-
new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
|
|
31
|
-
)
|
|
32
|
-
),
|
|
33
|
-
|
|
27
|
+
blockList: blockList,
|
|
34
28
|
extraNodeModules: modules.reduce((acc, name) => {
|
|
35
29
|
acc[name] = path.join(__dirname, 'node_modules', name);
|
|
36
30
|
return acc;
|
package/example/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "TapjoyReactNativeSdkExample",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.5.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"android": "react-native run-android",
|
|
@@ -10,32 +10,33 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"tapjoy-react-native-sdk": "file:../",
|
|
13
|
-
"@react-native-async-storage/async-storage": "^2.
|
|
14
|
-
"@react-native-
|
|
15
|
-
"@react-native-picker/picker": "^2.
|
|
16
|
-
"@react-navigation/bottom-tabs": "^
|
|
17
|
-
"@react-navigation/native": "^
|
|
13
|
+
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
14
|
+
"@react-native-masked-view/masked-view": "^0.3.2",
|
|
15
|
+
"@react-native-picker/picker": "^2.11.1",
|
|
16
|
+
"@react-navigation/bottom-tabs": "^7.3.13",
|
|
17
|
+
"@react-navigation/native": "^7.1.9",
|
|
18
|
+
"@react-native/new-app-screen": "0.81.0",
|
|
18
19
|
"dayjs": "^1.11.13",
|
|
19
|
-
"react": "
|
|
20
|
-
"react-native": "0.
|
|
21
|
-
"react-native-gesture-handler": "^2.
|
|
20
|
+
"react": "19.1.0",
|
|
21
|
+
"react-native": "0.81.0",
|
|
22
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
22
23
|
"react-native-picker-select": "^9.3.1",
|
|
23
|
-
"react-native-reanimated": "^3.
|
|
24
|
-
"react-native-safe-area-context": "^
|
|
25
|
-
"react-native-screens": "^
|
|
26
|
-
"react-native-toast-message": "^2.
|
|
24
|
+
"react-native-reanimated": "^3.19.1",
|
|
25
|
+
"react-native-safe-area-context": "^5.6.1",
|
|
26
|
+
"react-native-screens": "^4.15.2",
|
|
27
|
+
"react-native-toast-message": "^2.3.3",
|
|
27
28
|
"react-native-tracking-transparency": "^0.1.2"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@babel/core": "^7.25.2",
|
|
31
32
|
"@babel/preset-env": "^7.25.4",
|
|
32
33
|
"@babel/runtime": "^7.25.6",
|
|
33
|
-
"@react-native-community/cli": "
|
|
34
|
-
"@react-native-community/cli-platform-android": "
|
|
35
|
-
"@react-native-community/cli-platform-ios": "
|
|
36
|
-
"@react-native/
|
|
37
|
-
"
|
|
38
|
-
"
|
|
34
|
+
"@react-native-community/cli": "20.0.0",
|
|
35
|
+
"@react-native-community/cli-platform-android": "20.0.0",
|
|
36
|
+
"@react-native-community/cli-platform-ios": "20.0.0",
|
|
37
|
+
"@react-native/babel-preset": "0.81.0",
|
|
38
|
+
"@react-native/metro-config": "0.81.0",
|
|
39
|
+
"@react-native/typescript-config": "0.81.0"
|
|
39
40
|
},
|
|
40
41
|
"engines": {
|
|
41
42
|
"node": ">=18"
|