The hassle-free way to integrate analytics into any iOS application.

Overview

Developer Feedback Requested: Analytics-Swift Pilot

A pilot release of the new Analytics-Swift library is available at the Analytics-Swift repository. This library is governed by Segment’s First-Access and Beta terms, and should not be used in production scenarios.

During the pilot phase, Segment wants your feedback, contributions, and ideas. If you have requirements or ideas for features for Analytics-Swift and Segment's integration with the Apple platform, let us know.

Analytics

Circle CI Version License codecov Carthage compatible SwiftPM Compatible

analytics-ios is an iOS client for Segment.

Special thanks to Tony Xiao, Lee Hasiuk and Cristian Bica for their contributions to the library!

You can't fix what you can't measure

Analytics helps you measure your users, product, and business. It unlocks insights into your app's funnel, core business metrics, and whether you have product-market fit.

How to get started

  1. Collect analytics data from your app(s).
    • The top 200 Segment companies collect data from 5+ source types (web, mobile, server, CRM, etc.).
  2. Send the data to analytics tools (for example, Google Analytics, Amplitude, Mixpanel).
    • Over 250+ Segment companies send data to eight categories of destinations such as analytics tools, warehouses, email marketing and remarketing systems, session recording, and more.
  3. Explore your data by creating metrics (for example, new signups, retention cohorts, and revenue generation).
    • The best Segment companies use retention cohorts to measure product market fit. Netflix has 70% paid retention after 12 months, 30% after 7 years.

Segment collects analytics data and allows you to send it to more than 250 apps (such as Google Analytics, Mixpanel, Optimizely, Facebook Ads, Slack, Sentry) just by flipping a switch. You only need one Segment code snippet, and you can turn integrations on and off at will, with no additional code. Sign up with Segment today.

Why?

  1. Power all your analytics apps with the same data. Instead of writing code to integrate all of your tools individually, send data to Segment, once.

  2. Install tracking for the last time. We're the last integration you'll ever need to write. You only need to instrument Segment once. Reduce all of your tracking code and advertising tags into a single set of API calls.

  3. Send data from anywhere. Send Segment data from any device, and we'll transform and send it on to any tool.

  4. Query your data in SQL. Slice, dice, and analyze your data in detail with Segment SQL. We'll transform and load your customer behavioral data directly from your apps into Amazon Redshift, Google BigQuery, or Postgres. Save weeks of engineering time by not having to invent your own data warehouse and ETL pipeline.

    For example, you can capture data on any app:

    analytics.track('Order Completed', { price: 99.84 })

    Then, query the resulting data in SQL:

    select * from app.order_completed
    order by price desc

🚀 Startup Program

If you are part of a new startup (<$5M raised, <2 years since founding), we just launched a new startup program for you. You can get a Segment Team plan (up to $25,000 value in Segment credits) for free up to 2 years — apply here!

Installation

Analytics is available through CocoaPods and Carthage.

CocoaPods

pod "Analytics", "3.7.0"

Note: Segment strongly recommends that you use a dynamic framework to manage your project dependencies. If you prefer static libraries, you can add use_modular_headers! or use_frameworks! :linkage => :static in your Podfile. However, you must then manually update all of your dependencies on a regular schedule.

Carthage

github "segmentio/analytics-ios"

Swift Package Manager (SPM)

To add analytics-ios via Swift Package Mangaer, it is possible to add it one of two ways:

Xcode

Xcode Add SPM Package

ChoosePackageRepository

ChoosePackageOptions

Package.swift

import PackageDescription

let package = Package(
    name: "MyApplication",
    dependencies: [
        // Add a package containing Analytics as the name along with the git url
        .package(
            name: "Segment",
            url: "[email protected]:segmentio/analytics-ios.git"
        )
    ],
    targets: [
        name: "MyApplication",
        dependencies: ["Segment"] // Add Analytics as a dependency of your application
    ]
)

Note: Segment recommends that you use Xcode to add your package.

Quickstart

Refer to the Quickstart documentation at https://segment.com/docs/libraries/ios/quickstart.

Documentation

More detailed documentation is available at https://segment.com/docs/libraries/ios.

