Skip to content

Commit

Permalink
fix header
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Oct 20, 2023
1 parent 0e4b8f0 commit d77d760
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions binding/ios/Rhino.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ public class Rhino {
"Endpoint duration value '\(endpointDurationSec)' is not a floating-point value between [0.5, 5.0]")
}

pv_set_sdk(Rhino.sdk)

var status = pv_rhino_init(
accessKey,
modelPathArg,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class RhinoModule extends ReactContextBaseJavaModule {
public RhinoModule(ReactApplicationContext reactContext) {
super(reactContext);
this.reactContext = reactContext;

Rhino.setSdk("react-native");
}

@Override
Expand Down
5 changes: 5 additions & 0 deletions binding/react-native/ios/Rhino.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class PvRhino: NSObject {

private var rhinoPool: [String: Rhino] = [:]

override init() {
super.init()
Rhino.setSdk(sdk: "react-native")
}

@objc(create:modelPath:contextPath:sensitivity:endpointDurationSec:requireEndpoint:resolver:rejecter:)
func create(
accessKey: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ PV_API pv_status_t pv_get_error_stack(
*/
PV_API void pv_free_error_stack(char **message_stack);

PV_API void pv_set_sdk(const char *sdk);

#ifdef __cplusplus
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ PV_API pv_status_t pv_get_error_stack(
*/
PV_API void pv_free_error_stack(char **message_stack);

PV_API void pv_set_sdk(const char *sdk);

#ifdef __cplusplus
}

Expand Down

0 comments on commit d77d760

Please sign in to comment.