react-native-gemius-plugin 1.7.3 → 2.0.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/LICENSE +20 -0
- package/LRTGemiusPlugin.podspec +21 -0
- package/README.md +23 -30
- package/android/build.gradle +74 -69
- package/android/src/main/AndroidManifest.xml +1 -3
- package/android/src/main/java/com/gemiusplugin/LRTGemiusPluginModule.kt +161 -0
- package/android/src/main/java/com/gemiusplugin/LRTGemiusPluginPackage.kt +31 -0
- package/ios/Frameworks/GemiusSDK.xcframework/Info.plist +9 -5
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/GemiusSDK +0 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/Headers/Config.h +21 -2
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/Modules/module.modulemap +1 -1
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/PrivacyInfo.xcprivacy +48 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/GemiusSDK +0 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/Headers/Config.h +21 -2
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/Info.plist +0 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/Modules/module.modulemap +1 -1
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/PrivacyInfo.xcprivacy +48 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/_CodeSignature/CodeDirectory +0 -0
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/_CodeSignature/CodeResources +14 -87
- package/ios/LRTGemiusPlugin.h +5 -0
- package/ios/LRTGemiusPlugin.mm +179 -0
- package/lib/module/NativeLRTGemiusPlugin.js +5 -0
- package/lib/module/NativeLRTGemiusPlugin.js.map +1 -0
- package/{index.js → lib/module/index.js} +16 -29
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeLRTGemiusPlugin.d.ts +22 -0
- package/lib/typescript/src/NativeLRTGemiusPlugin.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +22 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +156 -17
- package/src/NativeLRTGemiusPlugin.ts +48 -0
- package/src/index.tsx +105 -0
- package/.gitattributes +0 -1
- package/android/.classpath +0 -6
- package/android/.gradle/9.0.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.0.0/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/9.0.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.0.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.0.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.0.0/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/9.0.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/config.properties +0 -2
- package/android/.gradle/file-system.probe +0 -0
- package/android/.gradle/gradle.properties +0 -43
- package/android/.gradle/noVersion/buildLogic.lock +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/AndroidProjectSystem.xml +0 -6
- package/android/.idea/caches/deviceStreaming.xml +0 -1414
- package/android/.idea/compiler.xml +0 -19
- package/android/.idea/copilot.data.migration.agent.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/jarRepositories.xml +0 -55
- package/android/.idea/kotlinc.xml +0 -6
- package/android/.idea/migrations.xml +0 -10
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/modules/android.androidTest.iml +0 -15
- package/android/.idea/modules/android.iml +0 -21
- package/android/.idea/modules/android.main.iml +0 -15
- package/android/.idea/modules/android.unitTest.iml +0 -15
- package/android/.idea/modules.xml +0 -11
- package/android/.idea/runConfigurations.xml +0 -17
- package/android/.idea/vcs.xml +0 -6
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/README.md +0 -14
- package/android/build/reports/problems/problems-report.html +0 -663
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/android/gradle.properties +0 -39
- package/android/gradlew +0 -251
- package/android/gradlew.bat +0 -99
- package/android/local.properties +0 -8
- package/android/src/main/java/com/reactlibrary/GemiusPluginModule.java +0 -170
- package/android/src/main/java/com/reactlibrary/GemiusPluginPackage.java +0 -20
- package/index.d.ts +0 -27
- package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64_x86_64-simulator/GemiusSDK.framework/_CodeSignature/CodeRequirements-1 +0 -0
- package/ios/GemiusPlugin.h +0 -5
- package/ios/GemiusPlugin.m +0 -163
- package/ios/GemiusPlugin.xcodeproj/project.pbxproj +0 -313
- package/ios/GemiusPlugin.xcodeproj/xcshareddata/xcschemes/GemiusPlugin.xcscheme +0 -67
- package/ios/GemiusPlugin.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/GemiusPlugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/GemiusPlugin.xcworkspace/xcuserdata/kestasvenslauskas.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/react-native-gemius-plugin.podspec +0 -30
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kestas Venslauskas
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "LRTGemiusPlugin"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.homepage = package["homepage"]
|
|
10
|
+
s.license = package["license"]
|
|
11
|
+
s.authors = package["author"]
|
|
12
|
+
|
|
13
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
14
|
+
s.source = { :git => "https://github.com/KestasVenslauskas/react-native-gemius-plugin.git", :tag => "#{s.version}" }
|
|
15
|
+
|
|
16
|
+
s.source_files = "ios/*.{h,m,mm,swift,cpp}"
|
|
17
|
+
s.private_header_files = "ios/*.h"
|
|
18
|
+
s.vendored_frameworks = "ios/Frameworks/GemiusSDK.xcframework"
|
|
19
|
+
|
|
20
|
+
install_modules_dependencies(s)
|
|
21
|
+
end
|
package/README.md
CHANGED
|
@@ -1,44 +1,37 @@
|
|
|
1
1
|
# react-native-gemius-plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
React Native Gemius plugin
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
|
-
### Mostly automatic installation
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
```sh
|
|
9
|
+
npm install react-native-gemius-plugin
|
|
10
|
+
```
|
|
10
11
|
|
|
11
|
-
### Manual installation
|
|
12
12
|
|
|
13
|
+
## Usage
|
|
13
14
|
|
|
14
|
-
#### iOS
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
3. In XCode, in the project navigator, select your project. Add `libGemiusPlugin.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
|
|
19
|
-
4. Run your project (`Cmd+R`)<
|
|
16
|
+
```js
|
|
17
|
+
import { multiply } from 'react-native-gemius-plugin';
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
// ...
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- Add `new GemiusPluginPackage()` to the list returned by the `getPackages()` method
|
|
26
|
-
2. Append the following lines to `android/settings.gradle`:
|
|
27
|
-
```
|
|
28
|
-
include ':react-native-gemius-plugin'
|
|
29
|
-
project(':react-native-gemius-plugin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-gemius-plugin/android')
|
|
30
|
-
```
|
|
31
|
-
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
|
|
32
|
-
```
|
|
33
|
-
compile project(':react-native-gemius-plugin')
|
|
34
|
-
```
|
|
21
|
+
const result = multiply(3, 7);
|
|
22
|
+
```
|
|
35
23
|
|
|
36
24
|
|
|
37
|
-
##
|
|
38
|
-
```javascript
|
|
39
|
-
import GemiusPlugin from 'react-native-gemius-plugin';
|
|
25
|
+
## Contributing
|
|
40
26
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
- [Development workflow](CONTRIBUTING.md#development-workflow)
|
|
28
|
+
- [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
|
|
29
|
+
- [Code of conduct](CODE_OF_CONDUCT.md)
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
|
package/android/build.gradle
CHANGED
|
@@ -1,83 +1,88 @@
|
|
|
1
|
-
// android/build.gradle
|
|
2
|
-
|
|
3
|
-
def safeExtGet(prop, fallback) {
|
|
4
|
-
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
buildscript {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
2
|
+
ext.LRTGemiusPlugin = [
|
|
3
|
+
kotlinVersion: "2.0.21",
|
|
4
|
+
minSdkVersion: 24,
|
|
5
|
+
compileSdkVersion: 36,
|
|
6
|
+
targetSdkVersion: 36
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
ext.getExtOrDefault = { prop ->
|
|
10
|
+
if (rootProject.ext.has(prop)) {
|
|
11
|
+
return rootProject.ext.get(prop)
|
|
19
12
|
}
|
|
13
|
+
|
|
14
|
+
return LRTGemiusPlugin[prop]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
repositories {
|
|
18
|
+
google()
|
|
19
|
+
mavenCentral()
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
dependencies {
|
|
23
|
+
classpath "com.android.tools.build:gradle:8.7.2"
|
|
24
|
+
// noinspection DifferentKotlinGradleVersion
|
|
25
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
|
26
|
+
}
|
|
20
27
|
}
|
|
21
28
|
|
|
22
|
-
apply plugin: 'com.android.library'
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L5-L9
|
|
27
|
-
def DEFAULT_COMPILE_SDK_VERSION = 36
|
|
28
|
-
def DEFAULT_BUILD_TOOLS_VERSION = "36.0.0"
|
|
29
|
-
def DEFAULT_MIN_SDK_VERSION = 24
|
|
30
|
-
def DEFAULT_TARGET_SDK_VERSION = 36
|
|
30
|
+
apply plugin: "com.android.library"
|
|
31
|
+
apply plugin: "kotlin-android"
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
|
|
34
|
-
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
|
|
35
|
-
defaultConfig {
|
|
36
|
-
minSdkVersion safeExtGet('minSdkVersion', DEFAULT_MIN_SDK_VERSION)
|
|
37
|
-
targetSdkVersion safeExtGet('targetSdkVersion', DEFAULT_TARGET_SDK_VERSION)
|
|
38
|
-
versionCode 15
|
|
39
|
-
versionName "1.5"
|
|
40
|
-
}
|
|
33
|
+
apply plugin: "com.facebook.react"
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
35
|
+
repositories {
|
|
36
|
+
maven { url 'https://developer.huawei.com/repo/' }
|
|
45
37
|
}
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
url 'https://mobilesdk.gemius.com/releases/'
|
|
39
|
+
android {
|
|
40
|
+
namespace "com.gemiusplugin"
|
|
41
|
+
|
|
42
|
+
compileSdkVersion getExtOrDefault("compileSdkVersion")
|
|
43
|
+
|
|
44
|
+
defaultConfig {
|
|
45
|
+
minSdkVersion getExtOrDefault("minSdkVersion")
|
|
46
|
+
targetSdkVersion getExtOrDefault("targetSdkVersion")
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
buildFeatures {
|
|
50
|
+
buildConfig true
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
buildTypes {
|
|
54
|
+
release {
|
|
55
|
+
minifyEnabled false
|
|
65
56
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
lint {
|
|
60
|
+
disable "GradleCompatible"
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
compileOptions {
|
|
64
|
+
sourceCompatibility JavaVersion.VERSION_1_8
|
|
65
|
+
targetCompatibility JavaVersion.VERSION_1_8
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
dependencies {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
70
|
+
implementation "com.facebook.react:react-android"
|
|
71
|
+
|
|
72
|
+
// Gemius SDK (local AAR)
|
|
73
|
+
implementation files('libs/mobile-sdk-2.3.0.aar')
|
|
74
|
+
|
|
75
|
+
// Gemius SDK transitive dependencies
|
|
76
|
+
implementation "com.huawei.hms:ads-identifier:3.4.58.301"
|
|
77
|
+
implementation "com.google.code.gson:gson:2.11.0"
|
|
78
|
+
implementation "com.google.android.gms:play-services-base:18.7.2"
|
|
79
|
+
implementation "com.google.android.gms:play-services-ads:24.5.0"
|
|
80
|
+
implementation "com.google.android.gms:play-services-appset:16.1.0"
|
|
81
|
+
implementation "androidx.core:core:1.17.0"
|
|
82
|
+
implementation "androidx.preference:preference:1.2.1"
|
|
83
|
+
implementation "androidx.lifecycle:lifecycle-process:2.9.1"
|
|
84
|
+
implementation "com.squareup.retrofit2:retrofit:2.11.0"
|
|
85
|
+
implementation "com.squareup.retrofit2:converter-scalars:2.11.0"
|
|
86
|
+
implementation "com.squareup.okhttp3:logging-interceptor:4.12.0"
|
|
87
|
+
implementation "ch.acra:acra-http:5.7.0"
|
|
83
88
|
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
package com.gemiusplugin
|
|
2
|
+
|
|
3
|
+
import android.os.Handler
|
|
4
|
+
import android.os.Looper
|
|
5
|
+
import android.util.Log
|
|
6
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
7
|
+
import com.facebook.react.bridge.ReadableMap
|
|
8
|
+
import com.facebook.react.bridge.ReadableType
|
|
9
|
+
import com.gemius.sdk.Config
|
|
10
|
+
import com.gemius.sdk.audience.AudienceConfig
|
|
11
|
+
import com.gemius.sdk.audience.AudienceEvent
|
|
12
|
+
import com.gemius.sdk.audience.BaseEvent
|
|
13
|
+
import com.gemius.sdk.stream.EventProgramData
|
|
14
|
+
import com.gemius.sdk.stream.Player
|
|
15
|
+
import com.gemius.sdk.stream.PlayerData
|
|
16
|
+
import com.gemius.sdk.stream.ProgramData
|
|
17
|
+
|
|
18
|
+
class LRTGemiusPluginModule(private val reactContext: ReactApplicationContext) :
|
|
19
|
+
NativeLRTGemiusPluginSpec(reactContext) {
|
|
20
|
+
|
|
21
|
+
private var player: Player? = null
|
|
22
|
+
|
|
23
|
+
companion object {
|
|
24
|
+
const val TAG = "LRTGemiusPlugin"
|
|
25
|
+
const val NAME = NativeLRTGemiusPluginSpec.NAME
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
override fun setAppInfo(
|
|
29
|
+
app: String,
|
|
30
|
+
version: String,
|
|
31
|
+
gemiusHitCollectorHost: String,
|
|
32
|
+
gemiusPrismIdentifier: String,
|
|
33
|
+
) {
|
|
34
|
+
Log.i(TAG, "Setting app info: app[$app] version[$version]")
|
|
35
|
+
Config.setAppInfo(app, version)
|
|
36
|
+
AudienceConfig.getSingleton().setHitCollectorHost(gemiusHitCollectorHost)
|
|
37
|
+
AudienceConfig.getSingleton().setScriptIdentifier(gemiusPrismIdentifier)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
override fun setPlayerInfo(playerId: String, serverHost: String, accountId: String) {
|
|
41
|
+
Log.w(TAG, "Initialising player...")
|
|
42
|
+
if (player == null) {
|
|
43
|
+
player = Player(playerId, serverHost, accountId, PlayerData())
|
|
44
|
+
player!!.setContext(reactContext)
|
|
45
|
+
} else {
|
|
46
|
+
Log.w(TAG, "Player already initialised")
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
override fun setProgramData(clipId: String, name: String, duration: Double, type: String) {
|
|
51
|
+
val durationInt = duration.toInt()
|
|
52
|
+
Log.d(TAG, "Setting new program data for '$name'")
|
|
53
|
+
val programData = ProgramData()
|
|
54
|
+
programData.setName(name)
|
|
55
|
+
programData.setDuration(durationInt)
|
|
56
|
+
if (type == "audio") {
|
|
57
|
+
programData.setProgramType(ProgramData.ProgramType.AUDIO)
|
|
58
|
+
} else {
|
|
59
|
+
programData.setProgramType(ProgramData.ProgramType.VIDEO)
|
|
60
|
+
}
|
|
61
|
+
player?.newProgram(clipId, programData)
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
override fun sendPlay(clipId: String, offset: Double) {
|
|
65
|
+
val offsetInt = offset.toInt()
|
|
66
|
+
Log.d(TAG, "Player PLAY event for '$clipId' offset: $offsetInt")
|
|
67
|
+
val eventProgramData = EventProgramData()
|
|
68
|
+
eventProgramData.setAutoPlay(true)
|
|
69
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.PLAY, eventProgramData)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
override fun sendPause(clipId: String, offset: Double) {
|
|
73
|
+
val offsetInt = offset.toInt()
|
|
74
|
+
Log.d(TAG, "Player PAUSE event for '$clipId' offset: $offsetInt")
|
|
75
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.PAUSE, EventProgramData())
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
override fun sendStop(clipId: String, offset: Double) {
|
|
79
|
+
val offsetInt = offset.toInt()
|
|
80
|
+
Log.d(TAG, "Player STOP event for '$clipId' offset: $offsetInt")
|
|
81
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.STOP, EventProgramData())
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
override fun sendBuffer(clipId: String, offset: Double) {
|
|
85
|
+
val offsetInt = offset.toInt()
|
|
86
|
+
Log.d(TAG, "Player BUFFER event for '$clipId' offset: $offsetInt")
|
|
87
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.BUFFER, EventProgramData())
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
override fun sendClose(clipId: String, offset: Double) {
|
|
91
|
+
val offsetInt = offset.toInt()
|
|
92
|
+
Log.d(TAG, "Player CLOSE event for '$clipId' offset: $offsetInt")
|
|
93
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.CLOSE, EventProgramData())
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
override fun sendSeek(clipId: String, offset: Double) {
|
|
97
|
+
val offsetInt = offset.toInt()
|
|
98
|
+
Log.d(TAG, "Player SEEK event for '$clipId' offset: $offsetInt")
|
|
99
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.SEEK, EventProgramData())
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
override fun sendComplete(clipId: String, offset: Double) {
|
|
103
|
+
val offsetInt = offset.toInt()
|
|
104
|
+
Log.d(TAG, "Player COMPLETE event for '$clipId' offset: $offsetInt")
|
|
105
|
+
player?.programEvent(clipId, offsetInt, Player.EventType.COMPLETE, EventProgramData())
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
override fun sendPageViewedEvent(gemiusPrismIdentifier: String, extraParameters: ReadableMap?) {
|
|
109
|
+
Log.d(TAG, "sendPageViewedEvent() called.")
|
|
110
|
+
Handler(Looper.getMainLooper()).post {
|
|
111
|
+
val event = AudienceEvent(reactContext)
|
|
112
|
+
event.setScriptIdentifier(gemiusPrismIdentifier)
|
|
113
|
+
event.setEventType(BaseEvent.EventType.FULL_PAGEVIEW)
|
|
114
|
+
addParamsToEvent(event, extraParameters)
|
|
115
|
+
event.sendEvent()
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
override fun sendPartialPageViewedEvent(
|
|
120
|
+
gemiusPrismIdentifier: String,
|
|
121
|
+
extraParameters: ReadableMap?,
|
|
122
|
+
) {
|
|
123
|
+
Log.d(TAG, "sendPartialPageViewedEvent() called.")
|
|
124
|
+
Handler(Looper.getMainLooper()).post {
|
|
125
|
+
val event = AudienceEvent(reactContext)
|
|
126
|
+
event.setScriptIdentifier(gemiusPrismIdentifier)
|
|
127
|
+
event.setEventType(BaseEvent.EventType.PARTIAL_PAGEVIEW)
|
|
128
|
+
addParamsToEvent(event, extraParameters)
|
|
129
|
+
event.sendEvent()
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
override fun sendActionEvent(gemiusPrismIdentifier: String, extraParameters: ReadableMap?) {
|
|
134
|
+
Log.d(TAG, "sendActionEvent() called.")
|
|
135
|
+
Handler(Looper.getMainLooper()).post {
|
|
136
|
+
val event = AudienceEvent(reactContext)
|
|
137
|
+
event.setScriptIdentifier(gemiusPrismIdentifier)
|
|
138
|
+
event.setEventType(BaseEvent.EventType.ACTION)
|
|
139
|
+
addParamsToEvent(event, extraParameters)
|
|
140
|
+
event.sendEvent()
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
private fun addParamsToEvent(event: BaseEvent, paramsMap: ReadableMap?) {
|
|
145
|
+
paramsMap?.let {
|
|
146
|
+
val iterator = it.keySetIterator()
|
|
147
|
+
while (iterator.hasNextKey()) {
|
|
148
|
+
val key = iterator.nextKey()
|
|
149
|
+
val value = when (it.getType(key)) {
|
|
150
|
+
ReadableType.Number -> {
|
|
151
|
+
val d = it.getDouble(key)
|
|
152
|
+
if (d == Math.floor(d)) d.toLong().toString() else d.toString()
|
|
153
|
+
}
|
|
154
|
+
ReadableType.Boolean -> it.getBoolean(key).toString()
|
|
155
|
+
else -> it.getString(key) ?: ""
|
|
156
|
+
}
|
|
157
|
+
event.addExtraParameter(key, value)
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
package com.gemiusplugin
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.BaseReactPackage
|
|
4
|
+
import com.facebook.react.bridge.NativeModule
|
|
5
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
6
|
+
import com.facebook.react.module.model.ReactModuleInfo
|
|
7
|
+
import com.facebook.react.module.model.ReactModuleInfoProvider
|
|
8
|
+
import java.util.HashMap
|
|
9
|
+
|
|
10
|
+
class LRTGemiusPluginPackage : BaseReactPackage() {
|
|
11
|
+
override fun getModule(name: String, reactContext: ReactApplicationContext): NativeModule? {
|
|
12
|
+
return if (name == LRTGemiusPluginModule.NAME) {
|
|
13
|
+
LRTGemiusPluginModule(reactContext)
|
|
14
|
+
} else {
|
|
15
|
+
null
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
override fun getReactModuleInfoProvider() = ReactModuleInfoProvider {
|
|
20
|
+
mapOf(
|
|
21
|
+
LRTGemiusPluginModule.NAME to ReactModuleInfo(
|
|
22
|
+
name = LRTGemiusPluginModule.NAME,
|
|
23
|
+
className = LRTGemiusPluginModule.NAME,
|
|
24
|
+
canOverrideExistingModule = false,
|
|
25
|
+
needsEagerInit = false,
|
|
26
|
+
isCxxModule = false,
|
|
27
|
+
isTurboModule = true
|
|
28
|
+
)
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -5,31 +5,35 @@
|
|
|
5
5
|
<key>AvailableLibraries</key>
|
|
6
6
|
<array>
|
|
7
7
|
<dict>
|
|
8
|
+
<key>BinaryPath</key>
|
|
9
|
+
<string>GemiusSDK.framework/GemiusSDK</string>
|
|
8
10
|
<key>LibraryIdentifier</key>
|
|
9
|
-
<string>ios-
|
|
11
|
+
<string>ios-arm64</string>
|
|
10
12
|
<key>LibraryPath</key>
|
|
11
13
|
<string>GemiusSDK.framework</string>
|
|
12
14
|
<key>SupportedArchitectures</key>
|
|
13
15
|
<array>
|
|
14
16
|
<string>arm64</string>
|
|
15
|
-
<string>x86_64</string>
|
|
16
17
|
</array>
|
|
17
18
|
<key>SupportedPlatform</key>
|
|
18
19
|
<string>ios</string>
|
|
19
|
-
<key>SupportedPlatformVariant</key>
|
|
20
|
-
<string>simulator</string>
|
|
21
20
|
</dict>
|
|
22
21
|
<dict>
|
|
22
|
+
<key>BinaryPath</key>
|
|
23
|
+
<string>GemiusSDK.framework/GemiusSDK</string>
|
|
23
24
|
<key>LibraryIdentifier</key>
|
|
24
|
-
<string>ios-
|
|
25
|
+
<string>ios-arm64_x86_64-simulator</string>
|
|
25
26
|
<key>LibraryPath</key>
|
|
26
27
|
<string>GemiusSDK.framework</string>
|
|
27
28
|
<key>SupportedArchitectures</key>
|
|
28
29
|
<array>
|
|
29
30
|
<string>arm64</string>
|
|
31
|
+
<string>x86_64</string>
|
|
30
32
|
</array>
|
|
31
33
|
<key>SupportedPlatform</key>
|
|
32
34
|
<string>ios</string>
|
|
35
|
+
<key>SupportedPlatformVariant</key>
|
|
36
|
+
<string>simulator</string>
|
|
33
37
|
</dict>
|
|
34
38
|
</array>
|
|
35
39
|
<key>CFBundlePackageType</key>
|
|
Binary file
|
|
@@ -8,18 +8,37 @@
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
|
|
10
10
|
#define GEM_SDK_NAME @"GemiusSDK"
|
|
11
|
-
#define GEM_SDK_VERSION @"2.0
|
|
11
|
+
#define GEM_SDK_VERSION @"2.3.0"
|
|
12
|
+
|
|
13
|
+
typedef NS_ENUM(NSUInteger, GEMDataProcessingConsentSource) {
|
|
14
|
+
GEMDataProcessingConsentSourceManual = 0,
|
|
15
|
+
GEMDataProcessingConsentSourceCMP,
|
|
16
|
+
GEMDataProcessingConsentSourceTCString,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
FOUNDATION_EXPORT NSNotificationName const GEMUserAgentDidChangeNotification;
|
|
12
22
|
|
|
13
23
|
@interface GEMConfig : NSObject
|
|
14
24
|
|
|
15
25
|
@property (nonatomic) BOOL loggingEnabled;
|
|
16
26
|
@property (nonatomic) BOOL cookiesAllowed;
|
|
17
27
|
@property (nonatomic) BOOL IDFACollectionEnabled;
|
|
28
|
+
@property (nonatomic) GEMDataProcessingConsentSource dataProcessingConsentSource;
|
|
29
|
+
@property (nonatomic) NSTimeInterval cmpTimeout;
|
|
30
|
+
@property (nonatomic, copy) NSSet<NSNumber *> *audiencePurposes;
|
|
31
|
+
@property (nonatomic, copy) NSSet<NSNumber *> *adOceanPurposes;
|
|
18
32
|
|
|
19
33
|
+ (GEMConfig *)sharedInstance;
|
|
20
34
|
+ (NSString *)getSdkVersion;
|
|
21
35
|
|
|
22
|
-
- (void)setAppInfo:(NSString*)name version:(NSString*)version;
|
|
36
|
+
- (void)setAppInfo:(NSString *)name version:(NSString *)version;
|
|
37
|
+
- (void)setTCString:(nullable NSString *)tcString gdprApplies:(BOOL)gdprApplies;
|
|
23
38
|
- (NSString *)getUA4WebView;
|
|
39
|
+
- (void)restoreAudiencePurposes;
|
|
40
|
+
- (void)restoreAdOceanPurposes;
|
|
24
41
|
|
|
25
42
|
@end
|
|
43
|
+
|
|
44
|
+
NS_ASSUME_NONNULL_END
|
|
Binary file
|
package/ios/Frameworks/GemiusSDK.xcframework/ios-arm64/GemiusSDK.framework/PrivacyInfo.xcprivacy
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>NSPrivacyTracking</key>
|
|
6
|
+
<false/>
|
|
7
|
+
<key>NSPrivacyTrackingDomains</key>
|
|
8
|
+
<array/>
|
|
9
|
+
<key>NSPrivacyCollectedDataTypes</key>
|
|
10
|
+
<array>
|
|
11
|
+
<dict>
|
|
12
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
13
|
+
<string>NSPrivacyCollectedDataTypeDeviceID</string>
|
|
14
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
15
|
+
<false/>
|
|
16
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
17
|
+
<false/>
|
|
18
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
19
|
+
<array>
|
|
20
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
21
|
+
</array>
|
|
22
|
+
</dict>
|
|
23
|
+
<dict>
|
|
24
|
+
<key>NSPrivacyCollectedDataType</key>
|
|
25
|
+
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
|
|
26
|
+
<key>NSPrivacyCollectedDataTypeLinked</key>
|
|
27
|
+
<false/>
|
|
28
|
+
<key>NSPrivacyCollectedDataTypeTracking</key>
|
|
29
|
+
<false/>
|
|
30
|
+
<key>NSPrivacyCollectedDataTypePurposes</key>
|
|
31
|
+
<array>
|
|
32
|
+
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
|
|
33
|
+
</array>
|
|
34
|
+
</dict>
|
|
35
|
+
</array>
|
|
36
|
+
<key>NSPrivacyAccessedAPITypes</key>
|
|
37
|
+
<array>
|
|
38
|
+
<dict>
|
|
39
|
+
<key>NSPrivacyAccessedAPIType</key>
|
|
40
|
+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
|
41
|
+
<key>NSPrivacyAccessedAPITypeReasons</key>
|
|
42
|
+
<array>
|
|
43
|
+
<string>CA92.1</string>
|
|
44
|
+
</array>
|
|
45
|
+
</dict>
|
|
46
|
+
</array>
|
|
47
|
+
</dict>
|
|
48
|
+
</plist>
|
|
Binary file
|
|
@@ -8,18 +8,37 @@
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
|
|
10
10
|
#define GEM_SDK_NAME @"GemiusSDK"
|
|
11
|
-
#define GEM_SDK_VERSION @"2.0
|
|
11
|
+
#define GEM_SDK_VERSION @"2.3.0"
|
|
12
|
+
|
|
13
|
+
typedef NS_ENUM(NSUInteger, GEMDataProcessingConsentSource) {
|
|
14
|
+
GEMDataProcessingConsentSourceManual = 0,
|
|
15
|
+
GEMDataProcessingConsentSourceCMP,
|
|
16
|
+
GEMDataProcessingConsentSourceTCString,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
FOUNDATION_EXPORT NSNotificationName const GEMUserAgentDidChangeNotification;
|
|
12
22
|
|
|
13
23
|
@interface GEMConfig : NSObject
|
|
14
24
|
|
|
15
25
|
@property (nonatomic) BOOL loggingEnabled;
|
|
16
26
|
@property (nonatomic) BOOL cookiesAllowed;
|
|
17
27
|
@property (nonatomic) BOOL IDFACollectionEnabled;
|
|
28
|
+
@property (nonatomic) GEMDataProcessingConsentSource dataProcessingConsentSource;
|
|
29
|
+
@property (nonatomic) NSTimeInterval cmpTimeout;
|
|
30
|
+
@property (nonatomic, copy) NSSet<NSNumber *> *audiencePurposes;
|
|
31
|
+
@property (nonatomic, copy) NSSet<NSNumber *> *adOceanPurposes;
|
|
18
32
|
|
|
19
33
|
+ (GEMConfig *)sharedInstance;
|
|
20
34
|
+ (NSString *)getSdkVersion;
|
|
21
35
|
|
|
22
|
-
- (void)setAppInfo:(NSString*)name version:(NSString*)version;
|
|
36
|
+
- (void)setAppInfo:(NSString *)name version:(NSString *)version;
|
|
37
|
+
- (void)setTCString:(nullable NSString *)tcString gdprApplies:(BOOL)gdprApplies;
|
|
23
38
|
- (NSString *)getUA4WebView;
|
|
39
|
+
- (void)restoreAudiencePurposes;
|
|
40
|
+
- (void)restoreAdOceanPurposes;
|
|
24
41
|
|
|
25
42
|
@end
|
|
43
|
+
|
|
44
|
+
NS_ASSUME_NONNULL_END
|
|
Binary file
|