Comments
  • "officially" support iOS 8 extensions

    hey there,

    iOS 8 enables the ability to develop out of app extensions. the architecture of these extensions make some api unavailable, such as UIApplication.

    it would be nice to define a means for avoiding it's use in the future or just updating the tutorial to explicitly state the install is different.

    here was the issue tracking AFNetworking changes:

    AFNetworking/AFNetworking#2119

    opened by piemonte 26
  • Renaming the module to Analytics was a HUGE oversight

    Renaming the module to Analytics was a HUGE oversight

    This is a 3rd party module, it should not use a generic name like Analytics. The rename has completely sandbagged our project and costed me several hours and counting of wasted time trying to find out how to resolve a namespace conflict with our own internal Analytics class. Something related to the NS_SWIFT_NAME() macro inducing a forced rename from SEGAnalytics to the Analytics type causes the SEGAnalytics class to become completely inaccessible inside our codebase due to our own class having the same type name. Every swift module import syntax & typealias trick in the book does not get around the problem..

    I get that this change was likely not intended to cause this problem, but it was a huge huge mistake. We may have to actually stop using segment over this...

    opened by mlfarrell 22
  • Unable to build the framework

    Unable to build the framework

    I have a fresh checkout of the source, an up to date cocoapods, ran "pod install", and then tried to build the "Analytics.framework" scheme and got the following error.

    fatal error: lipo: fat input file (/Users/jorlow/src/segment-io/DerivedData/Analytics/Build/Products/Release/libAnalytics.a) does not contain the specified architecture (x86_64) to thin it to

    Any idea what's going on or how I can fix it? I saw this with both Xcode 5 and 5.1

    opened by jorlow 22
  • Seeing lockups writing to NSUserDefaults

    Seeing lockups writing to NSUserDefaults

    We are seeing NSUserDefaults locking up for a small number of our users after integrating Segment. One thread is waiting on the mutex for CFPrefsSource, but no other threads seem to have acquired the mutex. This is the only thread writing/reading to NSUserDefaults. Then, if another thread tries to write to NSUserDefaults from the main thread, the app will lock up. Any idea why this call is getting stuck? We can't reproduce it but the users that have the problem have it consistently until we disable segment analytics for them. We assume maybe there is an issue with the data attempting to be written (ex mutable data in the structure?)

    Thread 15: 0 libsystem_kernel.dylib 0x00000001835a7f90 __psynch_mutexwait + 8 1 CoreFoundation 0x0000000183a4260c -[CFPrefsSource setValue:forKey:] + 44 2 CoreFoundation 0x0000000183a41bbc +[CFPrefsSource withSourceForIdentifier:user:byHost:container:perform:] + 836 3 CoreFoundation 0x0000000183a453cc _CFPreferencesSetValueWithContainer + 300 4 Foundation 0x00000001842f1b78 -[NSUserDefaults(NSUserDefaults) setObject:forKey:] + 52 5 ForeFlight 0x00000001010fcba0 -SEGSegmentIntegration persistQueue 6 ForeFlight 0x00000001010fb5c8 -SEGSegmentIntegration queuePayload: 7 ForeFlight 0x00000001010fb4a4 __71-[SEGSegmentIntegration enqueueAction:dictionary:context:integrations:]_block_invoke (SEGSegmentIntegration.m:389) 8 libdispatch.dylib 0x0000000183459630 _dispatch_call_block_and_release + 20 9 libdispatch.dylib 0x00000001834595f0 _dispatch_client_callout + 12 10 libdispatch.dylib 0x0000000183465634 _dispatch_queue_drain + 860 11 libdispatch.dylib 0x000000018345d0f4 _dispatch_queue_invoke + 460 12 libdispatch.dylib 0x00000001834595f0 _dispatch_client_callout + 12 13 libdispatch.dylib 0x0000000183467a88 _dispatch_root_queue_drain + 2136 14 libdispatch.dylib 0x0000000183467224 _dispatch_worker_thread3 + 108 15 libsystem_pthread.dylib 0x000000018366d470 _pthread_wqthread + 1088 16 libsystem_pthread.dylib 0x000000018366d020 start_wqthread + 0

    opened by gestrich 21
  • Custom name/properties for auto screen reporting

    Custom name/properties for auto screen reporting

    What does this PR do?

    Adds the ability to specify a custom name and custom properties during automatic screen reporting.

    Also fixes seg_topViewController() for UITabBarController and custom container view controllers.

    Where should the reviewer start?

    UIViewController.seg_viewDidAppear()

    How should this be manually tested?

    • Create a UIViewController, and conform to the new SEGScreenReporting protocol.
    • Implement seg_trackScreen to override the default screen tracking. Your implementation should call seg_screen with custom values for the screen, properties and/or options arguments.
    • Implement seg_mainViewController to specify which child view controller of a custom container view controller should be referenced when determining the top view controller (seg_topViewController())

    Any background context you want to provide?

    None

    What are the relevant tickets?

    Fixes #654

    Screenshots or screencasts (if UI/UX change)

    No UI/UX change

    Questions:

    • Do the docs need an update?

      Yes

    • Are there any security concerns?

      Not that I'm aware of

    • Do we need to update engineering / success?

      Not sure what this means

    @segmentio/gateway

    opened by humblehacker 20
  • SEGFileStorage dataFromPlist:

    SEGFileStorage dataFromPlist:

    Hi, We're seeing several crashes with the following stack trace:

    #0	(null) in CFGetTypeID ()
    #1	(null) in _CFAppendXML0 ()
    #2	(null) in _CFAppendXML0 ()
    #3	(null) in _CFAppendXML0 ()
    #4	(null) in _CFAppendXML0 ()
    #5	(null) in _CFAppendXML0 ()
    #6	(null) in _CFPropertyListCreateXMLData ()
    #7	(null) in CFPropertyListCreateData ()
    #8	(null) in +[NSPropertyListSerialization dataWithPropertyList:format:options:error:] ()
    #9	0x0000000105539cb8 in -[SEGFileStorage dataFromPlist:] at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGFileStorage.m:149
    #10	0x0000000105539c28 in -[SEGFileStorage setPlist:forKey:] at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGFileStorage.m:140
    #11	0x00000001055399f8 in -[SEGFileStorage setArray:forKey:] at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGFileStorage.m:105
    #12	0x0000000105544838 in -[SEGSegmentIntegration persistQueue] at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGSegmentIntegration.m:630
    #13	0x0000000105543964 in -[SEGSegmentIntegration queuePayload:] at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGSegmentIntegration.m:470
    #14	0x00000001055437b4 in __71-[SEGSegmentIntegration enqueueAction:dictionary:context:integrations:]_block_invoke at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGSegmentIntegration.m:460
    #15	0x00000001055386bc in __seg_dispatch_specific_block_invoke at /MyApp/Pods/Analytics/Analytics/Classes/Internal/SEGAnalyticsUtils.m:64
    #16	(null) in _dispatch_call_block_and_release ()
    #17	(null) in _dispatch_client_callout ()
    #18	(null) in _dispatch_lane_serial_drain$VARIANT$armv81 ()
    #19	(null) in _dispatch_lane_invoke$VARIANT$armv81 ()
    #20	(null) in _dispatch_workloop_worker_thread ()
    #21	(null) in _pthread_wqthread ()
    #22	(null) in start_wqthread ()
    

    The crashes occur in background threads.

    Any ideas on what might be the issue?

    • Analytics (3.7.0)
    • iOS 12.x
    opened by leandromperez 19
  • Deadlock issue with forwardSelector:arguments:options: method

    Deadlock issue with forwardSelector:arguments:options: method

    We are seeing a repeatable deadlock issue due to the @synchronized(self) lock in SEGIntegrationsManager.m's forwardSelector:arguments:options: method. We are seeing the issue when the app becomes active and the handleAppStateNotification path is executed.

    opened by bbernberg 19
  • [4.0.3] [Carthage] Carthage bootstrap fails to resolve package dependencies of Example.xcodeproj

    [4.0.3] [Carthage] Carthage bootstrap fails to resolve package dependencies of Example.xcodeproj

    Regression

    Failing version: 4.0.3 Last working version: 4.0.2 Carthage version: 0.35.0

    Description

    When installing analytics-ios version 4.0.3 via carthage bootstrap --platform iOS, the build fails with the following error:

    A shell task (/usr/bin/xcrun xcodebuild -project /Users/****/Carthage/Checkouts/analytics-ios/Examples/FullExampleFlow/Analytics\ Example.xcodeproj CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 74:
    xcodebuild: error: Could not resolve package dependencies:
    

    It seems the newly introduced Example project in https://github.com/segmentio/analytics-ios/pull/915 as part of https://github.com/segmentio/analytics-ios/releases/tag/4.0.3 has introduced this issue. Reverting in Cartfile.resolved to version 4.0.2 won't reproduce the error.

    Logs

    A shell task (/usr/bin/xcrun xcodebuild -project /Users/****/Carthage/Checkouts/analytics-ios/Examples/FullExampleFlow/Analytics\ Example.xcodeproj CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES -list) failed with exit code 74:
    xcodebuild: error: Could not resolve package dependencies:
    
    opened by jhandguy 18
  • Extract UIApplication to permit linkage with iOS extensions.

    Extract UIApplication to permit linkage with iOS extensions.

    What does this PR do? Extract usage of UIApplication into protocol and optional property on config, so the sdk can be used with iOS extensions.

    Where should the reviewer start? SEGAnalyticsConfiguration.h

    How should this be manually tested? Link with an iOS app, set breakpoints in the appropriate UIApplication notification handlers.

    Any background context you want to provide? Also set APPLICATION_EXTENSION_API_ONLY=YES to guard this at build time.

    What are the relevant tickets? #213

    Screenshots or screencasts (if UI/UX change) NA

    Questions:

    • Does the docs need an update? Yes, now by default the optional config.application will be nil unless a non-extension target sets it to UIApplication.shared.

    • Are there any security concerns? No

    • Do we need to update engineering / success? Not sure. Would be nice to build out TestApplication more and add a test to fire UIApplicationDidEnterBackground, and assert that a bg task is added, then removed when the handler is called.

    @segmentio/gateway

    opened by benshan 16
  • Getting error when adding Segment iOS framework manually

    Getting error when adding Segment iOS framework manually

    I'm trying to add segmentio iOS framework manually in my app. When I build the project, its ended with following error, "Undefined symbols for architecture i386" and logs.

    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_Amplitude", referenced from:
          objc-class-ref in Analytics(SEGAmplitudeIntegration.o)
      "_OBJC_CLASS_$_AppsFlyerTracker", referenced from:
          objc-class-ref in Analytics(SEGAppsFlyerIntegration.o)
      "_OBJC_CLASS_$_Bugsnag", referenced from:
          objc-class-ref in Analytics(SEGBugsnagIntegration.o)
      "_OBJC_CLASS_$_Countly", referenced from:
          objc-class-ref in Analytics(SEGCountlyIntegration.o)
      "_OBJC_CLASS_$_Crittercism", referenced from:
          objc-class-ref in Analytics(SEGCrittercismIntegration.o)
      "_OBJC_CLASS_$_CrittercismConfig", referenced from:
          objc-class-ref in Analytics(SEGCrittercismIntegration.o)
      "_OBJC_CLASS_$_Flurry", referenced from:
          objc-class-ref in Analytics(SEGFlurryIntegration.o)
      "_OBJC_CLASS_$_GAI", referenced from:
          objc-class-ref in Analytics(SEGGoogleAnalyticsIntegration.o)
      "_OBJC_CLASS_$_GAIDictionaryBuilder", referenced from:
          objc-class-ref in Analytics(SEGGoogleAnalyticsIntegration.o)
      "_OBJC_CLASS_$_KahunaAnalytics", referenced from:
          objc-class-ref in Analytics(SEGKahunaIntegration.o)
      "_OBJC_CLASS_$_Localytics", referenced from:
          objc-class-ref in Analytics(SEGLocalyticsIntegration.o)
      "_OBJC_CLASS_$_Mixpanel", referenced from:
          objc-class-ref in Analytics(SEGMixpanelIntegration.o)
      "_OBJC_CLASS_$_QuantcastMeasurement", referenced from:
          objc-class-ref in Analytics(SEGQuantcastIntegration.o)
      "_OBJC_CLASS_$_TRVSDictionaryWithCaseInsensitivity", referenced from:
          objc-class-ref in Analytics(SEGAnalyticsIntegration.o)
      "_OBJC_CLASS_$_TSConfig", referenced from:
          objc-class-ref in Analytics(SEGTapstreamIntegration.o)
      "_OBJC_CLASS_$_TSEvent", referenced from:
          objc-class-ref in Analytics(SEGTapstreamIntegration.o)
      "_OBJC_CLASS_$_TSTapstream", referenced from:
          objc-class-ref in Analytics(SEGTapstreamIntegration.o)
      "_kGAIScreenName", referenced from:
          -[SEGGoogleAnalyticsIntegration screen:properties:options:] in Analytics(SEGGoogleAnalyticsIntegration.o)
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    How to solve this error, I'm strictly following all instructions given here. However just wont be able to solve it out.

    Please help !

    opened by ruchiragile 16
  • Crash in queuePayload / persistQueue

    Crash in queuePayload / persistQueue

    I'm not sure if this is a segment bug or an apple bug but i figured i'd put it out there and see if anyone had any ideas as to what might be happening:

    Thread 12 Crashed:
    0   CoreFoundation                       0x0000000182e2e890 __CFTypeCollectionRetain + 40
    1   CoreFoundation                       0x0000000182d51b44 _CFArrayReplaceValues + 348
    2   CoreFoundation                       0x0000000182d6196c _CFAppendXML0 + 2360
    3   CoreFoundation                       0x0000000182d61a88 _CFAppendXML0 + 2644
    4   CoreFoundation                       0x0000000182d61a88 _CFAppendXML0 + 2644
    5   CoreFoundation                       0x0000000182d6131c _CFAppendXML0 + 744
    6   CoreFoundation                       0x0000000182d60978 _CFPropertyListCreateXMLData + 212
    7   CoreFoundation                       0x0000000182d6ba38 CFPropertyListCreateData + 116
    8   Foundation                           0x0000000183797b90 +[NSPropertyListSerialization dataWithPropertyList:format:options:error:] + 44
    9   Analytics                            0x00000001012f83e8 -[SEGFileStorage dataFromPlist:] (SEGFileStorage.m:149)
    10  Analytics                            0x00000001012f8354 -[SEGFileStorage setPlist:forKey:] (SEGFileStorage.m:140)
    11  Analytics                            0x00000001012f8120 -[SEGFileStorage setArray:forKey:] (SEGFileStorage.m:105)
    12  Analytics                            0x000000010130097c -[SEGSegmentIntegration persistQueue] (SEGSegmentIntegration.m:638)
    13  Analytics                            0x00000001012ff838 -[SEGSegmentIntegration queuePayload:] (SEGSegmentIntegration.m:478)
    14  Analytics                            0x00000001012ff69c __71-[SEGSegmentIntegration enqueueAction:dictionary:context:integrations:]_block_invoke (SEGSegmentIntegration.m:466)
    15  libdispatch.dylib                    0x00000001828c14bc _dispatch_call_block_and_release + 20
    16  libdispatch.dylib                    0x00000001828c147c _dispatch_client_callout + 12
    17  libdispatch.dylib                    0x00000001828cd4c0 _dispatch_queue_drain + 860
    18  libdispatch.dylib                    0x00000001828c4f80 _dispatch_queue_invoke + 460
    19  libdispatch.dylib                    0x00000001828cf390 _dispatch_root_queue_drain + 724
    20  libdispatch.dylib                    0x00000001828cf0b0 _dispatch_worker_thread3 + 108
    21  libsystem_pthread.dylib              0x0000000182ad9470 _pthread_wqthread + 1088
    22  libsystem_pthread.dylib              0x0000000182ad9020 start_wqthread + 0
    
    bug 
    opened by johnryan 15
  • Instance property used to get network.carrier has been deprecated

    Instance property used to get network.carrier has been deprecated

    In checking for my own purposes how Segment populates network.carrier, I found that the instance property used in https://github.com/segmentio/analytics-ios/blob/e35f1c984687f3216810145c8f1a8360fad20a72/Segment/Internal/SEGUtils.m#L368 - that is, subscriberCellularProvider - has been deprecated.

    See documentation at https://developer.apple.com/documentation/coretelephony/cttelephonynetworkinfo/1616900-subscribercellularprovider (Apple recommends using serviceSubscriberCellularProviders instead).

    opened by gideonkylejeffrey 0
  • Git repository is very large, takes a long time to fetch using Xcode + Swift Package Manager

    Git repository is very large, takes a long time to fetch using Xcode + Swift Package Manager

    my fetching time is 913 Seconds! image

    why we should download 198Mb every resolving package? i think it is very large and I often am not working with super fast internet connections and this really puts a damper on development.

    image
    opened by SajjadKharrazi 1
  • ANR when call - (void)identify:(NSString *_Nullable)userId traits:(SERIALIZABLE_DICT _Nullable)traits;

    ANR when call - (void)identify:(NSString *_Nullable)userId traits:(SERIALIZABLE_DICT _Nullable)traits;

    Call stack when ANR

    libsystem_kernel.dylib 0x7fff203515ce __ulock_wait + 10 libdispatch.dylib 0x7fff201d9e28 _dispatch_thread_event_wait_slow + 40 libdispatch.dylib 0x7fff201e685d DISPATCH_WAIT_FOR_QUEUE + 290 libdispatch.dylib 0x7fff201e64ac _dispatch_sync_f_slow + 171 Segment 0x1187fef90 -[SEGState valueWithBlock:] + 166 Segment 0x1187fea21 -[SEGPayloadContext referrer] + 91 Segment 0x1187fe90a -[SEGPayloadContext payload] + 115 Segment 0x1187f90ae -[SEGPayload initWithContext:integrations:] + 164 Segment 0x1187ec70a -[SEGIdentifyPayload initWithUserId:anonymousId:traits:context:integrations:] + 103 Segment 0x1187eabb7 -[SEGAnalytics identify:traits:options:] + 892 APP 0x10d91ff50 -[SEGAnalyticsPlugIn identifyWithTraits:traits:] + 99

    Reproduce steps

    1. Call - (void)identify:(NSString *_Nullable)userId traits:(SERIALIZABLE_DICT _Nullable)traits; in main thread every 6s
    2. Except 1, main thread and other thread may call identify too.

    version

    4.1.6

    Operation system

    Macmini8,1

    Could you help to investigate why it cases ANR? And is there any advices to avoid the ANR? Thank you.

    opened by SunnySun852963 0
  • NSDictionary's serializableDeepCopy does not catch Infinite Double/Float values, causes crash

    NSDictionary's serializableDeepCopy does not catch Infinite Double/Float values, causes crash

    This repo does a good job of transforming Dictionary types from non-JSON-compatible types to JSON-compatible types prior to sending analytics dictionaries to your backend via the serializableDeepCopy method.

    However, if an infinite Double or Float value (created by dividing a Double or Float by zero) slips through the serializableDeepCopy method. The result of sending an infinite value is that this repo crashes with the error SIGABRT (#0): Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid number value (infinite) in JSON write'. Worse yet, this crash happens on Segment's own queue, making it difficult for teams to find the source of the corrupted log. Here's a screen grab from the stack trace showing Segment on its own queue: image

    Ideally, this repo would detect an Infinite value as part of -[NSDictionary serializableDeepCopy:] and either crash (since this method is called synchronously from -[SEGAnalytics track:properties:options:], crashing here would yield a stack trace can help identify the source of the bad log) or remove/modify the infinite value.

    Let me know which approach seems reasonable to you – I'd be happy to create a PR with a fix here.

    opened by dfed 4
  • +[SEGAnalytics sharedAnalytics]() crash with recordScreenViews set to true

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

    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)
    }
    
    
    
    opened by Ophenix 0
