Skip to content

Commit

Permalink
Update names
Browse files Browse the repository at this point in the history
  • Loading branch information
mfclarke-cnx committed Feb 6, 2024
1 parent 94bdc35 commit 6355178
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions PostHog/PostHogSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -696,16 +696,16 @@ private let sessionChangeThreshold: TimeInterval = 60 * 30
object: nil)
#elseif os(macOS)
defaultCenter.addObserver(self,
selector: #selector(handleAppOpened),
selector: #selector(handleAppDidFinishLaunching),
name: NSApplication.didFinishLaunchingNotification,
object: nil)
// macOS does not have didEnterBackgroundNotification, so we use didResignActiveNotification
defaultCenter.addObserver(self,
selector: #selector(captureAppBackgrounded),
selector: #selector(handleAppDidEnterBackground),
name: NSApplication.didResignActiveNotification,
object: nil)
defaultCenter.addObserver(self,
selector: #selector(handleAppOpened),
selector: #selector(handleAppDidBecomeActive),
name: NSApplication.didBecomeActiveNotification,
object: nil)
#endif
Expand Down
12 changes: 6 additions & 6 deletions PostHogTests/PostHogSDKTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class PostHogSDKTest: QuickSpec {
it("capture AppInstalled") {
let sut = self.getSut()

sut.handleAppStarted()
sut.handleAppDidBecomeActive()

let events = getBatchedEvents(server)

Expand All @@ -324,7 +324,7 @@ class PostHogSDKTest: QuickSpec {
userDefaults.setValue("1", forKey: "PHGBuildKeyV2")
userDefaults.synchronize()

sut.handleAppStarted()
sut.handleAppDidBecomeActive()

let events = getBatchedEvents(server)

Expand All @@ -344,7 +344,7 @@ class PostHogSDKTest: QuickSpec {
it("capture AppOpenedFromBackground from_background should be false") {
let sut = self.getSut()

sut.handleAppOpened()
sut.handleAppDidBecomeActive()

let events = getBatchedEvents(server)

Expand All @@ -361,8 +361,8 @@ class PostHogSDKTest: QuickSpec {
it("capture AppOpenedFromBackground from_background should be true") {
let sut = self.getSut(flushAt: 2)

sut.handleAppOpened()
sut.handleAppOpened()
sut.handleAppDidBecomeActive()
sut.handleAppDidBecomeActive()

let events = getBatchedEvents(server)

Expand All @@ -379,7 +379,7 @@ class PostHogSDKTest: QuickSpec {
it("capture captureAppOpened") {
let sut = self.getSut()

sut.handleAppOpened()
sut.handleAppDidBecomeActive()

let events = getBatchedEvents(server)

Expand Down

0 comments on commit 6355178

Please sign in to comment.