-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: manual start/stop session recording (#276)
* chore: add swiftformat config * fix: avoid registering for notifications multiple times * feat: add session replay automatic start config * fix: capture timestamp along with snapshot events * feat: add start/stop session recording and refactor session manager * fix(ci): use Xcode 16 for unit testing * fix(ci): switch to macos-14 for tests * fix(ci): tests * fix: remove start mode from session replay config * fix: use timestamp at time of checking as the new session timestamp * feat: capture session id on network request start * fix: get session id only after snapshot is generated * fix: don't process $snapshot if session id is missing * fix: remove todo * chore: update CHANGELOG * fix(ci): use latest-stable Xcode version * feat: additional checks on react native * fix: lint * fix: remove didFinishLaunching notification * fix: tests * chore(ci): build examples on latest macos
Showing
31 changed files
with
1,330 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--acronyms ID,URL,UUID | ||
--allman false | ||
--anonymousforeach convert | ||
--assetliterals visual-width | ||
--asynccapturing | ||
--beforemarks | ||
--binarygrouping none | ||
--callsiteparen default | ||
--categorymark "MARK: %c" | ||
--classthreshold 0 | ||
--closingparen balanced | ||
--closurevoid remove | ||
--commas always | ||
--complexattrs preserve | ||
--computedvarattrs preserve | ||
--condassignment after-property | ||
--conflictmarkers reject | ||
--dateformat system | ||
--decimalgrouping ignore | ||
--doccomments before-declarations | ||
--elseposition same-line | ||
--emptybraces no-space | ||
--enumnamespaces always | ||
--enumthreshold 0 | ||
--exponentcase lowercase | ||
--exponentgrouping disabled | ||
--extensionacl on-extension | ||
--extensionlength 0 | ||
--extensionmark "MARK: - %t + %c" | ||
--fractiongrouping disabled | ||
--fragment false | ||
--funcattributes preserve | ||
--generictypes | ||
--groupedextension "MARK: %c" | ||
--guardelse auto | ||
--header ignore | ||
--hexgrouping 4,8 | ||
--hexliteralcase uppercase | ||
--ifdef indent | ||
--importgrouping alpha | ||
--indent 4 | ||
--indentcase false | ||
--indentstrings false | ||
--initcodernil false | ||
--lifecycle | ||
--lineaftermarks true | ||
--linebreaks lf | ||
--markcategories true | ||
--markextensions always | ||
--marktypes always | ||
--maxwidth none | ||
--modifierorder | ||
--nevertrailing | ||
--nilinit remove | ||
--noncomplexattrs | ||
--nospaceoperators | ||
--nowrapoperators | ||
--octalgrouping none | ||
--onelineforeach ignore | ||
--operatorfunc spaced | ||
--organizationmode visibility | ||
--organizetypes actor,class,enum,struct | ||
--patternlet hoist | ||
--ranges spaced | ||
--redundanttype infer-locals-only | ||
--self remove | ||
--selfrequired | ||
--semicolons never | ||
--shortoptionals except-properties | ||
--smarttabs enabled | ||
--someany true | ||
--storedvarattrs preserve | ||
--stripunusedargs always | ||
--structthreshold 0 | ||
--tabwidth unspecified | ||
--throwcapturing | ||
--timezone system | ||
--trailingclosures | ||
--trimwhitespace always | ||
--typeattributes preserve | ||
--typeblanklines remove | ||
--typedelimiter space-after | ||
--typemark "MARK: - %t" | ||
--voidtype void | ||
--wraparguments preserve | ||
--wrapcollections preserve | ||
--wrapconditions preserve | ||
--wrapeffects preserve | ||
--wrapenumcases always | ||
--wrapparameters default | ||
--wrapreturntype preserve | ||
--wrapternary default | ||
--wraptypealiases preserve | ||
--xcodeindentation disabled | ||
--yodaswap always | ||
--hexgrouping ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// DI.swift | ||
// PostHog | ||
// | ||
// Created by Yiannis Josephides on 17/12/2024. | ||
// | ||
|
||
// swiftlint:disable:next type_name | ||
enum DI { | ||
static var main = Container() | ||
|
||
final class Container { | ||
lazy var appLifecyclePublisher: AppLifecyclePublishing = ApplicationLifecyclePublisher.shared | ||
lazy var sessionManager: PostHogSessionManager = .init() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.