Releases(4.1.6)
Analytics for my apps. Currently using Telemetry as the provider

RRAnalyticsKit Analytics for my apps. Currently using Telemetry as the provider Usage For example, I've a method evaluate() in MainViewModel that acts

rryam 2 Jan 26, 2022
Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift

MatomoTracker (former PiwikTracker) iOS SDK The MatomoTracker is an iOS, tvOS and macOS SDK for sending app analytics to a Matomo server. MatomoTracke

Matomo Analytics 367 Dec 17, 2022
The hassle-free way to add Segment analytics to your Swift app (iOS/tvOS/watchOS/macOS/Linux).

Analytics-Swift The hassle-free way to add Segment analytics to your Swift app (iOS/tvOS/watchOS/macOS/Linux/iPadOS). Analytics helps you measure your

Segment 53 Dec 16, 2022
Amplitude Analytics 0 Feb 1, 2022
Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ measurement protocol for Apple TV.

Google Analytics tracker for Apple tvOS by Adswerve About Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ me

Adswerve 81 Nov 13, 2022
Analytics layer abstraction, abstract analytics reporters and collect domain-driven analytic events.

?? Tentacles Current State: Work in Progress Documentation & Tests(100% completed, but needs refactoring and structuring) started but not done yet, im

Patrick 3 Dec 2, 2022
Hassle-free JSON encoding and decoding in Swift

