react-native-sdk-pianoio 0.3.0 → 0.3.2
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/README.md +3 -3
- package/SdkPianoio.podspec +4 -16
- package/android/build.gradle +12 -19
- package/android/gradle.properties +17 -2
- package/android/src/main/java/com/sdkpianoio/SdkPianoioModule.kt +543 -7
- package/android/src/main/java/com/sdkpianoio/SdkPianoioPackage.kt +3 -3
- package/ios/ComposerPianoImpl.swift +247 -0
- package/ios/MyComposerDelegate.swift +79 -206
- package/ios/SdkPianoio.swift +150 -0
- package/ios/SdkPianoioBridge.m +81 -0
- package/ios/services/TokenService.swift +10 -7
- package/lib/commonjs/NativeSdkPianoio.ts +20 -22
- package/lib/commonjs/PianoComposer.js +36 -97
- package/lib/commonjs/PianoComposer.js.map +1 -1
- package/lib/commonjs/debug.js +23 -0
- package/lib/commonjs/debug.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/NativeSdkPianoio.ts +20 -22
- package/lib/module/PianoComposer.js +36 -97
- package/lib/module/PianoComposer.js.map +1 -1
- package/lib/module/debug.js +18 -0
- package/lib/module/debug.js.map +1 -0
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeSdkPianoio.d.ts +9 -20
- package/lib/typescript/commonjs/src/NativeSdkPianoio.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/PianoComposer.d.ts +25 -28
- package/lib/typescript/commonjs/src/PianoComposer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/debug.d.ts +2 -0
- package/lib/typescript/commonjs/src/debug.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeSdkPianoio.d.ts +9 -20
- package/lib/typescript/module/src/NativeSdkPianoio.d.ts.map +1 -1
- package/lib/typescript/module/src/PianoComposer.d.ts +25 -28
- package/lib/typescript/module/src/PianoComposer.d.ts.map +1 -1
- package/lib/typescript/module/src/debug.d.ts +2 -0
- package/lib/typescript/module/src/debug.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +1 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +30 -15
- package/src/NativeSdkPianoio.ts +20 -22
- package/src/PianoComposer.tsx +36 -116
- package/src/debug.ts +19 -0
- package/src/index.tsx +1 -0
- package/ios/ComposerPiano.swift +0 -304
- package/ios/SdkPianoio.h +0 -4
- package/ios/SdkPianoio.mm +0 -283
- package/ios/services/ComposerService.swift +0 -49
package/README.md
CHANGED
@@ -180,12 +180,12 @@ await composer.setUserToken('token123');
|
|
180
180
|
|
181
181
|
---
|
182
182
|
|
183
|
-
### `
|
183
|
+
### `executeExperience()`
|
184
184
|
|
185
185
|
Permette di eseguire l'espèerienza in base ai parametri impostati precedentemente, difatti le SDK ufficiali di piano non permettono di inserire in maniera comoda l'id dell'esperienza da eseguire, ma bisogna inserire il resto dei parametri e del resto se ne occupa il backend di piano.io.
|
186
186
|
|
187
187
|
```ts
|
188
|
-
await composer.
|
188
|
+
await composer.executeExperience();
|
189
189
|
```
|
190
190
|
|
191
191
|
---
|
@@ -256,7 +256,7 @@ await composer.setUrl('https://my.site/article');
|
|
256
256
|
await composer.setUserToken('jwt-token');
|
257
257
|
await composer.setCustomVariable('device', 'mobile');
|
258
258
|
|
259
|
-
await composer.
|
259
|
+
await composer.executeExperience();
|
260
260
|
|
261
261
|
console.log(await composer.toString());
|
262
262
|
```
|
package/SdkPianoio.podspec
CHANGED
@@ -2,7 +2,6 @@ require "json"
|
|
2
2
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
4
4
|
|
5
|
-
|
6
5
|
Pod::Spec.new do |s|
|
7
6
|
s.name = "SdkPianoio"
|
8
7
|
s.version = package["version"]
|
@@ -12,31 +11,20 @@ Pod::Spec.new do |s|
|
|
12
11
|
s.authors = package["author"]
|
13
12
|
|
14
13
|
s.platforms = { :ios => min_ios_version_supported }
|
15
|
-
s.source = { :git => "https://
|
16
|
-
|
14
|
+
s.source = { :git => "https://github.com/HexagonSwiss/hex-react-native-sdk-pianoio.git", :tag => "#{s.version}" }
|
17
15
|
|
18
|
-
s.source_files = "ios/**/*.
|
19
|
-
s.private_header_files = "ios/**/*.h"
|
16
|
+
s.source_files = "ios/**/*.swift", "ios/SdkPianoioBridge.m"
|
20
17
|
|
21
|
-
|
22
|
-
s.pod_target_xcconfig = {
|
23
|
-
'DEFINES_MODULE' => 'YES',
|
24
|
-
"FRAMEWORK_SEARCH_PATHS" => ["$(inherited)", "$(PODS_ROOT)/Headers/Public/SdkPianoio"],
|
25
|
-
"HEADER_SEARCH_PATHS" => ["$(inherited)", "$(PODS_ROOT)/Headers/Public/SdkPianoio"]
|
26
|
-
}
|
27
|
-
end
|
18
|
+
s.swift_version = '5.0'
|
28
19
|
|
29
20
|
s.requires_arc = true
|
30
21
|
|
31
|
-
|
32
|
-
# piano usage
|
33
22
|
s.dependency 'PianoComposer', '2.8.6'
|
34
23
|
s.dependency 'PianoTemplate', '2.8.6'
|
35
24
|
s.dependency 'PianoTemplate.ID', '2.8.6'
|
36
25
|
s.dependency 'PianoOAuth', '2.8.6'
|
37
26
|
|
38
|
-
|
39
|
-
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
27
|
+
|
40
28
|
if respond_to?(:install_modules_dependencies, true)
|
41
29
|
install_modules_dependencies(s)
|
42
30
|
else
|
package/android/build.gradle
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
buildscript {
|
2
|
-
ext.getExtOrDefault = {name ->
|
2
|
+
ext.getExtOrDefault = { name ->
|
3
3
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SdkPianoio_' + name]
|
4
4
|
}
|
5
5
|
|
@@ -10,17 +10,13 @@ buildscript {
|
|
10
10
|
|
11
11
|
dependencies {
|
12
12
|
classpath "com.android.tools.build:gradle:8.7.2"
|
13
|
-
// noinspection DifferentKotlinGradleVersion
|
14
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
15
14
|
}
|
16
15
|
}
|
17
16
|
|
18
|
-
|
19
17
|
apply plugin: "com.android.library"
|
20
18
|
apply plugin: "kotlin-android"
|
21
19
|
|
22
|
-
apply plugin: "com.facebook.react"
|
23
|
-
|
24
20
|
def getExtOrIntegerDefault(name) {
|
25
21
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SdkPianoio_" + name]).toInteger()
|
26
22
|
}
|
@@ -45,11 +41,12 @@ android {
|
|
45
41
|
}
|
46
42
|
}
|
47
43
|
|
48
|
-
|
44
|
+
// ✅ Esplicita i valori direttamente per evitare problemi
|
45
|
+
compileSdkVersion 34
|
49
46
|
|
50
47
|
defaultConfig {
|
51
|
-
minSdkVersion
|
52
|
-
targetSdkVersion
|
48
|
+
minSdkVersion 21
|
49
|
+
targetSdkVersion 34
|
53
50
|
}
|
54
51
|
|
55
52
|
buildFeatures {
|
@@ -82,19 +79,15 @@ android {
|
|
82
79
|
}
|
83
80
|
|
84
81
|
repositories {
|
85
|
-
mavenCentral()
|
86
82
|
google()
|
83
|
+
mavenCentral()
|
84
|
+
maven { url("$rootDir/../node_modules/react-native/android") }
|
87
85
|
}
|
88
86
|
|
89
|
-
def kotlin_version = getExtOrDefault("kotlinVersion")
|
90
|
-
|
91
87
|
dependencies {
|
92
|
-
implementation "
|
93
|
-
implementation "
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
jsRootDir = file("../src/")
|
98
|
-
libraryName = "SdkPianoio"
|
99
|
-
codegenJavaPackageName = "com.sdkpianoio"
|
88
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib:${getExtOrDefault('kotlinVersion')}"
|
89
|
+
implementation "com.facebook.react:react-android" // React Native core
|
90
|
+
implementation "com.facebook.react:react-native"
|
91
|
+
implementation "io.piano.android:composer:2.11.0"
|
92
|
+
implementation "io.piano.android:id:2.11.0"
|
100
93
|
}
|
@@ -1,5 +1,20 @@
|
|
1
|
+
## For more details on how to configure your build environment visit
|
2
|
+
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
3
|
+
#
|
4
|
+
# Specifies the JVM arguments used for the daemon process.
|
5
|
+
# The setting is particularly useful for tweaking memory settings.
|
6
|
+
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
7
|
+
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
8
|
+
#
|
9
|
+
# When configured, Gradle will run in incubating parallel mode.
|
10
|
+
# This option should only be used with decoupled projects. For more details, visit
|
11
|
+
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
12
|
+
# org.gradle.parallel=true
|
13
|
+
#Thu Jul 10 13:17:17 CEST 2025
|
14
|
+
SdkPianoio_compileSdkVersion=35
|
1
15
|
SdkPianoio_kotlinVersion=2.0.21
|
2
16
|
SdkPianoio_minSdkVersion=24
|
3
|
-
SdkPianoio_targetSdkVersion=34
|
4
|
-
SdkPianoio_compileSdkVersion=35
|
5
17
|
SdkPianoio_ndkVersion=27.1.12297006
|
18
|
+
SdkPianoio_targetSdkVersion=34
|
19
|
+
android.enableJetifier=true
|
20
|
+
android.useAndroidX=true
|