diff --git a/.travis.yml b/.travis.yml index 2c4138b2..d2506763 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,5 +8,5 @@ before_install: script: - rake test - rake build_with_package_manager -osx_image: xcode9 +osx_image: xcode9.2 cache: cocoapods \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 25bc91d9..f83dbaf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,45 +4,45 @@ * **bugfix** Fixed an issue where an ampersand lead to incomplete tracking information. [#217](https://github.com/matomo-org/piwik-sdk-ios/issues/217) ## 4.4.1 -* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/piwik/piwik-sdk-ios/pull/216) +* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/matomo-org/matomo-sdk-ios/pull/216) ## 4.4.0 -* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111) -* **feature** Added automatic generation of the url property. [#197](https://github.com/piwik/piwik-sdk-ios/issues/197) -* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/piwik/piwik-sdk-ios/pull/175) -* **improvement** The Logger is now objc compatible. [#185](https://github.com/piwik/piwik-sdk-ios/issues/185) -* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/piwik/piwik-sdk-ios/pull/195) -* **improvement** The Device and Applications structs are now public. [#191](https://github.com/piwik/piwik-sdk-ios/issues/191) +* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111) +* **feature** Added automatic generation of the url property. [#197](https://github.com/matomo-org/matomo-sdk-ios/issues/197) +* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/matomo-org/matomo-sdk-ios/pull/175) +* **improvement** The Logger is now objc compatible. [#185](https://github.com/matomo-org/matomo-sdk-ios/issues/185) +* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/matomo-org/matomo-sdk-ios/pull/195) +* **improvement** The Device and Applications structs are now public. [#191](https://github.com/matomo-org/matomo-sdk-ios/issues/191) ## 4.3.0 -* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/piwik/piwik-sdk-ios/issues/153) -* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/piwik/piwik-sdk-ios/issues/162) -* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/piwik/piwik-sdk-ios/issues/190) +* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/matomo-org/matomo-sdk-ios/issues/153) +* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/matomo-org/matomo-sdk-ios/issues/162) +* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/matomo-org/matomo-sdk-ios/issues/190) ## 4.2.0 -* **feature** Added ability to customize user agent. [#168](https://github.com/piwik/piwik-sdk-ios/pull/168) +* **feature** Added ability to customize user agent. [#168](https://github.com/matomo-org/matomo-sdk-ios/pull/168) * **feature** Added ability to customize User ID. -[#180](https://github.com/piwik/piwik-sdk-ios/issues/180) (by @niksawtschuk) -* **feature** Added Carthage support [#74](https://github.com/piwik/piwik-sdk-ios/issues/74) (by @elitalon) -* **feature** Added a way to set a custom visitor ID [#180](https://github.com/piwik/piwik-sdk-ios/pull/181) (by @niksawtschuk) +[#180](https://github.com/matomo-org/matomo-sdk-ios/issues/180) (by @niksawtschuk) +* **feature** Added Carthage support [#74](https://github.com/matomo-org/matomo-sdk-ios/issues/74) (by @elitalon) +* **feature** Added a way to set a custom visitor ID [#180](https://github.com/matomo-org/matomo-sdk-ios/pull/181) (by @niksawtschuk) * **improvement** Added Swift support ## 4.1.0 -* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111) -* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/piwik/piwik-sdk-ios/issues/149) (by @akshaykolte) -* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/piwik/piwik-sdk-ios/issues/147) -* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/piwik/piwik-sdk-ios/issues/134) -* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/piwik/piwik-sdk-ios/issues/167) +* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111) +* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/matomo-org/matomo-sdk-ios/issues/149) (by @akshaykolte) +* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/matomo-org/matomo-sdk-ios/issues/147) +* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/matomo-org/matomo-sdk-ios/issues/134) +* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/matomo-org/matomo-sdk-ios/issues/167) ## 4.0.0 -* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/piwik/piwik-sdk-ios/issues/146) -* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/piwik/piwik-sdk-ios/issues/124) +* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/matomo-org/matomo-sdk-ios/issues/146) +* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/matomo-org/matomo-sdk-ios/issues/124) ## 4.0.0-beta2 -* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/piwik/piwik-sdk-ios/issues/92) -* **feature** Added the functionality to start new sessions. [#136](https://github.com/piwik/piwik-sdk-ios/issues/136) -* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/piwik/piwik-sdk-ios/pull/140) -* **fixed** Fixed an issue where tracking an event wasn’t possible from Objective-C code. [#142](https://github.com/piwik/piwik-sdk-ios/issues/142) +* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/matomo-org/matomo-sdk-ios/issues/92) +* **feature** Added the functionality to start new sessions. [#136](https://github.com/matomo-org/matomo-sdk-ios/issues/136) +* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/matomo-org/matomo-sdk-ios/pull/140) +* **fixed** Fixed an issue where tracking an event wasn’t possible from Objective-C code. [#142](https://github.com/matomo-org/matomo-sdk-ios/issues/142) ## 4.0.0-beta1 * no changes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4160c9dc..234882c2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,23 +6,23 @@ Welcome! We are very happy to have you here. There are always too many things to Did you find a bug? Bummer! Please help us find the reason and fix them. -* Search on GitHub under [Issues](https://github.com/piwik/piwik-sdk-ios/issues) if it was already reported. Maybe you can add information to it? -* If you're unable to find an open issue addressing the problem, please [open a new one](https://github.com/piwik/piwik-sdk-ios/issues/new). Please explain your problem and include as much detail as you can as they might help the maintainers to reproduce it: +* Search on GitHub under [Issues](https://github.com/matomo-org/matomo-sdk-ios/issues) if it was already reported. Maybe you can add information to it? +* If you're unable to find an open issue addressing the problem, please [open a new one](https://github.com/matomo-org/matomo-sdk-ios/issues/new). Please explain your problem and include as much detail as you can as they might help the maintainers to reproduce it: * A clear and descriptive title. * Describe your issue and add exact steps to reproduce the issue. You found a crash? Please attach a symbolicated crash report. * If possible add a few lines of code or possibly even an example project. ## Discussing -We love to discuss changes and improvements. If there is functionality you want to add or improve please [open an issue](https://github.com/piwik/piwik-sdk-ios/issues/new) and describe what you want to do, why and how. Maybe the feature already exists but is hidden? Maybe somebody wants to add ideas on how to implement it. +We love to discuss changes and improvements. If there is functionality you want to add or improve please [open an issue](https://github.com/matomo-org/matomo-sdk-ios/issues/new) and describe what you want to do, why and how. Maybe the feature already exists but is hidden? Maybe somebody wants to add ideas on how to implement it. -You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/piwik/piwik-sdk-ios/labels/discussion). +You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/matomo-org/matomo-sdk-ios/labels/discussion). ## Submitting changes When contributing to this repository, please first discuss the change you wish to make via an issue before making a change. -If you implemented a change please send a [Pull Request](https://github.com/piwik/piwik-sdk-ios/compare?expand=1) with a clear list of what you have done. Try to only tackle one thing a time. This will lead to smaller pull requests that are easier to review. +If you implemented a change please send a [Pull Request](https://github.com/matomo-org/matomo-sdk-ios/compare?expand=1) with a clear list of what you have done. Try to only tackle one thing a time. This will lead to smaller pull requests that are easier to review. ## Contributing Code @@ -34,7 +34,7 @@ You want to contribute code? Awesome. Here are some tips that should get you sta ### Adding code to the SDK -In the Workspace you will find the *PiwikTracker* Project. Inside of it there is a folder for the SDK code and one for the Tests. Tests can be run from the *PiwikTracker* scheme. +In the Workspace you will find the *MatomoTracker* Project. Inside of it there is a folder for the SDK code and one for the Tests. Tests can be run from the *MatomoTracker* scheme. ### Adding example code diff --git a/Example/ios/iOS Example/AppDelegate.swift b/Example/ios/iOS Example/AppDelegate.swift index de8c456e..d380ccdf 100644 --- a/Example/ios/iOS Example/AppDelegate.swift +++ b/Example/ios/iOS Example/AppDelegate.swift @@ -1,5 +1,5 @@ import UIKit -import PiwikTracker +import MatomoTracker @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -7,7 +7,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - setupPiwik() + setupMatomo() return true } @@ -19,12 +19,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - PiwikTracker.shared?.dispatch() + MatomoTracker.shared?.dispatch() } func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. - PiwikTracker.shared?.startNewSession() + MatomoTracker.shared?.startNewSession() } func applicationDidBecomeActive(_ application: UIApplication) { @@ -35,15 +35,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } - func setupPiwik() { - guard let siteid = UserDefaults.standard.string(forKey: "piwik-example-siteid"), - let baseurl = UserDefaults.standard.url(forKey: "piwik-example-baseurl") else { + func setupMatomo() { + guard let siteid = UserDefaults.standard.string(forKey: "matomo-example-siteid"), + let baseurl = UserDefaults.standard.url(forKey: "matomo-example-baseurl") else { let alert = UIAlertView(title: "Configuration", message: "Please configure this example application before usage", delegate: nil, cancelButtonTitle: "OK") alert.show() return } - PiwikTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl) - PiwikTracker.shared?.logger = DefaultLogger(minLevel: .info) + MatomoTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl) + MatomoTracker.shared?.logger = DefaultLogger(minLevel: .info) } } diff --git a/Example/ios/iOS Example/ConfigurationViewController.swift b/Example/ios/iOS Example/ConfigurationViewController.swift index ca74b083..b064e843 100644 --- a/Example/ios/iOS Example/ConfigurationViewController.swift +++ b/Example/ios/iOS Example/ConfigurationViewController.swift @@ -1,5 +1,5 @@ import UIKit -import PiwikTracker +import MatomoTracker class ConfigurationViewController: UIViewController { @@ -8,10 +8,10 @@ class ConfigurationViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","configuration"]) + MatomoTracker.shared?.track(view: ["menu","configuration"]) - baseURLTextField.text = UserDefaults.standard.url(forKey: "piwik-example-baseurl")?.absoluteString - siteIDTextField.text = UserDefaults.standard.string(forKey: "piwik-example-siteid") + baseURLTextField.text = UserDefaults.standard.url(forKey: "matomo-example-baseurl")?.absoluteString + siteIDTextField.text = UserDefaults.standard.string(forKey: "matomo-example-siteid") } override func viewWillDisappear(_ animated: Bool) { @@ -19,19 +19,19 @@ class ConfigurationViewController: UIViewController { guard let baseURLText = baseURLTextField.text, let baseURL = URL(string: baseURLText), let siteID = siteIDTextField.text else { return } - UserDefaults.standard.set(baseURL, forKey: "piwik-example-baseurl") - UserDefaults.standard.set(siteID, forKey: "piwik-example-siteid") + UserDefaults.standard.set(baseURL, forKey: "matomo-example-baseurl") + UserDefaults.standard.set(siteID, forKey: "matomo-example-siteid") UserDefaults.standard.synchronize() - PiwikTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL) + MatomoTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL) } @IBAction func newSessionButtonTapped(_ sender: UIButton) { - PiwikTracker.shared?.startNewSession() + MatomoTracker.shared?.startNewSession() } @IBAction func dispatchButtonTapped(_ sender: UIButton) { - PiwikTracker.shared?.dispatch() + MatomoTracker.shared?.dispatch() } } diff --git a/Example/ios/iOS Example/CustomDimensionsViewController.swift b/Example/ios/iOS Example/CustomDimensionsViewController.swift index 5678b15f..bd97b992 100644 --- a/Example/ios/iOS Example/CustomDimensionsViewController.swift +++ b/Example/ios/iOS Example/CustomDimensionsViewController.swift @@ -1,18 +1,18 @@ import UIKit -import PiwikTracker +import MatomoTracker class CustomDimensionsViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","custom dimensions"]) + MatomoTracker.shared?.track(view: ["menu","custom dimensions"]) } // Adds Custom Dimensions to every Event for OS version, Hardware and App version. @IBAction func setVisitCustomDimensionsTapped(_ sender: UIButton) { let application = Application.makeCurrentApplication() let device = Device.makeCurrentDevice() - PiwikTracker.shared?.set(value: device.osVersion, forIndex: 1) - PiwikTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2) - PiwikTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3) + MatomoTracker.shared?.set(value: device.osVersion, forIndex: 1) + MatomoTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2) + MatomoTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3) } } diff --git a/Example/ios/iOS Example/CustomTrackingParametersViewController.swift b/Example/ios/iOS Example/CustomTrackingParametersViewController.swift index 8263e8d6..8fe9b267 100644 --- a/Example/ios/iOS Example/CustomTrackingParametersViewController.swift +++ b/Example/ios/iOS Example/CustomTrackingParametersViewController.swift @@ -1,18 +1,18 @@ import UIKit -import PiwikTracker +import MatomoTracker class CustomTrackingParametersViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","custom tracking parameters"]) + MatomoTracker.shared?.track(view: ["menu","custom tracking parameters"]) } @IBAction func didTapSendDownloadEvent(_ sender: UIButton) { - guard let piwikTracker = PiwikTracker.shared else { return } - let downloadURL = URL(string: "https://builds.piwik.org/piwik.zip")! - let event = Event(tracker: piwikTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString]) - PiwikTracker.shared?.track(event) + guard let matomoTracker = MatomoTracker.shared else { return } + let downloadURL = URL(string: "https://builds.matomo.org/matomo.zip")! + let event = Event(tracker: matomoTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString]) + MatomoTracker.shared?.track(event) } } diff --git a/Example/ios/iOS Example/EventsViewController.swift b/Example/ios/iOS Example/EventsViewController.swift index 1043d9b1..dee2aeda 100644 --- a/Example/ios/iOS Example/EventsViewController.swift +++ b/Example/ios/iOS Example/EventsViewController.swift @@ -1,12 +1,12 @@ import UIKit -import PiwikTracker +import MatomoTracker class EventsViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","events"]) + MatomoTracker.shared?.track(view: ["menu","events"]) } @IBAction func trackEventButtonTapped(_ sender: UIButton) { - PiwikTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7) + MatomoTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7) } } diff --git a/Example/ios/iOS Example/MenuViewController.swift b/Example/ios/iOS Example/MenuViewController.swift index 1a9c08ee..874b9061 100644 --- a/Example/ios/iOS Example/MenuViewController.swift +++ b/Example/ios/iOS Example/MenuViewController.swift @@ -1,9 +1,9 @@ import UIKit -import PiwikTracker +import MatomoTracker class MenuViewController: UITableViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu"]) + MatomoTracker.shared?.track(view: ["menu"]) } } diff --git a/Example/ios/iOS Example/ObjectiveCCompatibilityChecker.m b/Example/ios/iOS Example/ObjectiveCCompatibilityChecker.m index e8eb2c6a..cb25efcc 100644 --- a/Example/ios/iOS Example/ObjectiveCCompatibilityChecker.m +++ b/Example/ios/iOS Example/ObjectiveCCompatibilityChecker.m @@ -1,19 +1,19 @@ -@import PiwikTracker; +@import MatomoTracker; #import "ObjectiveCCompatibilityChecker.h" @implementation ObjectiveCCompatibilityChecker - (void)check { - [PiwikTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil]; - [[PiwikTracker shared] trackWithView:@[@"example"] url:nil]; - [[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil]; - [[PiwikTracker shared] dispatch]; - [PiwikTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose]; + [MatomoTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil]; + [[MatomoTracker shared] trackWithView:@[@"example"] url:nil]; + [[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil]; + [[MatomoTracker shared] dispatch]; + [MatomoTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose]; } - (void)checkDeprecated { - [[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil]; + [[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil]; } @end diff --git a/Example/ios/iOS Example/OptOutViewController.swift b/Example/ios/iOS Example/OptOutViewController.swift index d8a3c32c..b649fe7d 100644 --- a/Example/ios/iOS Example/OptOutViewController.swift +++ b/Example/ios/iOS Example/OptOutViewController.swift @@ -1,20 +1,20 @@ import UIKit -import PiwikTracker +import MatomoTracker class OptOutViewController: UIViewController { @IBOutlet weak var optOutSwitch: UISwitch! @IBAction func optOutSwitchChanged(_ sender: Any) { - PiwikTracker.shared?.isOptedOut = optOutSwitch.isOn + MatomoTracker.shared?.isOptedOut = optOutSwitch.isOn } override func viewDidLoad() { super.viewDidLoad() - optOutSwitch.isOn = PiwikTracker.shared?.isOptedOut ?? false + optOutSwitch.isOn = MatomoTracker.shared?.isOptedOut ?? false } override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","opt out"]) + MatomoTracker.shared?.track(view: ["menu","opt out"]) } } diff --git a/Example/ios/iOS Example/ScreenViewController.swift b/Example/ios/iOS Example/ScreenViewController.swift index 6d7b620b..565f15c0 100644 --- a/Example/ios/iOS Example/ScreenViewController.swift +++ b/Example/ios/iOS Example/ScreenViewController.swift @@ -1,9 +1,9 @@ import UIKit -import PiwikTracker +import MatomoTracker class ScreenViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","screen view"]) + MatomoTracker.shared?.track(view: ["menu","screen view"]) } } diff --git a/Example/ios/iOS Example/SecondScreenViewController.swift b/Example/ios/iOS Example/SecondScreenViewController.swift index a1f020a9..38118b26 100644 --- a/Example/ios/iOS Example/SecondScreenViewController.swift +++ b/Example/ios/iOS Example/SecondScreenViewController.swift @@ -1,9 +1,9 @@ import UIKit -import PiwikTracker +import MatomoTracker class SecondScreenViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","screen view", "screen view 2"]) + MatomoTracker.shared?.track(view: ["menu","screen view", "screen view 2"]) } } diff --git a/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Info.plist b/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Info.plist index c7f44f93..1271215f 100644 --- a/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Info.plist +++ b/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Info.plist @@ -24,10 +24,10 @@ CFBundleURLName - org.piwik.iostracker + org.matomo.iostracker CFBundleURLSchemes - piwik-demo + matomo-demo diff --git a/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Prefix.pch b/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Prefix.pch index 303ba94e..8c582258 100644 --- a/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Prefix.pch +++ b/Example/ios/iOS Example/Supporting Files/PiwikTrackeriOSDemo-Prefix.pch @@ -1,5 +1,5 @@ // -// Prefix header for all source files of the 'PiwikTrackeriOSDemo' target in the 'PiwikTrackeriOSDemo' project +// Prefix header for all source files of the 'MatomoTrackeriOSDemo' target in the 'MatomoTrackeriOSDemo' project // #import diff --git a/Example/ios/iOS Example/Supporting Files/main.m b/Example/ios/iOS Example/Supporting Files/main.m index f796feed..14f8ef9d 100644 --- a/Example/ios/iOS Example/Supporting Files/main.m +++ b/Example/ios/iOS Example/Supporting Files/main.m @@ -1,6 +1,6 @@ // // main.m -// PiwikTrackeriOSDemo +// MatomoTrackeriOSDemo // // Created by Mattias Levin on 9/16/13. // Copyright (c) 2013 Mattias Levin. All rights reserved. diff --git a/Example/ios/iOS Example/UserIDViewController.swift b/Example/ios/iOS Example/UserIDViewController.swift index 32477422..6a92970b 100644 --- a/Example/ios/iOS Example/UserIDViewController.swift +++ b/Example/ios/iOS Example/UserIDViewController.swift @@ -1,5 +1,5 @@ import UIKit -import PiwikTracker +import MatomoTracker class UserIDViewController: UIViewController { @IBOutlet weak var userIDTextField: UITextField! @@ -8,13 +8,13 @@ class UserIDViewController: UIViewController { @IBAction func signinAction(_ sender: UIButton) { if (self.userIDTextField.text != nil) && (self.userIDTextField.text?.characters.count)! > 0 { - PiwikTracker.shared?.visitorId = self.userIDTextField.text + MatomoTracker.shared?.visitorId = self.userIDTextField.text toggleState() } } @IBAction func signOutAction(_ sender: UIButton) { - PiwikTracker.shared?.visitorId = nil + MatomoTracker.shared?.visitorId = nil toggleState() } @@ -24,18 +24,18 @@ class UserIDViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - PiwikTracker.shared?.track(view: ["menu","user id"]) + MatomoTracker.shared?.track(view: ["menu","user id"]) } private func toggleState() { - self.userIDTextField.text = PiwikTracker.shared?.visitorId + self.userIDTextField.text = MatomoTracker.shared?.visitorId self.signinButton.isEnabled = !isVisitorIdValid() self.signoutButton.isEnabled = !self.signinButton.isEnabled } private func isVisitorIdValid() -> Bool { - let currentVisitorId = PiwikTracker.shared?.visitorId + let currentVisitorId = MatomoTracker.shared?.visitorId return (currentVisitorId != nil) && (currentVisitorId?.characters.count)! > 0 } diff --git a/Example/ios/ios.xcodeproj/project.pbxproj b/Example/ios/ios.xcodeproj/project.pbxproj index 39e92778..fb5118fc 100644 --- a/Example/ios/ios.xcodeproj/project.pbxproj +++ b/Example/ios/ios.xcodeproj/project.pbxproj @@ -328,11 +328,11 @@ ); inputPaths = ( "${SRCROOT}/../../Pods/Target Support Files/Pods-example-ios/Pods-example-ios-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/PiwikTracker-iOS/PiwikTracker.framework", + "${BUILT_PRODUCTS_DIR}/MatomoTracker-iOS/MatomoTracker.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PiwikTracker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MatomoTracker.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -496,7 +496,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.8; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; }; name = Debug; }; @@ -534,7 +533,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MACOSX_DEPLOYMENT_TARGET = 10.8; - SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; @@ -552,8 +550,9 @@ INFOPLIST_FILE = "iOS Example/Supporting Files/PiwikTrackeriOSDemo-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.iostracker; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.iostracker; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "iOS Example/ios-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.0; @@ -574,8 +573,9 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_CFLAGS = "$(inherited)"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.iostracker; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.iostracker; PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "iOS Example/ios-Bridging-Header.h"; SWIFT_VERSION = 4.0; WRAPPER_EXTENSION = app; diff --git a/Example/macos/macos.xcodeproj/project.pbxproj b/Example/macos/macos.xcodeproj/project.pbxproj index 755cc112..fdd5dc1c 100644 --- a/Example/macos/macos.xcodeproj/project.pbxproj +++ b/Example/macos/macos.xcodeproj/project.pbxproj @@ -181,11 +181,11 @@ ); inputPaths = ( "${SRCROOT}/../../Pods/Target Support Files/Pods-example-macos/Pods-example-macos-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/PiwikTracker-macOS/PiwikTracker.framework", + "${BUILT_PRODUCTS_DIR}/MatomoTracker-macOS/MatomoTracker.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PiwikTracker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MatomoTracker.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/Example/macos/macos/ViewController.swift b/Example/macos/macos/ViewController.swift index 9543700f..19f347b6 100644 --- a/Example/macos/macos/ViewController.swift +++ b/Example/macos/macos/ViewController.swift @@ -7,7 +7,7 @@ // import Cocoa -import PiwikTracker +import MatomoTracker class ViewController: NSViewController { @@ -19,9 +19,9 @@ class ViewController: NSViewController { override func viewDidAppear() { super.viewDidAppear() - PiwikTracker.configureSharedInstance(withSiteID: "", baseURL: URL(string:"http://example.com/piwik.php")!) - PiwikTracker.shared?.track(view: ["start"]) - PiwikTracker.shared?.dispatch() + MatomoTracker.configureSharedInstance(withSiteID: "", baseURL: URL(string:"http://example.com/piwik.php")!) + MatomoTracker.shared?.track(view: ["start"]) + MatomoTracker.shared?.dispatch() } override var representedObject: Any? { diff --git a/Example/tvos/tvos.xcodeproj/project.pbxproj b/Example/tvos/tvos.xcodeproj/project.pbxproj index f01e3436..848dc413 100644 --- a/Example/tvos/tvos.xcodeproj/project.pbxproj +++ b/Example/tvos/tvos.xcodeproj/project.pbxproj @@ -162,11 +162,11 @@ ); inputPaths = ( "${SRCROOT}/../../Pods/Target Support Files/Pods-example-tvos/Pods-example-tvos-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/PiwikTracker-tvOS/PiwikTracker.framework", + "${BUILT_PRODUCTS_DIR}/MatomoTracker-tvOS/MatomoTracker.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PiwikTracker.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MatomoTracker.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/Example/tvos/tvos/ViewController.swift b/Example/tvos/tvos/ViewController.swift index 8136e6b2..14e430ab 100644 --- a/Example/tvos/tvos/ViewController.swift +++ b/Example/tvos/tvos/ViewController.swift @@ -7,16 +7,16 @@ // import UIKit -import PiwikTracker +import MatomoTracker class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. - PiwikTracker.configureSharedInstance(withSiteID: "", baseURL: URL(string:"http://example.com/piwik.php")!) - PiwikTracker.shared?.track(view: ["start"]) - PiwikTracker.shared?.dispatch() + MatomoTracker.configureSharedInstance(withSiteID: "", baseURL: URL(string:"http://example.com/piwik.php")!) + MatomoTracker.shared?.track(view: ["start"]) + MatomoTracker.shared?.dispatch() } override func didReceiveMemoryWarning() { diff --git a/MatomoTracker.podspec b/MatomoTracker.podspec new file mode 100644 index 00000000..20b87dcc --- /dev/null +++ b/MatomoTracker.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |spec| + spec.name = "MatomoTracker" + spec.version = "4.4.2" + spec.summary = "A Matomo tracker written in Swift for iOS, tvOS and macOS apps." + spec.homepage = "https://github.com/matomo-org/matomo-sdk-ios/" + spec.license = { :type => 'MIT', :file => 'LICENSE.md' } + spec.author = { "Mattias Levin" => "mattias.levin@gmail.com", "Cornelius Horstmann" => "site-github@brototyp.de" } + spec.source = { :git => "https://github.com/matomo-org/matomo-sdk-ios.git", :tag => "v#{spec.version}" } + spec.ios.deployment_target = '8.0' + spec.tvos.deployment_target = '9.0' + spec.osx.deployment_target = '10.12' + spec.requires_arc = true + spec.default_subspecs = 'Core' + + spec.subspec 'Core' do |core| + core.source_files = 'MatomoTracker/*.swift' + end +end diff --git a/PiwikTracker.xcodeproj/project.pbxproj b/MatomoTracker.xcodeproj/project.pbxproj similarity index 78% rename from PiwikTracker.xcodeproj/project.pbxproj rename to MatomoTracker.xcodeproj/project.pbxproj index fad596d5..27ba2f65 100644 --- a/PiwikTracker.xcodeproj/project.pbxproj +++ b/MatomoTracker.xcodeproj/project.pbxproj @@ -7,7 +7,7 @@ objects = { /* Begin PBXBuildFile section */ - 1F092C141E224C3E00394B30 /* PiwikUserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F092C131E224C3E00394B30 /* PiwikUserDefaults.swift */; }; + 1F092C141E224C3E00394B30 /* MatomoUserDefaults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F092C131E224C3E00394B30 /* MatomoUserDefaults.swift */; }; 1F092C161E225E0200394B30 /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F092C151E225E0200394B30 /* Event.swift */; }; 1F092C1A1E26B44500394B30 /* Dispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F092C191E26B44500394B30 /* Dispatcher.swift */; }; 1F0A15CE1E6335D800FEAE72 /* Visitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0A15CD1E6335D800FEAE72 /* Visitor.swift */; }; @@ -18,7 +18,7 @@ 1F38EBF81EE568D10021FBF8 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F38EBF71EE568D10021FBF8 /* Logger.swift */; }; 1F3CA58C1E09A30600121FDC /* Queue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F3CA58B1E09A30600121FDC /* Queue.swift */; }; 1F5D08721F5D79AD0064314F /* AutoTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F5D08711F5D79AD0064314F /* AutoTracker.swift */; }; - 1F6F0CD71E61E35A008170FC /* PiwikTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CD61E61E35A008170FC /* PiwikTracker.swift */; }; + 1F6F0CD71E61E35A008170FC /* MatomoTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CD61E61E35A008170FC /* MatomoTracker.swift */; }; 1F6F0CDC1E61E377008170FC /* DispatcherStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CD81E61E377008170FC /* DispatcherStub.swift */; }; 1F6F0CDD1E61E377008170FC /* QueueStub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CD91E61E377008170FC /* QueueStub.swift */; }; 1F6F0CDE1E61E377008170FC /* TrackerFixtures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CDA1E61E377008170FC /* TrackerFixtures.swift */; }; @@ -26,14 +26,14 @@ 1F6F0CE11E61E4F3008170FC /* URLSessionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F6F0CE01E61E4F3008170FC /* URLSessionDispatcher.swift */; }; 1F7C667F1F8C096F0066CC64 /* MainThread.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F7C667E1F8C096F0066CC64 /* MainThread.swift */; }; 1F80856F1E6B4B9800A61AAF /* Locale+HttpAcceptLanguage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F80856E1E6B4B9800A61AAF /* Locale+HttpAcceptLanguage.swift */; }; - 1FAA68D92007ABDE009B4B04 /* EventSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAA68D82007ABDE009B4B04 /* EventSerializer.swift */; }; - 1FAA68DB2007BC3C009B4B04 /* EventSerializerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FAA68DA2007BC3C009B4B04 /* EventSerializerSpec.swift */; }; - 1FCA6D451DBE0B2F0033F01C /* PiwikTracker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FCA6D3B1DBE0B2F0033F01C /* PiwikTracker.framework */; }; - 1FCA6D4C1DBE0B2F0033F01C /* PiwikTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCA6D3E1DBE0B2F0033F01C /* PiwikTracker.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F963072201B236E007B2AE7 /* EventSerializerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F963071201B236E007B2AE7 /* EventSerializerSpec.swift */; }; + 1FCA6D451DBE0B2F0033F01C /* MatomoTracker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FCA6D3B1DBE0B2F0033F01C /* MatomoTracker.framework */; }; + 1FCA6D4C1DBE0B2F0033F01C /* MatomoTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FCA6D3E1DBE0B2F0033F01C /* MatomoTracker.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1FCFF0241F82C7A50038BC17 /* CustomDimension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDC917B1F1A64BB0046F506 /* CustomDimension.swift */; }; + 1FD9E01C201B22A8006C3AD3 /* EventSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD9E01B201B22A8006C3AD3 /* EventSerializer.swift */; }; 1FDC917F1F1A65150046F506 /* Application.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDC917D1F1A65150046F506 /* Application.swift */; }; 1FDC91801F1A65150046F506 /* Device.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDC917E1F1A65150046F506 /* Device.swift */; }; - 82A551CEC50ABB2EAD50FC4E /* Pods_PiwikTrackerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68F0C25DEF98C13D32CC46DD /* Pods_PiwikTrackerTests.framework */; }; + 5804E9A4755E642D58301330 /* Pods_MatomoTrackerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63DC1BA4812B98CA8037194A /* Pods_MatomoTrackerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -47,7 +47,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1F092C131E224C3E00394B30 /* PiwikUserDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PiwikUserDefaults.swift; sourceTree = ""; }; + 1F092C131E224C3E00394B30 /* MatomoUserDefaults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatomoUserDefaults.swift; sourceTree = ""; }; 1F092C151E225E0200394B30 /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; }; 1F092C191E26B44500394B30 /* Dispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Dispatcher.swift; sourceTree = ""; }; 1F0A15CD1E6335D800FEAE72 /* Visitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Visitor.swift; sourceTree = ""; }; @@ -58,7 +58,7 @@ 1F38EBF71EE568D10021FBF8 /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 1F3CA58B1E09A30600121FDC /* Queue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Queue.swift; sourceTree = ""; }; 1F5D08711F5D79AD0064314F /* AutoTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutoTracker.swift; sourceTree = ""; }; - 1F6F0CD61E61E35A008170FC /* PiwikTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PiwikTracker.swift; sourceTree = ""; }; + 1F6F0CD61E61E35A008170FC /* MatomoTracker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatomoTracker.swift; sourceTree = ""; }; 1F6F0CD81E61E377008170FC /* DispatcherStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DispatcherStub.swift; sourceTree = ""; }; 1F6F0CD91E61E377008170FC /* QueueStub.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueueStub.swift; sourceTree = ""; }; 1F6F0CDA1E61E377008170FC /* TrackerFixtures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackerFixtures.swift; sourceTree = ""; }; @@ -66,18 +66,21 @@ 1F6F0CE01E61E4F3008170FC /* URLSessionDispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = URLSessionDispatcher.swift; sourceTree = ""; }; 1F7C667E1F8C096F0066CC64 /* MainThread.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainThread.swift; sourceTree = ""; }; 1F80856E1E6B4B9800A61AAF /* Locale+HttpAcceptLanguage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Locale+HttpAcceptLanguage.swift"; sourceTree = ""; }; - 1FAA68D82007ABDE009B4B04 /* EventSerializer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventSerializer.swift; sourceTree = ""; }; - 1FAA68DA2007BC3C009B4B04 /* EventSerializerSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventSerializerSpec.swift; sourceTree = ""; }; - 1FCA6D3B1DBE0B2F0033F01C /* PiwikTracker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PiwikTracker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1FCA6D3E1DBE0B2F0033F01C /* PiwikTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PiwikTracker.h; sourceTree = ""; }; + 1F963071201B236E007B2AE7 /* EventSerializerSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventSerializerSpec.swift; sourceTree = ""; }; + 1FCA6D3B1DBE0B2F0033F01C /* MatomoTracker.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MatomoTracker.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 1FCA6D3E1DBE0B2F0033F01C /* MatomoTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MatomoTracker.h; sourceTree = ""; }; 1FCA6D3F1DBE0B2F0033F01C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1FCA6D441DBE0B2F0033F01C /* PiwikTrackerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PiwikTrackerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 1FCA6D441DBE0B2F0033F01C /* MatomoTrackerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MatomoTrackerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 1FCA6D4B1DBE0B2F0033F01C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1FD9E01B201B22A8006C3AD3 /* EventSerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventSerializer.swift; sourceTree = ""; }; 1FDC917B1F1A64BB0046F506 /* CustomDimension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomDimension.swift; sourceTree = ""; }; 1FDC917D1F1A65150046F506 /* Application.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Application.swift; sourceTree = ""; }; 1FDC917E1F1A65150046F506 /* Device.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Device.swift; sourceTree = ""; }; + 2FD38CC515C49A9A8922407D /* Pods-MatomoTrackerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MatomoTrackerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MatomoTrackerTests/Pods-MatomoTrackerTests.release.xcconfig"; sourceTree = ""; }; + 63DC1BA4812B98CA8037194A /* Pods_MatomoTrackerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MatomoTrackerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 68F0C25DEF98C13D32CC46DD /* Pods_PiwikTrackerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PiwikTrackerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8F688B0F18F298B5E61552AC /* Pods-PiwikTrackerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiwikTrackerTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-PiwikTrackerTests/Pods-PiwikTrackerTests.release.xcconfig"; sourceTree = ""; }; + ECADEAA1E653EE3DA30A1FDC /* Pods-MatomoTrackerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MatomoTrackerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MatomoTrackerTests/Pods-MatomoTrackerTests.debug.xcconfig"; sourceTree = ""; }; FD284F50B998823EAFB0CEE9 /* Pods-PiwikTrackerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PiwikTrackerTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PiwikTrackerTests/Pods-PiwikTrackerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -93,8 +96,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1FCA6D451DBE0B2F0033F01C /* PiwikTracker.framework in Frameworks */, - 82A551CEC50ABB2EAD50FC4E /* Pods_PiwikTrackerTests.framework in Frameworks */, + 1FCA6D451DBE0B2F0033F01C /* MatomoTracker.framework in Frameworks */, + 5804E9A4755E642D58301330 /* Pods_MatomoTrackerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -131,8 +134,8 @@ 1FCA6D311DBE0B2F0033F01C = { isa = PBXGroup; children = ( - 1FCA6D3D1DBE0B2F0033F01C /* PiwikTracker */, - 1FCA6D481DBE0B2F0033F01C /* PiwikTrackerTests */, + 1FCA6D3D1DBE0B2F0033F01C /* MatomoTracker */, + 1FCA6D481DBE0B2F0033F01C /* MatomoTrackerTests */, 1FCA6D3C1DBE0B2F0033F01C /* Products */, 2031C9E411023782603AB505 /* Pods */, ADAE39D28F21B08F51A5C6A8 /* Frameworks */, @@ -142,36 +145,36 @@ 1FCA6D3C1DBE0B2F0033F01C /* Products */ = { isa = PBXGroup; children = ( - 1FCA6D3B1DBE0B2F0033F01C /* PiwikTracker.framework */, - 1FCA6D441DBE0B2F0033F01C /* PiwikTrackerTests.xctest */, + 1FCA6D3B1DBE0B2F0033F01C /* MatomoTracker.framework */, + 1FCA6D441DBE0B2F0033F01C /* MatomoTrackerTests.xctest */, ); name = Products; sourceTree = ""; }; - 1FCA6D3D1DBE0B2F0033F01C /* PiwikTracker */ = { + 1FCA6D3D1DBE0B2F0033F01C /* MatomoTracker */ = { isa = PBXGroup; children = ( 1F80856D1E6B4B8000A61AAF /* Extensions */, 1F0A15CC1E6335CA00FEAE72 /* Event */, 1F092C191E26B44500394B30 /* Dispatcher.swift */, 1F1949F11E17A91100458199 /* MemoryQueue.swift */, - 1F092C131E224C3E00394B30 /* PiwikUserDefaults.swift */, + 1F092C131E224C3E00394B30 /* MatomoUserDefaults.swift */, 1F3CA58B1E09A30600121FDC /* Queue.swift */, - 1F6F0CD61E61E35A008170FC /* PiwikTracker.swift */, + 1F6F0CD61E61E35A008170FC /* MatomoTracker.swift */, 1F6F0CE01E61E4F3008170FC /* URLSessionDispatcher.swift */, 1FDC917B1F1A64BB0046F506 /* CustomDimension.swift */, 1F38EBF71EE568D10021FBF8 /* Logger.swift */, 1FDC917D1F1A65150046F506 /* Application.swift */, 1FDC917E1F1A65150046F506 /* Device.swift */, 1F7C667E1F8C096F0066CC64 /* MainThread.swift */, + 1FD9E01B201B22A8006C3AD3 /* EventSerializer.swift */, 1FCA6D3F1DBE0B2F0033F01C /* Info.plist */, - 1FCA6D3E1DBE0B2F0033F01C /* PiwikTracker.h */, - 1FAA68D82007ABDE009B4B04 /* EventSerializer.swift */, + 1FCA6D3E1DBE0B2F0033F01C /* MatomoTracker.h */, ); - path = PiwikTracker; + path = MatomoTracker; sourceTree = ""; }; - 1FCA6D481DBE0B2F0033F01C /* PiwikTrackerTests */ = { + 1FCA6D481DBE0B2F0033F01C /* MatomoTrackerTests */ = { isa = PBXGroup; children = ( 1F1949F51E17B2A400458199 /* Fixtures */, @@ -180,10 +183,10 @@ 1F6F0CD91E61E377008170FC /* QueueStub.swift */, 1F6F0CDB1E61E377008170FC /* TrackerSpec.swift */, 1F5D08711F5D79AD0064314F /* AutoTracker.swift */, + 1F963071201B236E007B2AE7 /* EventSerializerSpec.swift */, 1FCA6D4B1DBE0B2F0033F01C /* Info.plist */, - 1FAA68DA2007BC3C009B4B04 /* EventSerializerSpec.swift */, ); - path = PiwikTrackerTests; + path = MatomoTrackerTests; sourceTree = ""; }; 2031C9E411023782603AB505 /* Pods */ = { @@ -191,6 +194,8 @@ children = ( FD284F50B998823EAFB0CEE9 /* Pods-PiwikTrackerTests.debug.xcconfig */, 8F688B0F18F298B5E61552AC /* Pods-PiwikTrackerTests.release.xcconfig */, + ECADEAA1E653EE3DA30A1FDC /* Pods-MatomoTrackerTests.debug.xcconfig */, + 2FD38CC515C49A9A8922407D /* Pods-MatomoTrackerTests.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -199,6 +204,7 @@ isa = PBXGroup; children = ( 68F0C25DEF98C13D32CC46DD /* Pods_PiwikTrackerTests.framework */, + 63DC1BA4812B98CA8037194A /* Pods_MatomoTrackerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -210,16 +216,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1FCA6D4C1DBE0B2F0033F01C /* PiwikTracker.h in Headers */, + 1FCA6D4C1DBE0B2F0033F01C /* MatomoTracker.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 1FCA6D3A1DBE0B2F0033F01C /* PiwikTracker */ = { + 1FCA6D3A1DBE0B2F0033F01C /* MatomoTracker */ = { isa = PBXNativeTarget; - buildConfigurationList = 1FCA6D4F1DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "PiwikTracker" */; + buildConfigurationList = 1FCA6D4F1DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "MatomoTracker" */; buildPhases = ( 1FCA6D361DBE0B2F0033F01C /* Sources */, 1FCA6D371DBE0B2F0033F01C /* Frameworks */, @@ -230,14 +236,14 @@ ); dependencies = ( ); - name = PiwikTracker; + name = MatomoTracker; productName = PiwikTracker; - productReference = 1FCA6D3B1DBE0B2F0033F01C /* PiwikTracker.framework */; + productReference = 1FCA6D3B1DBE0B2F0033F01C /* MatomoTracker.framework */; productType = "com.apple.product-type.framework"; }; - 1FCA6D431DBE0B2F0033F01C /* PiwikTrackerTests */ = { + 1FCA6D431DBE0B2F0033F01C /* MatomoTrackerTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 1FCA6D521DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "PiwikTrackerTests" */; + buildConfigurationList = 1FCA6D521DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "MatomoTrackerTests" */; buildPhases = ( 40E940918D712CC15E5735CE /* [CP] Check Pods Manifest.lock */, 1FCA6D401DBE0B2F0033F01C /* Sources */, @@ -251,9 +257,9 @@ dependencies = ( 1FCA6D471DBE0B2F0033F01C /* PBXTargetDependency */, ); - name = PiwikTrackerTests; + name = MatomoTrackerTests; productName = PiwikTrackerTests; - productReference = 1FCA6D441DBE0B2F0033F01C /* PiwikTrackerTests.xctest */; + productReference = 1FCA6D441DBE0B2F0033F01C /* MatomoTrackerTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ @@ -264,7 +270,7 @@ attributes = { LastSwiftUpdateCheck = 0800; LastUpgradeCheck = 0900; - ORGANIZATIONNAME = PIWIK; + ORGANIZATIONNAME = Matomo; TargetAttributes = { 1FCA6D3A1DBE0B2F0033F01C = { CreatedOnToolsVersion = 8.0; @@ -278,7 +284,7 @@ }; }; }; - buildConfigurationList = 1FCA6D351DBE0B2F0033F01C /* Build configuration list for PBXProject "PiwikTracker" */; + buildConfigurationList = 1FCA6D351DBE0B2F0033F01C /* Build configuration list for PBXProject "MatomoTracker" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -290,8 +296,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 1FCA6D3A1DBE0B2F0033F01C /* PiwikTracker */, - 1FCA6D431DBE0B2F0033F01C /* PiwikTrackerTests */, + 1FCA6D3A1DBE0B2F0033F01C /* MatomoTracker */, + 1FCA6D431DBE0B2F0033F01C /* MatomoTrackerTests */, ); }; /* End PBXProject section */ @@ -320,7 +326,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-PiwikTrackerTests/Pods-PiwikTrackerTests-frameworks.sh", + "${SRCROOT}/Pods/Target Support Files/Pods-MatomoTrackerTests/Pods-MatomoTrackerTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", ); @@ -331,7 +337,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PiwikTrackerTests/Pods-PiwikTrackerTests-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MatomoTrackerTests/Pods-MatomoTrackerTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 40E940918D712CC15E5735CE /* [CP] Check Pods Manifest.lock */ = { @@ -345,7 +351,7 @@ ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-PiwikTrackerTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-MatomoTrackerTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -364,7 +370,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PiwikTrackerTests/Pods-PiwikTrackerTests-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MatomoTrackerTests/Pods-MatomoTrackerTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -375,8 +381,8 @@ buildActionMask = 2147483647; files = ( 1F092C161E225E0200394B30 /* Event.swift in Sources */, - 1F092C141E224C3E00394B30 /* PiwikUserDefaults.swift in Sources */, - 1F6F0CD71E61E35A008170FC /* PiwikTracker.swift in Sources */, + 1F092C141E224C3E00394B30 /* MatomoUserDefaults.swift in Sources */, + 1F6F0CD71E61E35A008170FC /* MatomoTracker.swift in Sources */, 1F1949F21E17A91100458199 /* MemoryQueue.swift in Sources */, 1FDC91801F1A65150046F506 /* Device.swift in Sources */, 1F3CA58C1E09A30600121FDC /* Queue.swift in Sources */, @@ -386,7 +392,7 @@ 1FCFF0241F82C7A50038BC17 /* CustomDimension.swift in Sources */, 1F7C667F1F8C096F0066CC64 /* MainThread.swift in Sources */, 1F80856F1E6B4B9800A61AAF /* Locale+HttpAcceptLanguage.swift in Sources */, - 1FAA68D92007ABDE009B4B04 /* EventSerializer.swift in Sources */, + 1FD9E01C201B22A8006C3AD3 /* EventSerializer.swift in Sources */, 1F0A15CE1E6335D800FEAE72 /* Visitor.swift in Sources */, 1FDC917F1F1A65150046F506 /* Application.swift in Sources */, 1F6F0CE11E61E4F3008170FC /* URLSessionDispatcher.swift in Sources */, @@ -400,7 +406,7 @@ 1F1949F81E17B2C800458199 /* MemoryQueueFixtures.swift in Sources */, 1F6F0CDD1E61E377008170FC /* QueueStub.swift in Sources */, 1F6F0CDC1E61E377008170FC /* DispatcherStub.swift in Sources */, - 1FAA68DB2007BC3C009B4B04 /* EventSerializerSpec.swift in Sources */, + 1F963072201B236E007B2AE7 /* EventSerializerSpec.swift in Sources */, 1F5D08721F5D79AD0064314F /* AutoTracker.swift in Sources */, 1F6F0CDE1E61E377008170FC /* TrackerFixtures.swift in Sources */, 1F1949F41E17B06600458199 /* MemoryQueueSpec.swift in Sources */, @@ -413,7 +419,7 @@ /* Begin PBXTargetDependency section */ 1FCA6D471DBE0B2F0033F01C /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 1FCA6D3A1DBE0B2F0033F01C /* PiwikTracker */; + target = 1FCA6D3A1DBE0B2F0033F01C /* MatomoTracker */; targetProxy = 1FCA6D461DBE0B2F0033F01C /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -470,7 +476,6 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -523,7 +528,6 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -541,11 +545,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = PiwikTracker/Info.plist; + INFOPLIST_FILE = MatomoTracker/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.PiwikTracker; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.MatomoTracker; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos macosx"; @@ -564,11 +568,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = PiwikTracker/Info.plist; + INFOPLIST_FILE = MatomoTracker/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.PiwikTracker; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.MatomoTracker; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos appletvos macosx"; @@ -579,14 +583,18 @@ }; 1FCA6D531DBE0B2F0033F01C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FD284F50B998823EAFB0CEE9 /* Pods-PiwikTrackerTests.debug.xcconfig */; + baseConfigurationReference = ECADEAA1E653EE3DA30A1FDC /* Pods-MatomoTrackerTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = PiwikTrackerTests/Info.plist; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = MatomoTrackerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.PiwikTrackerTests; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.MatomoTrackerTests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 3.0; }; @@ -594,14 +602,18 @@ }; 1FCA6D541DBE0B2F0033F01C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8F688B0F18F298B5E61552AC /* Pods-PiwikTrackerTests.release.xcconfig */; + baseConfigurationReference = 2FD38CC515C49A9A8922407D /* Pods-MatomoTrackerTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CLANG_ENABLE_MODULES = YES; - INFOPLIST_FILE = PiwikTrackerTests/Info.plist; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = MatomoTrackerTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.piwik.PiwikTrackerTests; + PRODUCT_BUNDLE_IDENTIFIER = org.matomo.MatomoTrackerTests; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_VERSION = 3.0; }; name = Release; @@ -609,7 +621,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 1FCA6D351DBE0B2F0033F01C /* Build configuration list for PBXProject "PiwikTracker" */ = { + 1FCA6D351DBE0B2F0033F01C /* Build configuration list for PBXProject "MatomoTracker" */ = { isa = XCConfigurationList; buildConfigurations = ( 1FCA6D4D1DBE0B2F0033F01C /* Debug */, @@ -618,7 +630,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1FCA6D4F1DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "PiwikTracker" */ = { + 1FCA6D4F1DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "MatomoTracker" */ = { isa = XCConfigurationList; buildConfigurations = ( 1FCA6D501DBE0B2F0033F01C /* Debug */, @@ -627,7 +639,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1FCA6D521DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "PiwikTrackerTests" */ = { + 1FCA6D521DBE0B2F0033F01C /* Build configuration list for PBXNativeTarget "MatomoTrackerTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 1FCA6D531DBE0B2F0033F01C /* Debug */, diff --git a/PiwikTracker.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MatomoTracker.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from PiwikTracker.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to MatomoTracker.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/PiwikTracker.xcodeproj/xcshareddata/xcschemes/PiwikTracker.xcscheme b/MatomoTracker.xcodeproj/xcshareddata/xcschemes/MatomoTracker.xcscheme similarity index 67% rename from PiwikTracker.xcodeproj/xcshareddata/xcschemes/PiwikTracker.xcscheme rename to MatomoTracker.xcodeproj/xcshareddata/xcschemes/MatomoTracker.xcscheme index 781547f0..8c63fa70 100644 --- a/PiwikTracker.xcodeproj/xcshareddata/xcschemes/PiwikTracker.xcscheme +++ b/MatomoTracker.xcodeproj/xcshareddata/xcschemes/MatomoTracker.xcscheme @@ -15,9 +15,23 @@ + BuildableName = "MatomoTracker.framework" + BlueprintName = "MatomoTracker" + ReferencedContainer = "container:MatomoTracker.xcodeproj"> + + + + @@ -34,21 +48,12 @@ + BuildableName = "MatomoTrackerTests.xctest" + BlueprintName = "MatomoTrackerTests" + ReferencedContainer = "container:MatomoTracker.xcodeproj"> - - - - @@ -67,9 +72,9 @@ + BuildableName = "MatomoTracker.framework" + BlueprintName = "MatomoTracker" + ReferencedContainer = "container:MatomoTracker.xcodeproj"> @@ -85,9 +90,9 @@ + BuildableName = "MatomoTracker.framework" + BlueprintName = "MatomoTracker" + ReferencedContainer = "container:MatomoTracker.xcodeproj"> diff --git a/PiwikTracker.xcworkspace/contents.xcworkspacedata b/MatomoTracker.xcworkspace/contents.xcworkspacedata similarity index 74% rename from PiwikTracker.xcworkspace/contents.xcworkspacedata rename to MatomoTracker.xcworkspace/contents.xcworkspacedata index b0500593..4bc10b25 100644 --- a/PiwikTracker.xcworkspace/contents.xcworkspacedata +++ b/MatomoTracker.xcworkspace/contents.xcworkspacedata @@ -15,9 +15,12 @@ + location = "group:/Users/corneliushorstmann/Development/piwik-sdk-ios/MatomoTracker.xcodeproj"> + + diff --git a/PiwikTracker/Application.swift b/MatomoTracker/Application.swift similarity index 100% rename from PiwikTracker/Application.swift rename to MatomoTracker/Application.swift diff --git a/PiwikTracker/CustomDimension.swift b/MatomoTracker/CustomDimension.swift similarity index 91% rename from PiwikTracker/CustomDimension.swift rename to MatomoTracker/CustomDimension.swift index c7549160..38dece0b 100644 --- a/PiwikTracker/CustomDimension.swift +++ b/MatomoTracker/CustomDimension.swift @@ -2,7 +2,7 @@ import Foundation /// For more information on custom dimensions visit https://piwik.org/docs/custom-dimensions/ public struct CustomDimension { - /// The index of the dimension. A dimension with this index must be setup in the piwik backend. + /// The index of the dimension. A dimension with this index must be setup in the Matomo backend. let index: Int /// The value you want to set for this dimension. diff --git a/PiwikTracker/Device.swift b/MatomoTracker/Device.swift similarity index 100% rename from PiwikTracker/Device.swift rename to MatomoTracker/Device.swift diff --git a/PiwikTracker/Dispatcher.swift b/MatomoTracker/Dispatcher.swift similarity index 100% rename from PiwikTracker/Dispatcher.swift rename to MatomoTracker/Dispatcher.swift diff --git a/PiwikTracker/Event.swift b/MatomoTracker/Event.swift similarity index 90% rename from PiwikTracker/Event.swift rename to MatomoTracker/Event.swift index ec752f9a..37866988 100644 --- a/PiwikTracker/Event.swift +++ b/MatomoTracker/Event.swift @@ -71,7 +71,7 @@ public struct Event { } extension Event { - public init(tracker: PiwikTracker, action: [String], url: URL? = nil, referer: URL? = nil, eventCategory: String? = nil, eventAction: String? = nil, eventName: String? = nil, eventValue: Float? = nil, customTrackingParameters: [String:String] = [:], dimensions: [CustomDimension] = []) { + public init(tracker: MatomoTracker, action: [String], url: URL? = nil, referer: URL? = nil, eventCategory: String? = nil, eventAction: String? = nil, eventName: String? = nil, eventValue: Float? = nil, customTrackingParameters: [String:String] = [:], dimensions: [CustomDimension] = []) { self.siteId = tracker.siteId self.uuid = NSUUID() self.visitor = tracker.visitor diff --git a/PiwikTracker/EventSerializer.swift b/MatomoTracker/EventSerializer.swift similarity index 100% rename from PiwikTracker/EventSerializer.swift rename to MatomoTracker/EventSerializer.swift diff --git a/PiwikTracker/Info.plist b/MatomoTracker/Info.plist similarity index 100% rename from PiwikTracker/Info.plist rename to MatomoTracker/Info.plist diff --git a/PiwikTracker/Locale+HttpAcceptLanguage.swift b/MatomoTracker/Locale+HttpAcceptLanguage.swift similarity index 100% rename from PiwikTracker/Locale+HttpAcceptLanguage.swift rename to MatomoTracker/Locale+HttpAcceptLanguage.swift diff --git a/PiwikTracker/Logger.swift b/MatomoTracker/Logger.swift similarity index 97% rename from PiwikTracker/Logger.swift rename to MatomoTracker/Logger.swift index 375dec1e..93eaac3c 100644 --- a/PiwikTracker/Logger.swift +++ b/MatomoTracker/Logger.swift @@ -70,7 +70,7 @@ public final class DisabledLogger: Logger { guard level.rawValue >= minLevel.rawValue else { return } let messageToPrint = message() dispatchQueue.async { - print("PiwikTracker [\(level.shortcut)] \(messageToPrint)") + print("MatomoTracker [\(level.shortcut)] \(messageToPrint)") } } } diff --git a/PiwikTracker/MainThread.swift b/MatomoTracker/MainThread.swift similarity index 100% rename from PiwikTracker/MainThread.swift rename to MatomoTracker/MainThread.swift diff --git a/MatomoTracker/MatomoTracker.h b/MatomoTracker/MatomoTracker.h new file mode 100644 index 00000000..896585c7 --- /dev/null +++ b/MatomoTracker/MatomoTracker.h @@ -0,0 +1,11 @@ +@import Foundation; + +//! Project version number for MatomoTracker. +FOUNDATION_EXPORT double MatomoTrackerVersionNumber; + +//! Project version string for MatomoTracker. +FOUNDATION_EXPORT const unsigned char MatomoTrackerVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/PiwikTracker/PiwikTracker.swift b/MatomoTracker/MatomoTracker.swift similarity index 88% rename from PiwikTracker/PiwikTracker.swift rename to MatomoTracker/MatomoTracker.swift index 42261e61..594863d2 100644 --- a/PiwikTracker/PiwikTracker.swift +++ b/MatomoTracker/MatomoTracker.swift @@ -1,20 +1,20 @@ import Foundation -/// The Piwik Tracker is a Swift framework to send analytics to the Piwik server. +/// The Matomo Tracker is a Swift framework to send analytics to the Matomo server. /// /// ## Basic Usage /// * Configure the shared instance as early as possible in your application lifecyle. /// * Use the track methods to track your views, events and more. -final public class PiwikTracker: NSObject { +final public class MatomoTracker: NSObject { /// Defines if the user opted out of tracking. When set to true, every event /// will be discarded immediately. This property is persisted between app launches. @objc public var isOptedOut: Bool { get { - return PiwikUserDefaults.standard.optOut + return MatomoUserDefaults.standard.optOut } set { - PiwikUserDefaults.standard.optOut = newValue + MatomoUserDefaults.standard.optOut = newValue } } @@ -22,10 +22,10 @@ final public class PiwikTracker: NSObject { /// is persisted between app launches. public var visitorId: String? { get { - return PiwikUserDefaults.standard.visitorUserId + return MatomoUserDefaults.standard.visitorUserId } set { - PiwikUserDefaults.standard.visitorUserId = newValue + MatomoUserDefaults.standard.visitorUserId = newValue visitor = Visitor.current() } } @@ -37,7 +37,7 @@ final public class PiwikTracker: NSObject { internal var dimensions: [CustomDimension] = [] - /// This logger is used to perform logging of all sorts of piwik related information. + /// This logger is used to perform logging of all sorts of Matomo related information. /// Per default it is a `DefaultLogger` with a `minLevel` of `LogLevel.warning`. You can /// set your own Logger with a custom `minLevel` or a complete custom logging mechanism. @objc public var logger: Logger = DefaultLogger(minLevel: .warning) @@ -48,7 +48,7 @@ final public class PiwikTracker: NSObject { /// Set the `contentBase` to nil, if you don't want to auto generate a url. @objc public var contentBase: URL? - internal static var _sharedInstance: PiwikTracker? + internal static var _sharedInstance: MatomoTracker? /// Create and Configure a new Tracker /// @@ -73,7 +73,7 @@ final public class PiwikTracker: NSObject { /// /// - Parameters: /// - siteId: The unique site id generated by the server when a new site was created. - /// - baseURL: The url of the piwik server. This url has to end in `piwik.php`. + /// - baseURL: The url of the Matomo server. This url has to end in `piwik.php`. /// - userAgent: An optional parameter for custom user agent. convenience public init(siteId: String, baseURL: URL, userAgent: String? = nil) { assert(baseURL.absoluteString.hasSuffix("piwik.php"), "The baseURL is expected to end in piwik.php") @@ -106,7 +106,7 @@ final public class PiwikTracker: NSObject { /// whenever the user leaves the application. @objc public func dispatch() { guard !isDispatching else { - logger.verbose("PiwikTracker is already dispatching.") + logger.verbose("MatomoTracker is already dispatching.") return } guard queue.eventCount > 0 else { @@ -181,24 +181,24 @@ final public class PiwikTracker: NSObject { } -extension PiwikTracker { +extension MatomoTracker { /// Starts a new Session /// /// Use this function to manually start a new Session. A new Session will be automatically created only on app start. /// You can use the AppDelegates `applicationWillEnterForeground` to start a new visit whenever the app enters foreground. public func startNewSession() { - PiwikUserDefaults.standard.previousVisit = PiwikUserDefaults.standard.currentVisit - PiwikUserDefaults.standard.currentVisit = Date() - PiwikUserDefaults.standard.totalNumberOfVisits += 1 + MatomoUserDefaults.standard.previousVisit = MatomoUserDefaults.standard.currentVisit + MatomoUserDefaults.standard.currentVisit = Date() + MatomoUserDefaults.standard.totalNumberOfVisits += 1 self.session = Session.current() } } // shared instance -extension PiwikTracker { +extension MatomoTracker { /// Returns the shared tracker. Will return nil if the tracker was not properly confured before. - @objc public static var shared: PiwikTracker? { + @objc public static var shared: MatomoTracker? { get { return _sharedInstance } } @@ -209,12 +209,12 @@ extension PiwikTracker { /// /// - Parameters: /// - siteId: The unique site id generated by the server when a new site was created. - /// - baseURL: The url of the piwik server. This url has to end in `piwik.php`. + /// - baseURL: The url of the Matomo server. This url has to end in `piwik.php`. /// - userAgent: An optional parameter for custom user agent. @objc public class func configureSharedInstance(withSiteID siteID: String, baseURL: URL, userAgent: String? = nil) { let queue = MemoryQueue() let dispatcher = URLSessionDispatcher(baseURL: baseURL, userAgent: userAgent) - self._sharedInstance = PiwikTracker.init(siteId: siteID, queue: queue, dispatcher: dispatcher) + self._sharedInstance = MatomoTracker.init(siteId: siteID, queue: queue, dispatcher: dispatcher) } /// Configures the shared instance. @@ -225,11 +225,11 @@ extension PiwikTracker { /// - queue: The queue to use to store all analytics until it is dispatched to the server. /// - dispatcher: The dispatcher to use to transmit all analytics to the server. public class func configureSharedInstance(withSiteID siteID: String, queue: Queue = MemoryQueue(), dispatcher: Dispatcher) { - self._sharedInstance = PiwikTracker(siteId: siteID, queue: queue, dispatcher: dispatcher) + self._sharedInstance = MatomoTracker(siteId: siteID, queue: queue, dispatcher: dispatcher) } } -extension PiwikTracker { +extension MatomoTracker { /// Tracks a custom Event /// @@ -240,7 +240,7 @@ extension PiwikTracker { /// Tracks a screenview. /// - /// This method can be used to track hierarchical screen names, e.g. screen/settings/register. Use this to create a hierarchical and logical grouping of screen views in the Piwik web interface. + /// This method can be used to track hierarchical screen names, e.g. screen/settings/register. Use this to create a hierarchical and logical grouping of screen views in the Matomo web interface. /// /// - Parameter view: An array of hierarchical screen names. /// - Parameter url: The optional url of the page that was viewed. @@ -250,9 +250,9 @@ extension PiwikTracker { queue(event: event) } - /// Tracks an event as described here: https://piwik.org/docs/event-tracking/ + /// Tracks an event as described here: https://matomo.org/docs/event-tracking/ - /// Track an event as described here: https://piwik.org/docs/event-tracking/ + /// Track an event as described here: https://matomo.org/docs/event-tracking/ /// /// - Parameters: /// - category: The Category of the Event @@ -267,15 +267,15 @@ extension PiwikTracker { } } -extension PiwikTracker { +extension MatomoTracker { /// Set a permanent custom dimension. /// /// Use this method to set a dimension that will be send with every event. This is best for Custom Dimensions in scope "Visit". A typical example could be any device information or the version of the app the visitor is using. /// - /// For more information on custom dimensions visit https://piwik.org/docs/custom-dimensions/ + /// For more information on custom dimensions visit https://matomo.org/docs/custom-dimensions/ /// /// - Parameter value: The value you want to set for this dimension. - /// - Parameter index: The index of the dimension. A dimension with this index must be setup in the piwik backend. + /// - Parameter index: The index of the dimension. A dimension with this index must be setup in the Matomo backend. @available(*, deprecated, message: "use setDimension: instead") public func set(value: String, forIndex index: Int) { let dimension = CustomDimension(index: index, value: value) @@ -287,7 +287,7 @@ extension PiwikTracker { /// /// Use this method to set a dimension that will be send with every event. This is best for Custom Dimensions in scope "Visit". A typical example could be any device information or the version of the app the visitor is using. /// - /// For more information on custom dimensions visit https://piwik.org/docs/custom-dimensions/ + /// For more information on custom dimensions visit https://matomo.org/docs/custom-dimensions/ /// /// - Parameter dimension: The Dimension to set public func set(dimension: CustomDimension) { @@ -308,7 +308,7 @@ extension PiwikTracker { } // Objective-c compatibility extension -extension PiwikTracker { +extension MatomoTracker { @objc public func track(view: [String], url: URL? = nil) { track(view: view, url: url, dimensions: []) diff --git a/PiwikTracker/PiwikUserDefaults.swift b/MatomoTracker/MatomoUserDefaults.swift similarity index 56% rename from PiwikTracker/PiwikUserDefaults.swift rename to MatomoTracker/MatomoUserDefaults.swift index 566fd654..bfd4bab1 100644 --- a/PiwikTracker/PiwikUserDefaults.swift +++ b/MatomoTracker/MatomoUserDefaults.swift @@ -1,85 +1,85 @@ import Foundation -/// PiwikUserDefaults is a wrapper for the UserDefaults with properties +/// MatomoUserDefaults is a wrapper for the UserDefaults with properties /// mapping onto values stored in the UserDefaults. /// All getter and setter are sideeffect free and automatically syncronize /// after writing. -internal struct PiwikUserDefaults { - static var standard = PiwikUserDefaults() +internal struct MatomoUserDefaults { + static var standard = MatomoUserDefaults() let userDefaults = UserDefaults.standard var totalNumberOfVisits: Int { get { - return userDefaults.integer(forKey: PiwikUserDefaults.Key.totalNumberOfVisits) + return userDefaults.integer(forKey: MatomoUserDefaults.Key.totalNumberOfVisits) } set { - userDefaults.set(newValue, forKey: PiwikUserDefaults.Key.totalNumberOfVisits) + userDefaults.set(newValue, forKey: MatomoUserDefaults.Key.totalNumberOfVisits) userDefaults.synchronize() } } var firstVisit: Date? { get { - return userDefaults.object(forKey: PiwikUserDefaults.Key.firstVistsTimestamp) as? Date + return userDefaults.object(forKey: MatomoUserDefaults.Key.firstVistsTimestamp) as? Date } set { - userDefaults.set(newValue, forKey: PiwikUserDefaults.Key.firstVistsTimestamp) + userDefaults.set(newValue, forKey: MatomoUserDefaults.Key.firstVistsTimestamp) userDefaults.synchronize() } } var previousVisit: Date? { get { - return userDefaults.object(forKey: PiwikUserDefaults.Key.previousVistsTimestamp) as? Date + return userDefaults.object(forKey: MatomoUserDefaults.Key.previousVistsTimestamp) as? Date } set { - userDefaults.set(newValue, forKey: PiwikUserDefaults.Key.previousVistsTimestamp) + userDefaults.set(newValue, forKey: MatomoUserDefaults.Key.previousVistsTimestamp) userDefaults.synchronize() } } var currentVisit: Date? { get { - return userDefaults.object(forKey: PiwikUserDefaults.Key.currentVisitTimestamp) as? Date + return userDefaults.object(forKey: MatomoUserDefaults.Key.currentVisitTimestamp) as? Date } set { - userDefaults.set(newValue, forKey: PiwikUserDefaults.Key.currentVisitTimestamp) + userDefaults.set(newValue, forKey: MatomoUserDefaults.Key.currentVisitTimestamp) userDefaults.synchronize() } } var optOut: Bool { get { - return userDefaults.bool(forKey: PiwikUserDefaults.Key.optOut) + return userDefaults.bool(forKey: MatomoUserDefaults.Key.optOut) } set { - userDefaults.set(newValue, forKey: PiwikUserDefaults.Key.optOut) + userDefaults.set(newValue, forKey: MatomoUserDefaults.Key.optOut) userDefaults.synchronize() } } var clientId: String? { get { - return userDefaults.string(forKey: PiwikUserDefaults.Key.clientID) + return userDefaults.string(forKey: MatomoUserDefaults.Key.clientID) } set { - userDefaults.setValue(newValue, forKey: PiwikUserDefaults.Key.clientID) + userDefaults.setValue(newValue, forKey: MatomoUserDefaults.Key.clientID) userDefaults.synchronize() } } var visitorUserId: String? { get { - return userDefaults.string(forKey: PiwikUserDefaults.Key.visitorUserID); + return userDefaults.string(forKey: MatomoUserDefaults.Key.visitorUserID); } set { - userDefaults.setValue(newValue, forKey: PiwikUserDefaults.Key.visitorUserID); + userDefaults.setValue(newValue, forKey: MatomoUserDefaults.Key.visitorUserID); userDefaults.synchronize() } } } -extension PiwikUserDefaults { +extension MatomoUserDefaults { fileprivate struct Key { static let totalNumberOfVisits = "PiwikTotalNumberOfVistsKey" static let currentVisitTimestamp = "PiwikCurrentVisitTimestampKey" diff --git a/PiwikTracker/MemoryQueue.swift b/MatomoTracker/MemoryQueue.swift similarity index 100% rename from PiwikTracker/MemoryQueue.swift rename to MatomoTracker/MemoryQueue.swift diff --git a/PiwikTracker/Queue.swift b/MatomoTracker/Queue.swift similarity index 100% rename from PiwikTracker/Queue.swift rename to MatomoTracker/Queue.swift diff --git a/PiwikTracker/Session.swift b/MatomoTracker/Session.swift similarity index 75% rename from PiwikTracker/Session.swift rename to MatomoTracker/Session.swift index 4a6fbac6..f9f4f890 100644 --- a/PiwikTracker/Session.swift +++ b/MatomoTracker/Session.swift @@ -27,14 +27,14 @@ struct Session { extension Session { static func current() -> Session { let firstVisit: Date - if let existingFirstVisit = PiwikUserDefaults.standard.firstVisit { + if let existingFirstVisit = MatomoUserDefaults.standard.firstVisit { firstVisit = existingFirstVisit } else { firstVisit = Date() - PiwikUserDefaults.standard.firstVisit = firstVisit + MatomoUserDefaults.standard.firstVisit = firstVisit } - let sessionCount = PiwikUserDefaults.standard.totalNumberOfVisits - let lastVisit = PiwikUserDefaults.standard.previousVisit ?? Date() + let sessionCount = MatomoUserDefaults.standard.totalNumberOfVisits + let lastVisit = MatomoUserDefaults.standard.previousVisit ?? Date() return Session(sessionsCount: sessionCount, lastVisit: lastVisit, firstVisit: firstVisit) } } diff --git a/PiwikTracker/URLSessionDispatcher.swift b/MatomoTracker/URLSessionDispatcher.swift similarity index 94% rename from PiwikTracker/URLSessionDispatcher.swift rename to MatomoTracker/URLSessionDispatcher.swift index 86eb561d..78322968 100644 --- a/PiwikTracker/URLSessionDispatcher.swift +++ b/MatomoTracker/URLSessionDispatcher.swift @@ -18,7 +18,7 @@ final class URLSessionDispatcher: Dispatcher { /// Generate a URLSessionDispatcher instance /// /// - Parameters: - /// - baseURL: The url of the piwik server. This url has to end in `piwik.php`. + /// - baseURL: The url of the Matomo server. This url has to end in `piwik.php`. /// - userAgent: An optional parameter for custom user agent. init(baseURL: URL, userAgent: String? = nil) { self.baseURL = baseURL @@ -40,7 +40,7 @@ final class URLSessionDispatcher: Dispatcher { #elseif os(tvOS) let currentUserAgent = "" #endif - return currentUserAgent.appending(" PiwikTracker SDK URLSessionDispatcher") + return currentUserAgent.appending(" MatomoTracker SDK URLSessionDispatcher") } func send(events: [Event], success: @escaping ()->(), failure: @escaping (_ error: Error)->()) { diff --git a/PiwikTracker/Visitor.swift b/MatomoTracker/Visitor.swift similarity index 84% rename from PiwikTracker/Visitor.swift rename to MatomoTracker/Visitor.swift index 91752d37..2ea16bbc 100644 --- a/PiwikTracker/Visitor.swift +++ b/MatomoTracker/Visitor.swift @@ -22,14 +22,14 @@ struct Visitor { extension Visitor { static func current() -> Visitor { let id: String - if let existingId = PiwikUserDefaults.standard.clientId { + if let existingId = MatomoUserDefaults.standard.clientId { id = existingId } else { let newId = newVisitorID() - PiwikUserDefaults.standard.clientId = newId + MatomoUserDefaults.standard.clientId = newId id = newId } - let userId = PiwikUserDefaults.standard.visitorUserId + let userId = MatomoUserDefaults.standard.visitorUserId return Visitor(id: id, userId: userId) } diff --git a/PiwikTrackerTests/AutoTracker.swift b/MatomoTrackerTests/AutoTracker.swift similarity index 69% rename from PiwikTrackerTests/AutoTracker.swift rename to MatomoTrackerTests/AutoTracker.swift index 798d4fa7..1ec2dcd6 100644 --- a/PiwikTrackerTests/AutoTracker.swift +++ b/MatomoTrackerTests/AutoTracker.swift @@ -1,23 +1,15 @@ -// -// AutoTracker.swift -// PiwikTracker -// -// Created by Cornelius Horstmann on 04.09.17. -// Copyright © 2017 PIWIK. All rights reserved. -// - import Foundation -@testable import PiwikTracker +@testable import MatomoTracker extension TrackerSpec { internal final class AutoTracker { - let tracker: PiwikTracker + let tracker: MatomoTracker let interval: TimeInterval var timer: Timer? - init(tracker: PiwikTracker, trackingInterval: TimeInterval) { + init(tracker: MatomoTracker, trackingInterval: TimeInterval) { self.tracker = tracker self.interval = trackingInterval } diff --git a/PiwikTrackerTests/DispatcherStub.swift b/MatomoTrackerTests/DispatcherStub.swift similarity index 87% rename from PiwikTrackerTests/DispatcherStub.swift rename to MatomoTrackerTests/DispatcherStub.swift index 2c5fa13a..029ec361 100644 --- a/PiwikTrackerTests/DispatcherStub.swift +++ b/MatomoTrackerTests/DispatcherStub.swift @@ -1,8 +1,8 @@ -@testable import PiwikTracker +@testable import MatomoTracker final class DispatcherStub: Dispatcher { - public var baseURL: URL = URL(string: "http://piwik.org/spec_url")! + public var baseURL: URL = URL(string: "http://matomo.org/spec_url")! struct Callback { typealias SendEvents = (_ events: [Event], _ success: () -> (), _ failure: (Error) -> ()) -> () diff --git a/PiwikTrackerTests/EventSerializerSpec.swift b/MatomoTrackerTests/EventSerializerSpec.swift similarity index 88% rename from PiwikTrackerTests/EventSerializerSpec.swift rename to MatomoTrackerTests/EventSerializerSpec.swift index c5d6aadd..bb5c126e 100644 --- a/PiwikTrackerTests/EventSerializerSpec.swift +++ b/MatomoTrackerTests/EventSerializerSpec.swift @@ -1,11 +1,11 @@ -@testable import PiwikTracker +@testable import MatomoTracker import Quick import Nimble class EventSerializerSpec: QuickSpec { override func spec() { describe("jsonEncoded") { - let tracker = PiwikTracker(siteId: "spec_id", baseURL: URL(string: "https://speck.domain.com/piwik.php")!) + let tracker = MatomoTracker(siteId: "spec_id", baseURL: URL(string: "https://speck.domain.com/piwik.php")!) let serializer = EventSerializer() it("should encode & characters") { let event = Event(tracker: tracker, action: ["_specs_&_specs_"]) diff --git a/PiwikTrackerTests/Fixtures/MemoryQueueFixtures.swift b/MatomoTrackerTests/Fixtures/MemoryQueueFixtures.swift similarity index 97% rename from PiwikTrackerTests/Fixtures/MemoryQueueFixtures.swift rename to MatomoTrackerTests/Fixtures/MemoryQueueFixtures.swift index d9d4e716..c6214bd4 100644 --- a/PiwikTrackerTests/Fixtures/MemoryQueueFixtures.swift +++ b/MatomoTrackerTests/Fixtures/MemoryQueueFixtures.swift @@ -1,4 +1,4 @@ -@testable import PiwikTracker +@testable import MatomoTracker struct EventFixture { static func event() -> Event { diff --git a/PiwikTrackerTests/Info.plist b/MatomoTrackerTests/Info.plist similarity index 100% rename from PiwikTrackerTests/Info.plist rename to MatomoTrackerTests/Info.plist diff --git a/PiwikTrackerTests/MemoryQueueSpec.swift b/MatomoTrackerTests/MemoryQueueSpec.swift similarity index 99% rename from PiwikTrackerTests/MemoryQueueSpec.swift rename to MatomoTrackerTests/MemoryQueueSpec.swift index c891b7ea..7f2aafa9 100644 --- a/PiwikTrackerTests/MemoryQueueSpec.swift +++ b/MatomoTrackerTests/MemoryQueueSpec.swift @@ -1,4 +1,4 @@ -@testable import PiwikTracker +@testable import MatomoTracker import Quick import Nimble diff --git a/PiwikTrackerTests/QueueStub.swift b/MatomoTrackerTests/QueueStub.swift similarity index 97% rename from PiwikTrackerTests/QueueStub.swift rename to MatomoTrackerTests/QueueStub.swift index 534113ae..46d2a55f 100644 --- a/PiwikTrackerTests/QueueStub.swift +++ b/MatomoTrackerTests/QueueStub.swift @@ -1,4 +1,4 @@ -@testable import PiwikTracker +@testable import MatomoTracker final class QueueStub: Queue { struct Callback { diff --git a/PiwikTrackerTests/TrackerFixtures.swift b/MatomoTrackerTests/TrackerFixtures.swift similarity index 89% rename from PiwikTrackerTests/TrackerFixtures.swift rename to MatomoTrackerTests/TrackerFixtures.swift index b78c9c8e..6bd9a837 100644 --- a/PiwikTrackerTests/TrackerFixtures.swift +++ b/MatomoTrackerTests/TrackerFixtures.swift @@ -1,14 +1,14 @@ -@testable import PiwikTracker +@testable import MatomoTracker struct TrackerFixture { public var queue: Queue public var dispatcher: Dispatcher - public var tracker: PiwikTracker + public var tracker: MatomoTracker init(queue: Queue = QueueStub(), dispatcher: Dispatcher = DispatcherStub()) { self.queue = queue self.dispatcher = dispatcher - self.tracker = PiwikTracker(siteId: "spec_siteId", queue: self.queue, dispatcher: self.dispatcher) + self.tracker = MatomoTracker(siteId: "spec_siteId", queue: self.queue, dispatcher: self.dispatcher) } static func withQueueEventsCallback(queueEvents: @escaping QueueStub.Callback.QueueEvents) -> TrackerFixture { diff --git a/PiwikTrackerTests/TrackerSpec.swift b/MatomoTrackerTests/TrackerSpec.swift similarity index 99% rename from PiwikTrackerTests/TrackerSpec.swift rename to MatomoTrackerTests/TrackerSpec.swift index f518efba..4dabf360 100644 --- a/PiwikTrackerTests/TrackerSpec.swift +++ b/MatomoTrackerTests/TrackerSpec.swift @@ -1,4 +1,4 @@ -@testable import PiwikTracker +@testable import MatomoTracker import Quick import Nimble diff --git a/PiwikTracker.podspec b/PiwikTracker.podspec index dcdb5ab7..36158042 100644 --- a/PiwikTracker.podspec +++ b/PiwikTracker.podspec @@ -11,8 +11,10 @@ Pod::Spec.new do |spec| spec.osx.deployment_target = '10.12' spec.requires_arc = true spec.default_subspecs = 'Core' + + spec.deprecated_in_favor_of = 'MatomoTracker' spec.subspec 'Core' do |core| - core.source_files = 'PiwikTracker/*.swift' + core.source_files = 'PiwikTracker/*.swift' end -end +end \ No newline at end of file diff --git a/PiwikTracker/PiwikTracker.h b/PiwikTracker/PiwikTracker.h deleted file mode 100644 index bfe461d8..00000000 --- a/PiwikTracker/PiwikTracker.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// PiwikTracker.h -// PiwikTracker -// -// Created by Cornelius Horstmann on 24.10.16. -// Copyright © 2016 PIWIK. All rights reserved. -// - -@import Foundation; - -//! Project version number for PiwikTracker. -FOUNDATION_EXPORT double PiwikTrackerVersionNumber; - -//! Project version string for PiwikTracker. -FOUNDATION_EXPORT const unsigned char PiwikTrackerVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Podfile b/Podfile index 20ac24d3..5f80e4ec 100644 --- a/Podfile +++ b/Podfile @@ -3,33 +3,35 @@ source 'https://github.com/CocoaPods/Specs.git' abstract_target :example do use_frameworks! inhibit_all_warnings! - workspace 'PiwikTracker' + project 'MatomoTracker' + workspace 'MatomoTracker' target :ios do platform :ios, '8.0' project 'Example/ios/ios' - pod 'PiwikTracker', path: './' + pod 'MatomoTracker', path: './' end target :macos do platform :osx, '10.12' project 'Example/macos/macos' - pod 'PiwikTracker', path: './' + pod 'MatomoTracker', path: './' end target :tvos do platform :tvos, '10.2' project 'Example/tvos/tvos' - pod 'PiwikTracker', path: './' + pod 'MatomoTracker', path: './' end end -target 'PiwikTrackerTests' do +target 'MatomoTrackerTests' do use_frameworks! platform :ios, '8.0' inhibit_all_warnings! - workspace 'PiwikTracker' + project 'MatomoTracker' + workspace 'MatomoTracker' inherit! :search_paths pod 'Quick', '~> 1.1' diff --git a/README.md b/README.md index 9a4a8a59..ac49474d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# PiwikTracker iOS SDK +# MatomoTracker iOS SDK -The PiwikTracker is an iOS, tvOS and macOS SDK for sending app analytics to a Piwik server. PiwikTracker can be used from Swift and [Objective-C](#objective-c-compatibility). +The MatomoTracker is an iOS, tvOS and macOS SDK for sending app analytics to a Matomo (former Piwik) server. MatomoTracker can be used from Swift and [Objective-C](#objective-c-compatibility). -**Fancy help improve this SDK? Check [this list](https://github.com/piwik/piwik-sdk-ios/issues?utf8=✓&q=is%3Aopen%20is%3Aissue%20label%3Adiscussion%20label%3Aswift3) to see what is left and can be improved.** +**Fancy help improve this SDK? Check [this list](https://github.com/matomo-org/matomo-sdk-ios/issues?utf8=✓&q=is%3Aopen%20is%3Aissue%20label%3Adiscussion%20label%3Aswift3) to see what is left and can be improved.** -[![Build Status](https://travis-ci.org/matomo-org/piwik-sdk-ios.svg?branch=develop)](https://travis-ci.org/matomo-org/piwik-sdk-ios) +[![Build Status](https://travis-ci.org/matomo-org/matomo-sdk-ios.svg?branch=develop)](https://travis-ci.org/matomo-org/matomo-sdk-ios) ## Installation ### [CocoaPods](https://cocoapods.org) @@ -12,42 +12,42 @@ The PiwikTracker is an iOS, tvOS and macOS SDK for sending app analytics to a Pi Use the following in your Podfile. ``` -pod 'PiwikTracker', '~> 4.4' +pod 'MatomoTracker', '~> 4.4' ``` -Then run `pod install`. In every file you want to use the PiwikTracker, don't forget to import the framework with `import PiwikTracker`. +Then run `pod install`. In every file you want to use the MatomoTracker, don't forget to import the framework with `import MatomoTracker`. ## Usage ### Configuration -Before the first usage, the PiwikTracker has to be configured. This is best done in the `application(_:, didFinishLaunchingWithOptions:)` method in the `AppDelegate`. +Before the first usage, the MatomoTracker has to be configured. This is best done in the `application(_:, didFinishLaunchingWithOptions:)` method in the `AppDelegate`. ``` -PiwikTracker.configureSharedInstance(withSiteID: "5", baseURL: URL(string: "http://your.server.org/path-to-piwik/piwik.php")!) +MatomoTracker.configureSharedInstance(withSiteID: "5", baseURL: URL(string: "http://your.server.org/path-to-matomo/piwik.php")!) ``` -The `siteId` is the ID that you can get if you [add a website](https://piwik.org/docs/manage-websites/#add-a-website) within the Piwik web interface. The `baseURL` it the URL to your Piwik web instance and has to include the "piwik.php" string. +The `siteId` is the ID that you can get if you [add a website](https://matomo.org/docs/manage-websites/#add-a-website) within the Matomo web interface. The `baseURL` it the URL to your Matomo web instance and has to include the "piwik.php" string. #### Opting Out -The PiwikTracker SDK supports opting out of tracking. Please use the `isOptedOut` property of the PiwikTracker to define if the user opted out of tracking. +The MatomoTracker SDK supports opting out of tracking. Please use the `isOptedOut` property of the MatomoTracker to define if the user opted out of tracking. ``` -PiwikTracker.shared?.isOptedOut = true +MatomoTracker.shared?.isOptedOut = true ``` ### Tracking Page Views -The PiwikTracker can track hierarchical screen names, e.g. screen/settings/register. Use this to create a hierarchical and logical grouping of screen views in the Piwik web interface. +The MatomoTracker can track hierarchical screen names, e.g. screen/settings/register. Use this to create a hierarchical and logical grouping of screen views in the Matomo web interface. ``` -PiwikTracker.shared?.track(view: ["path","to","your","page"]) +MatomoTracker.shared?.track(view: ["path","to","your","page"]) ``` You can also set the url of the page. ``` -let url = URL(string: "https://piwik.org/get-involved/") -PiwikTracker.shared?.track(view: ["community","get-involved"], url: url) +let url = URL(string: "https://matomo.org/get-involved/") +MatomoTracker.shared?.track(view: ["community","get-involved"], url: url) ``` ### Tracking Events @@ -60,35 +60,35 @@ Events can be used to track user interactions such as taps on a button. An event - Value (optional) ``` -PiwikTracker.shared?.track(eventWithCategory: "player", action: "slide", name: "volume", value: 35.1) +MatomoTracker.shared?.track(eventWithCategory: "player", action: "slide", name: "volume", value: 35.1) ``` This will log that the user slid the volume slider on the player to 35.1%. ### Custom Dimension -The Piwik SDK currently supports Custom Dimensions for the Visit Scope. Using Custom Dimensions you can add properties to the whole visit, such as "Did the user finish the tutorial?", "Is the user a paying user?" or "Which version of the Application is being used?" and such. Before sending custom dimensions please make sure Custom Dimensions are [properly installed and configured](https://piwik.org/docs/custom-dimensions/). You will need the `ID` of your configured Dimension. +The Matomo SDK currently supports Custom Dimensions for the Visit Scope. Using Custom Dimensions you can add properties to the whole visit, such as "Did the user finish the tutorial?", "Is the user a paying user?" or "Which version of the Application is being used?" and such. Before sending custom dimensions please make sure Custom Dimensions are [properly installed and configured](https://matomo.org/docs/custom-dimensions/). You will need the `ID` of your configured Dimension. After that you can set a new Dimension, ``` -PiwikTracker.shared?.set(value: "1.0.0-beta2", forIndex: 1) +MatomoTracker.shared?.set(value: "1.0.0-beta2", forIndex: 1) ``` or remove an already set dimension. ``` -PiwikTracker.shared?.remove(dimensionAtIndex: 1) +MatomoTracker.shared?.remove(dimensionAtIndex: 1) ``` Dimensions in the Visit Scope will be sent along every Page View or Event. Custom Dimensions are not persisted by the SDK and have to be re-configured upon application startup. ### Custom User ID -To add a [custom User ID](https://piwik.org/docs/user-id/), simply set the value you'd like to use on the `visitorId` field of the shared tracker: +To add a [custom User ID](https://matomo.org/docs/user-id/), simply set the value you'd like to use on the `visitorId` field of the shared tracker: ``` -PiwikTracker.shared?.visitorId = "coolUsername123" +MatomoTracker.shared?.visitorId = "coolUsername123" ``` All future events being tracked by the SDK will be associated with this userID, as opposed to the default UUID created for each Visitor. @@ -96,55 +96,55 @@ All future events being tracked by the SDK will be associated with this userID, ## Advanced Usage ### Manual dispatching -The PiwikTracker will dispatch events every 30 seconds automatically. If you want to dispatch events manually, you can use the `dispatch()` function. You can, for example, dispatch whenever the application enter the background. +The MatomoTracker will dispatch events every 30 seconds automatically. If you want to dispatch events manually, you can use the `dispatch()` function. You can, for example, dispatch whenever the application enter the background. ``` func applicationDidEnterBackground(_ application: UIApplication) { - PiwikTracker.shared?.dispatch() + MatomoTracker.shared?.dispatch() } ``` ### Session Management -The PiwikTracker starts a new session whenever the application starts. If you want to start a new session manually, you can use the `startNewSession()` function. You can, for example, start a new session whenever the user enters the application. +The MatomoTracker starts a new session whenever the application starts. If you want to start a new session manually, you can use the `startNewSession()` function. You can, for example, start a new session whenever the user enters the application. ``` func applicationWillEnterForeground(_ application: UIApplication) { - PiwikTracker.shared?.startNewSession() + MatomoTracker.shared?.startNewSession() } ``` ### Logging -The PiwikTracker per default logs `warning` and `error` messages to the console. You can change the `LogLevel`. +The MatomoTracker per default logs `warning` and `error` messages to the console. You can change the `LogLevel`. ``` -PiwikTracker.shared?.logger = DefaultLogger(minLevel: .verbose) -PiwikTracker.shared?.logger = DefaultLogger(minLevel: .debug) -PiwikTracker.shared?.logger = DefaultLogger(minLevel: .info) -PiwikTracker.shared?.logger = DefaultLogger(minLevel: .warning) -PiwikTracker.shared?.logger = DefaultLogger(minLevel: .error) +MatomoTracker.shared?.logger = DefaultLogger(minLevel: .verbose) +MatomoTracker.shared?.logger = DefaultLogger(minLevel: .debug) +MatomoTracker.shared?.logger = DefaultLogger(minLevel: .info) +MatomoTracker.shared?.logger = DefaultLogger(minLevel: .warning) +MatomoTracker.shared?.logger = DefaultLogger(minLevel: .error) ``` You can also write your own `Logger` and send the logs wherever you want. Just write a new class/struct an let it conform to the `Logger` protocol. ### Custom User Agent -The `PiwikTracker` will create a default user agent derived from the WKWebView user agent. -You can instantiate the `PiwikTracker` using your own user agent. +The `MatomoTracker` will create a default user agent derived from the WKWebView user agent. +You can instantiate the `MatomoTracker` using your own user agent. ``` -PiwikTracker.configureSharedInstance(withSiteID: "5", baseURL: URL(string: "http://your.server.org/path-to-piwik/piwik.php")!, userAgent: "Your custom user agent") +MatomoTracker.configureSharedInstance(withSiteID: "5", baseURL: URL(string: "http://your.server.org/path-to-matomo/piwik.php")!, userAgent: "Your custom user agent") ``` ### Objective-C compatibility -Version 4 of this SDK is written in Swift, but you can use it in your Objective-C project as well. If you don't want to update you can still use the unsupported older [version 3](https://github.com/piwik/piwik-sdk-ios/tree/version-3). Using the Swift SDK from Objective-C should be pretty straight forward. +Version 4 of this SDK is written in Swift, but you can use it in your Objective-C project as well. If you don't want to update you can still use the unsupported older [version 3](https://github.com/matomo-org/matomo-sdk-ios/tree/version-3). Using the Swift SDK from Objective-C should be pretty straight forward. ``` -[PiwikTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://your.server.org/path-to-piwik/piwik.php"] userAgent:nil]; -[PiwikTracker shared] trackWithView:@[@"example"] url:nil]; -[[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil]; -[[PiwikTracker shared] dispatch]; +[MatomoTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://your.server.org/path-to-matomo/piwik.php"] userAgent:nil]; +[MatomoTracker shared] trackWithView:@[@"example"] url:nil]; +[[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil]; +[[MatomoTracker shared] dispatch]; ``` ### Sending custom events @@ -153,34 +153,33 @@ Instead of using the convenience functions for events and screen views for examp ``` func sendCustomEvent() { - guard let piwikTracker = PiwikTracker.shared else { return } - let downloadURL = URL(string: "https://builds.piwik.org/piwik.zip")! - let event = Event(tracker: piwikTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString]) - PiwikTracker.shared?.track(event) + guard let MatomoTracker = MatomoTracker.shared else { return } + let downloadURL = URL(string: "https://builds.matomo.org/piwik.zip")! + let event = Event(tracker: MatomoTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString]) + MatomoTracker.shared?.track(event) } ``` -All custom events will be URL-encoded and dispatched along with the default Event parameters. Please read the [Tracking API Documentation](https://developer.piwik.org/api-reference/tracking-api) for more information on which parameters can be used. +All custom events will be URL-encoded and dispatched along with the default Event parameters. Please read the [Tracking API Documentation](https://developer.matomo.org/api-reference/tracking-api) for more information on which parameters can be used. Also: You cannot override Custom Parameter keys that are already defined by the Event itself. If you set those keys in the `customTrackingParameters` they will be discarded. ### Automatic url generation -You can define the url property on every `Event`. If none is defined, the SDK will try to generate a url based on the `contentBase` of the `PiwikTracker`. If the `contentBase` is nil, no url will be generated. If the `contentBase` is set, it will append the actions of the event to it and use it as the url. Per default the `contentBase` is generated using the application bundle identifier. For example `http://org.piwik.skd`. This will not result in resolvable urls, but enables the backend to analyse and structure them. +You can define the url property on every `Event`. If none is defined, the SDK will try to generate a url based on the `contentBase` of the `MatomoTracker`. If the `contentBase` is nil, no url will be generated. If the `contentBase` is set, it will append the actions of the event to it and use it as the url. Per default the `contentBase` is generated using the application bundle identifier. For example `http://org.matomo.skd`. This will not result in resolvable urls, but enables the backend to analyse and structure them. ### Event dispatching -Whenever you track an event or a page view it is stored in memory first. In every dispatch run a batch of those events are sent to the server. If the device is offline or the server doesn't respond these events will be kept and resent at a later time. Events currently aren't stored on disk and will be lost if the application is terminated. [#137](https://github.com/piwik/piwik-sdk-ios/issues/137) +Whenever you track an event or a page view it is stored in memory first. In every dispatch run a batch of those events are sent to the server. If the device is offline or the server doesn't respond these events will be kept and resent at a later time. Events currently aren't stored on disk and will be lost if the application is terminated. [#137](https://github.com/matomo-org/matomo-sdk-ios/issues/137) ## Contributing -Please read [CONTRIBUTING.md](https://github.com/piwik/piwik-sdk-ios/blob/swift3/CONTRIBUTING.md) for details. +Please read [CONTRIBUTING.md](https://github.com/matomo-org/matomo-sdk-ios/blob/swift3/CONTRIBUTING.md) for details. ## ToDo ### These features aren't implemented yet - Basic functionality - - [Persisting non dispatched events](https://github.com/piwik/piwik-sdk-ios/issues/137) - - [Custom Dimensions](https://github.com/piwik/piwik-sdk-ios/issues/111) (Action Scope is not implemented yet) + - [Persisting non dispatched events](https://github.com/matomo-org/matomo-sdk-ios/issues/137) - Tracking of more things - Exceptions - Social Interactions @@ -188,14 +187,14 @@ Please read [CONTRIBUTING.md](https://github.com/piwik/piwik-sdk-ios/blob/swift3 - Goals and Conversions - Outlinks - Downloads - - [Ecommerce Transactions](https://github.com/piwik/piwik-sdk-ios/issues/110) - - [Campaigns](https://github.com/piwik/piwik-sdk-ios/issues/109) + - [Ecommerce Transactions](https://github.com/matomo-org/matomo-sdk-ios/issues/110) + - [Campaigns](https://github.com/matomo-org/matomo-sdk-ios/issues/109) - Content Impressions / Content Interactions - Customizing the tracker - - add prefixing? (The objc-SDK had a prefixing functionality ![Example screenshot](http://piwik.github.io/piwik-sdk-ios/piwik_prefixing.png)) + - add prefixing? (The objc-SDK had a prefixing functionality ![Example screenshot](http://matomo-org.github.io/matomo-sdk-ios/piwik_prefixing.png)) - set the dispatch interval - use different dispatchers (Alamofire) ## License -PiwikTracker is available under the [MIT license](LICENSE.md). +MatomoTracker is available under the [MIT license](LICENSE.md). diff --git a/Rakefile b/Rakefile index 791ad59d..4652b6d7 100644 --- a/Rakefile +++ b/Rakefile @@ -5,30 +5,33 @@ namespace :test do task :prepare do end - desc 'Run the PiwikTracker Unit tests' + desc 'Run the MatomoTracker Unit tests' task ios: :prepare do - run_tests('PiwikTracker', 'iphonesimulator') - run_tests('PiwikTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=11.0') - run_tests('PiwikTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=10.2') - run_tests('PiwikTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=9.3') - run_tests('PiwikTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=8.4') + run_tests('MatomoTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=11.2') + build_failed('tests') unless $?.success? + run_tests('MatomoTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=10.3.1') + build_failed('tests') unless $?.success? + run_tests('MatomoTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=9.3') + build_failed('tests') unless $?.success? + run_tests('MatomoTracker', 'iphonesimulator', 'platform=iOS Simulator,name=iPhone 6,OS=8.4') + build_failed('tests') unless $?.success? end - desc 'Build the PiwikTracker iOS demo' + desc 'Build the MatomoTracker iOS demo' task ios_demo: :prepare do run_build('ios', 'iphonesimulator') build_failed('iOS') unless $?.success? end - desc 'Build the PiwikTracker OSX demo' + desc 'Build the MatomoTracker OSX demo' task osx_demo: :prepare do run_build('macos', 'macosx', 'platform=macOS,arch=x86_64') build_failed('macOS') unless $?.success? end - desc 'Build the PiwikTracker tvOS demo' + desc 'Build the MatomoTracker tvOS demo' task tvos_demo: :prepare do - run_build('tvos', 'appletvsimulator', 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.2') + run_build('tvos', 'appletvsimulator', 'platform=tvOS Simulator,name=Apple TV,OS=11.2') build_failed('tvOS') unless $?.success? end end @@ -46,7 +49,7 @@ namespace :package_manager do end -desc 'Run the PiwikTracker tests for iOS & Mac OS X' +desc 'Run the MatomoTracker tests for iOS & Mac OS X' task :test do Rake::Task['test:ios'].invoke Rake::Task['test:ios_demo'].invoke @@ -54,7 +57,7 @@ task :test do Rake::Task['test:tvos_demo'].invoke end -desc 'Check the integration of PiwikTracker with package managers' +desc 'Check the integration of MatomoTracker with package managers' task :build_with_package_manager do Rake::Task['package_manager:carthage'].invoke end @@ -65,11 +68,11 @@ task default: 'test' private def run_build(scheme, sdk, destination = 'platform=iOS Simulator,name=iPhone 6,OS=10.3.1') - sh("xcodebuild -workspace PiwikTracker.xcworkspace -scheme '#{scheme}' -sdk '#{sdk}' -destination '#{destination}' -configuration Release clean build | xcpretty -c ; exit ${PIPESTATUS[0]}") rescue nil + sh("xcodebuild -workspace MatomoTracker.xcworkspace -scheme '#{scheme}' -sdk '#{sdk}' -destination '#{destination}' -configuration Release clean build | xcpretty -c ; exit ${PIPESTATUS[0]}") rescue nil end def run_tests(scheme, sdk, destination = 'platform=iOS Simulator,name=iPhone 6,OS=10.3.1') - sh("xcodebuild -workspace PiwikTracker.xcworkspace -scheme '#{scheme}' -sdk '#{sdk}' -destination '#{destination}' -configuration Debug clean test | xcpretty -c ; exit ${PIPESTATUS[0]}") rescue nil + sh("xcodebuild -workspace MatomoTracker.xcworkspace -scheme '#{scheme}' -sdk '#{sdk}' -destination '#{destination}' -configuration Debug clean test | xcpretty -c ; exit ${PIPESTATUS[0]}") rescue nil end def is_mavericks_or_above