#JSONCodable Hassle-free JSON encoding and decoding in Swift Installation Simply add the following to your Cartfile and run carthage update: github "m

Matthew Cheok 605 Jun 29, 2022
Unofficial Dribbble iOS wrapper allows you to integrate Dribble API into iOS application (Designer, Shot, Comment, User Story, Like, Follow)

DribbbleSDK DribbbleSDK is easy-to-use iOS wrapper for Dribbble SDK. We're working hard to complete the full coverage of available methods and make th

Agilie Team 74 Dec 2, 2020
JSONHelper - ✌ Convert anything into anything in one operation; JSON data into class instances, hex strings into UIColor/NSColor, y/n strings to booleans, arrays and dictionaries of these; anything you can make sense of!

JSONHelper Convert anything into anything in one operation; hex strings into UIColor/NSColor, JSON strings into class instances, y/n strings to boolea

Baris Sencan 788 Jul 19, 2022
Swiftly convert country codes and cultural terms to all 269 emoji flags without hassle

Swiftly convert country codes and cultural terms to all 269 emoji flags without hassle

Arnold Rozon 2 May 9, 2022
MetricTime is designed to be one universal timekeeping system that eliminates the hassle of calculating time since most of its convertions as simple as converting meters to centimeters

MetricTime MetricTime is designed to be one universal timekeeping system that eliminates the hassle of calculating time since most of its convertions

