Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

+[SEGAnalytics sharedAnalytics]() crash with recordScreenViews set to true #1044

Open
Ophenix opened this issue Sep 27, 2022 · 0 comments
Open

Comments

@Ophenix
Copy link

Ophenix commented Sep 27, 2022

Hey!
When setting recordScreenViews to true I get a crash:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'library must be initialized before calling this method.'
terminating with uncaught exception of type NSException

Oddly enough, this doesn't happen if I set recordScreenViews to false

Using SDK ver 4.1.6.

Terminal data:
2022-09-27 17:39:06.423347-0400 HotDrop[12589:314```
3147] *** Assertion failure in +SEGAnalytics sharedAnalytics, SEGAnalytics.m:539
2022-09-27 17:39:06.426428-0400 HotDrop[12589:3143147] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'library must be initialized before calling this method.'
*** First throw call stack:
(0x1ab3e2248 0x1a47afa68 0x1a5d6e958 0x10410ae04 0x104126bd0 0x1ad573714 0x1ad78c650 0x1ad78c4c8 0x1ad78be54 0x1ad70a958 0x1ad70a88c 0x1ad70a798 0x1ad5a56c0 0x1ad9afd70 0x1ab46a070 0x1ab3f2690 0x1ab453f8c 0x1ab4591e4 0x1e4279368 0x1ad908d88 0x1ad9089ec 0x102752d2c 0x1c977d948)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'library must be initialized before calling this method.'
terminating with uncaught exception of type NSException


Initialization:

private var segmentAnalytics: Segment.Analytics

init() {
    let configuration = AnalyticsConfiguration(writeKey: "LEpqwT3XWqyyM1013wWsYF7x8HlNEFHl")
    configuration.trackApplicationLifecycleEvents = true
    configuration.recordScreenViews = true
    segmentAnalytics =  Segment.Analytics(configuration: configuration)
}

@Ophenix Ophenix changed the title +[SEGAnalytics sharedAnalytics]() crash with recordScreenViews +[SEGAnalytics sharedAnalytics]() crash with recordScreenViews set to true Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant