Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1420"
version = "1.3">
LastUpgradeVersion = "2610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
Expand All @@ -14,23 +15,9 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "YAnalytics"
BuildableName = "YAnalytics"
BlueprintName = "YAnalytics"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "YAnalyticsTests"
BuildableName = "YAnalyticsTests"
BlueprintName = "YAnalyticsTests"
BlueprintIdentifier = "CTAnalytics"
BuildableName = "CTAnalytics"
BlueprintName = "CTAnalytics"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
Expand All @@ -41,15 +28,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "YAnalyticsTests"
BuildableName = "YAnalyticsTests"
BlueprintName = "YAnalyticsTests"
BlueprintIdentifier = "CTAnalyticsTests"
BuildableName = "CTAnalyticsTests"
BlueprintName = "CTAnalyticsTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
Expand All @@ -75,9 +62,9 @@
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "YAnalytics"
BuildableName = "YAnalytics"
BlueprintName = "YAnalytics"
BlueprintIdentifier = "CTAnalytics"
BuildableName = "CTAnalytics"
BlueprintName = "CTAnalytics"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
Expand Down
12 changes: 6 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import PackageDescription

let package = Package(
name: "YAnalytics",
name: "CTAnalytics",
platforms: [
.iOS(.v14),
.tvOS(.v14),
Expand All @@ -13,18 +13,18 @@ let package = Package(
],
products: [
.library(
name: "YAnalytics",
targets: ["YAnalytics"]
name: "CTAnalytics",
targets: ["CTAnalytics"]
)
],
targets: [
.target(
name: "YAnalytics",
name: "CTAnalytics",
dependencies: []
),
.testTarget(
name: "YAnalyticsTests",
dependencies: ["YAnalytics"]
name: "CTAnalyticsTests",
dependencies: ["CTAnalytics"]
)
]
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
![Y—Analytics](https://user-images.githubusercontent.com/1037520/214347556-2c63320d-e348-4fad-8762-6ff7d7a6b869.jpeg)
![CTAnalytics](https://user-images.githubusercontent.com/1037520/214347556-2c63320d-e348-4fad-8762-6ff7d7a6b869.jpeg)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fyml-org%2Fyanalytics-ios%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/yml-org/yanalytics-ios) [![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fyml-org%2Fyanalytics-ios%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/yml-org/yanalytics-ios)
_An injectable analytics wrapper for Apple platforms._

This lightweight framework provides a generic wrapper for analytics SDK's that is suitable for Dependency Injection. Its objective is to avoid tightly coupling an application with a specific analytics provider.

Licensing
----------
Y—Analytics is licensed under the [Apache 2.0 license](LICENSE).
CTAnalytics is licensed under the [Apache 2.0 license](LICENSE).

Documentation
----------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// AnalyticsEvent.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 7/23/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// CompoundAnalyticsEngine.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 7/19/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// ConsoleAnalyticsEngine.swift
// YAnalyticsTestHarnessTests
// CTAnalyticsTestHarnessTests
//
// Created by Sumit Goswami on 18/01/22.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// LoggerAnalyticsEngine.swift
// YAnalytics
// CTAnalytics
//
// Created by Sumit Goswami on 17/01/22.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand All @@ -14,7 +13,7 @@ import os
/// This should be used only for debugging purposes.
/// You can combine this with your actual analytics engine by using `CompoundAnalyticsEngine`.
final public class LoggerAnalyticsEngine {
private let logger = Logger(subsystem: "co.yml.yanalytics.Core", category: "Analytics")
private let logger = Logger(subsystem: "com.codeandtheory.ctanalytics.core", category: "Analytics")

/// Initialize logger analytics engine
public init() { }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// MockAnalyticsEngine.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 7/20/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// SpyAnalyticsEngine.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 2/21/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// AnalyticsEngine.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 7/23/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// AnalyticsEventFactory.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 3/8/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// EventFactory.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 3/8/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// ScreenViewFactory.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 3/8/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// UserPropertyFactory.swift
// YAnalytics
// CTAnalytics
//
// Created by Mark Pospesel on 3/8/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// XCTestCase+AssertLogged.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 2/21/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

extension XCTestCase {
func XCTAssertLogged(engine: AnalyticsEngine, data: MockAnalyticsData) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
//
// XCTestCase+MemoryLeakTracking.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Karthik K Manoj on 08/04/22.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// CompoundAnalyticsEngineTests.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 7/19/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class CompoundAnalyticsEngineTests: XCTestCase {
func testTrack() throws {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// ConsoleAnalyticsEngineTests.swift
// YAnalyticsTestHarnessTests
// CTAnalyticsTests
//
// Created by Sumit Goswami on 18/01/22.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class ConsoleAnalyticsEngineTests: XCTestCase {
func testTrack() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// LogAnalyticsEngineTests.swift
// YAnalyticsTestHarnessTests
// CTAnalyticsTests
//
// Created by Sumit Goswami on 17/01/22.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class LoggerAnalyticsEngineTests: XCTestCase {
func testTrack() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// MockAnalyticsEngineTests.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 2/21/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class MockAnalyticsEngineTests: XCTestCase {
func testTrack() throws {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// SpyAnalyticsEngineTests.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 2/21/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class SpyAnalyticsEngineTests: XCTestCase {
func testTrack() throws {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// MockAnalyticsData.swift
// YAnalyticsTests
// CTAnalyticsTests
//
// Created by Mark Pospesel on 7/20/21.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import Foundation
@testable import YAnalytics
@testable import CTAnalytics

/// Sample Analytics data for unit tests
struct MockAnalyticsData {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
//
// AnalyticsEngineTests.swift
// YAnalytics
// CTAnalyticsTests
//
// Created by Mark Pospesel on 3/8/23.
// Copyright © 2023 Y Media Labs. All rights reserved.
//

import XCTest
@testable import YAnalytics
@testable import CTAnalytics

final class AnalyticsEngineTests: XCTestCase {
func test_trackFactory_tracksEvents() {
Expand Down
Loading
Loading