Adrian Edwards 4 Feb 10, 2022
A usermanager written in swift 3.0 saves you from hassle of saving your active user session.

SwiftUserManager A usermanager written in swift 3.0 saves you from hassle of saving your active user session. Call api and give the json to MOProfile

Zeeshan Haider 22 Sep 30, 2022
Demonstration of how to integrate AppleScript/Cocoa scripting into a Catalyst app

CatalystAppleScript Trivial demonstration showing how to build support for AppleScript into a Catalyst app. Showcases multiple commands and variables

Steven Troughton-Smith 47 Aug 11, 2022
Integrate beautiful minimalistic plots into your app.

PlotUI · Integrate beautiful minimalistic plots into your app. Installation You can use PlotUI as package dependency to your app using Xcode: github.c

Yasha Bubnov 32 Sep 10, 2022
Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor

Vapor Passkey Demo Proof of concept app for trying to integrate passkeys and WebAuthn into Vapor Usage Clone the project, then in Terminal run swift r

Tim Condon 70 Dec 20, 2022
UI framework that allows developers to integrate an amazing selection interface into their applications

UI framework that allows developers to integrate an amazing selection interface into their applications! Each bubble has a set of parameters, which could be configured individually.

AJIJIi 5 Jul 12, 2022
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.

BadgeHub A way to quickly add a notification badge icon to any view. Demo/Example For demo: $ pod try BadgeHub To run the example project, clone the r

Jogendra 772 Dec 28, 2022
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.

BadgeHub A way to quickly add a notification badge icon to any view. Demo/Example For demo: $ pod try BadgeHub To run the example project, clone the r

Jogendra 773 Dec 30, 2022
An iOS PDF viewer and annotator written in Swift that can be embedded into any application.

Requirements iOS 9 or above Xcode 8 or above Swift 3.0 Note This project is still in early stages. Right now the PDF reader works both programmaticall

UXM Studio 269 Dec 11, 2022
AZPeerToPeerConnectivity is a wrapper on top of Apple iOS Multipeer Connectivity framework. It provides an easier way to create and manage sessions. Easy to integrate

AZPeerToPeerConnection Controller Features Multipeer Connectivity Connection via Bluetooth or Wifi No need write all session, browser, services delega

Afroz Zaheer 66 Dec 19, 2022