@sency/react-native-smkit-ui 2.2.0 → 2.2.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.
@@ -95,7 +95,7 @@ dependencies {
95
95
  implementation "com.facebook.react:react-android"
96
96
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
97
97
 
98
- implementation("com.sency.smkitui:smkitui:1.6.2") {
98
+ implementation("com.sency.smkitui:smkitui:1.6.3") {
99
99
  exclude group: 'com.facebook.fbjni', module: 'fbjni-java-only'
100
100
  // // Don't exclude native libraries
101
101
  // exclude group: 'com.facebook.react', module: 'react-native'
@@ -66,6 +66,8 @@ class SMKitUIManager: NSObject, RCTBridgeModule {
66
66
  var didFail = false
67
67
  // RN SDK policy: do not wait for first activity before starting exercise timer.
68
68
  SMKitUIModel.startTimerOnFirstActivity = false
69
+ // RN SDK policy: keep Jinni wake-word / orb features internal — never enabled from RN.
70
+ SMKitUIModel.alwaysOnJinniWakeWordDuringWorkout = false
69
71
  SMKitUIModel.configure(authKey: "\(key)", includesHighlights: false, onSuccess: {
70
72
  if !isConfigDone {
71
73
  isConfigDone = true
@@ -151,6 +153,7 @@ class SMKitUIManager: NSObject, RCTBridgeModule {
151
153
  do {
152
154
  let json = try self.stringJsonToDic(stringJSON: rawJson)
153
155
  let workout = try SMWorkout(FromJson: json)
156
+ self.sanitizeInternalFlags(workout)
154
157
  let (finalModifications, showPhoneCalibration) = self.processModifications(modifications)
155
158
  try SMKitUIModel.startWorkout(viewController: smkitUIViewController, workout: workout, delegate: self, modifications: finalModifications, showPhoneCalibration: showPhoneCalibration)
156
159
  } catch {
@@ -174,6 +177,7 @@ class SMKitUIManager: NSObject, RCTBridgeModule {
174
177
  let user = try self.getUserData(rawJson: userData)
175
178
  let json = try self.stringJsonToDic(stringJSON: rawJson)
176
179
  let assessment = try SMWorkoutAssessment.initFromJSON(json)
180
+ self.sanitizeInternalFlags(assessment)
177
181
  let (finalModifications, showPhoneCalibration) = self.processModifications(modifications)
178
182
  try SMKitUIModel.startCustomAssessment(viewController: smkitUIViewController, assessment: assessment, userData: user, forceShowUserDataScreen: forceShowUserDataScreen, showSummary: showSummary, delegate: self, onFailure: { error in
179
183
  onWorkoutFailed("startCustomAssessment Failed", error.localizedDescription, error)
@@ -228,7 +232,8 @@ class SMKitUIManager: NSObject, RCTBridgeModule {
228
232
  difficultyLevel: difficultyLevel,
229
233
  workoutDuration: workoutDuration,
230
234
  language: language,
231
- programID: programID
235
+ programID: programID,
236
+ shortIntro: false
232
237
  )
233
238
 
234
239
  SMKitUIModel.startWorkoutFromProgram(viewController: smkitUIViewController, workoutConfig: config, delegate: self, onFailure: { error in
@@ -455,6 +460,17 @@ class SMKitUIManager: NSObject, RCTBridgeModule {
455
460
  }
456
461
  }
457
462
 
463
+ /// Force-disable SDK features that are intentionally not exposed through the RN bridge.
464
+ /// Applies to any per-exercise flags that consumers might smuggle in through raw workout JSON.
465
+ private func sanitizeInternalFlags(_ workout: SMWorkout) {
466
+ workout.exercises?.forEach { ex in
467
+ ex.shortIntro = false
468
+ ex.adaptiveRomFeedbackEnabled = false
469
+ ex.adaptiveRomWarmupReps = 2
470
+ ex.guidanceVideoSegments = nil
471
+ }
472
+ }
473
+
458
474
  private func stringJsonToDic(stringJSON: String) throws -> [String: Any] {
459
475
  guard let data = stringJSON.data(using: .utf8),
460
476
  let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sency/react-native-smkit-ui",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "React Native library for SMKit UI - Advanced fitness assessments and workout programs with AI-powered motion detection and real-time performance tracking",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -15,9 +15,9 @@ Pod::Spec.new do |s|
15
15
  s.source = { :git => "https://github.com/sency-ai/smkit-ui-react-native-demo.git", :tag => "#{s.version}" }
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
- s.dependency "SMKitUI", "= 1.6.5"
18
+ s.dependency "SMKitUI", "= 1.8.2"
19
19
  # Required so the bridge can reference InstructionVideoConfig and VideoDisplayMode (defined in SMKit).
20
- s.dependency "SMKit", "= 1.6.5"
20
+ s.dependency "SMKit", "= 1.8.2"
21
21
 
22
22
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
23
23
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.