Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Sep 18, 2024
1 parent 58fe0f2 commit 43732e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/PosthogReactNativeSessionReplay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class PosthogReactNativeSessionReplay: NSObject {
let host = sdkOptions["host"] as? String ?? PostHogConfig.defaultHost
let debug = sdkOptions["debug"] as? Bool ?? false

PostHogSessionManager.shared.startSession(sessionId)
PostHogSessionManager.shared.setSessionId(sessionId)

let config = PostHogConfig(apiKey: apiKey, host: host)
config.sessionReplay = true
Expand All @@ -30,7 +30,7 @@ class PosthogReactNativeSessionReplay: NSObject {

@objc(startSession:withResolver:withRejecter:)
func startSession(sessionId: String, resolve:RCTPromiseResolveBlock,reject:RCTPromiseRejectBlock) -> Void {
PostHogSessionManager.shared.startSession(sessionId)
PostHogSessionManager.shared.setSessionId(sessionId)
PostHogSDK.shared.startSession()
resolve(nil)
}
Expand Down

0 comments on commit 43732e0

Please sign in to comment.