Skip to content

Commit f0d29b4

Browse files
committed
Feature/219 rename to matomo (matomo-org#221)
* Renamed the Project * pod install * More renaming * Renamed Piwik in the tests * Updated all Example applications * Updated the README and CONTRIBUTING * Updated the Rakefile * Replaced Piwik with Matomo in a few more files * Failing tests will now properly fail CI * Removed the explicitly set SDKROOT to fix carthage build errors * Fixed minor merge issues * Re-added the old PiwikTracker.podspec to deprecate it
1 parent db1a1dc commit f0d29b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+403
-375
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ before_install:
88
script:
99
- rake test
1010
- rake build_with_package_manager
11-
osx_image: xcode9
11+
osx_image: xcode9.2
1212
cache: cocoapods

CHANGELOG.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@
44
* **bugfix** Fixed an issue where an ampersand lead to incomplete tracking information. [#217](https://github.com/matomo-org/piwik-sdk-ios/issues/217)
55

66
## 4.4.1
7-
* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/piwik/piwik-sdk-ios/pull/216)
7+
* **bugfix** Fixed a crash happening due to concurrent access of the MemoryQueue. [#216](https://github.com/matomo-org/matomo-sdk-ios/pull/216)
88

99
## 4.4.0
10-
* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111)
11-
* **feature** Added automatic generation of the url property. [#197](https://github.com/piwik/piwik-sdk-ios/issues/197)
12-
* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/piwik/piwik-sdk-ios/pull/175)
13-
* **improvement** The Logger is now objc compatible. [#185](https://github.com/piwik/piwik-sdk-ios/issues/185)
14-
* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/piwik/piwik-sdk-ios/pull/195)
15-
* **improvement** The Device and Applications structs are now public. [#191](https://github.com/piwik/piwik-sdk-ios/issues/191)
10+
* **feature** Added a way to add custom dimension in the action scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111)
11+
* **feature** Added automatic generation of the url property. [#197](https://github.com/matomo-org/matomo-sdk-ios/issues/197)
12+
* **improvement** The PiwikTracker is now save to create in a background thread. [#175](https://github.com/matomo-org/matomo-sdk-ios/pull/175)
13+
* **improvement** The Logger is now objc compatible. [#185](https://github.com/matomo-org/matomo-sdk-ios/issues/185)
14+
* **improvement** Default `example.com` urls aren't generated anymore. [#194](https://github.com/matomo-org/matomo-sdk-ios/pull/195)
15+
* **improvement** The Device and Applications structs are now public. [#191](https://github.com/matomo-org/matomo-sdk-ios/issues/191)
1616

1717
## 4.3.0
18-
* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/piwik/piwik-sdk-ios/issues/153)
19-
* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/piwik/piwik-sdk-ios/issues/162)
20-
* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/piwik/piwik-sdk-ios/issues/190)
18+
* **feature** Added the ability to send custom events with custom tracking parameters. [#153](https://github.com/matomo-org/matomo-sdk-ios/issues/153)
19+
* **bugfix** Fixed a crash when initializing a new tracker. [#162](https://github.com/matomo-org/matomo-sdk-ios/issues/162)
20+
* **bugfix** Removed old, unused AFNetworking Submodule to fix Carthage usage. [#190](https://github.com/matomo-org/matomo-sdk-ios/issues/190)
2121

2222
## 4.2.0
23-
* **feature** Added ability to customize user agent. [#168](https://github.com/piwik/piwik-sdk-ios/pull/168)
23+
* **feature** Added ability to customize user agent. [#168](https://github.com/matomo-org/matomo-sdk-ios/pull/168)
2424
* **feature** Added ability to customize User ID.
25-
[#180](https://github.com/piwik/piwik-sdk-ios/issues/180) (by @niksawtschuk)
26-
* **feature** Added Carthage support [#74](https://github.com/piwik/piwik-sdk-ios/issues/74) (by @elitalon)
27-
* **feature** Added a way to set a custom visitor ID [#180](https://github.com/piwik/piwik-sdk-ios/pull/181) (by @niksawtschuk)
25+
[#180](https://github.com/matomo-org/matomo-sdk-ios/issues/180) (by @niksawtschuk)
26+
* **feature** Added Carthage support [#74](https://github.com/matomo-org/matomo-sdk-ios/issues/74) (by @elitalon)
27+
* **feature** Added a way to set a custom visitor ID [#180](https://github.com/matomo-org/matomo-sdk-ios/pull/181) (by @niksawtschuk)
2828
* **improvement** Added Swift support
2929

3030
## 4.1.0
31-
* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/piwik/piwik-sdk-ios/issues/111)
32-
* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/piwik/piwik-sdk-ios/issues/149) (by @akshaykolte)
33-
* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/piwik/piwik-sdk-ios/issues/147)
34-
* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/piwik/piwik-sdk-ios/issues/134)
35-
* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/piwik/piwik-sdk-ios/issues/167)
31+
* **feature** Added Custom Dimension Tracking for the Visit Scope. [#111](https://github.com/matomo-org/matomo-sdk-ios/issues/111)
32+
* **feature** Transmitting the Screen resolution to the Piwik Backend. [#149](https://github.com/matomo-org/matomo-sdk-ios/issues/149) (by @akshaykolte)
33+
* **feature** Added a Logger that can log messages in different levels. [#147](https://github.com/matomo-org/matomo-sdk-ios/issues/147)
34+
* **feature** Added macOS and tvOS compatibility. [#134](https://github.com/matomo-org/matomo-sdk-ios/issues/134)
35+
* **bugfix** Fixed a bug, where the tracker would stop automatic dispatching. [#167](https://github.com/matomo-org/matomo-sdk-ios/issues/167)
3636

3737
## 4.0.0
38-
* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/piwik/piwik-sdk-ios/issues/146)
39-
* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/piwik/piwik-sdk-ios/issues/124)
38+
* **feature** Renamed the Tracker to PiwikTracker. [#146](https://github.com/matomo-org/matomo-sdk-ios/issues/146)
39+
* **feature** Added isOptedOut parameter to the PiwikTracker. [#124](https://github.com/matomo-org/matomo-sdk-ios/issues/124)
4040

4141
## 4.0.0-beta2
42-
* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/piwik/piwik-sdk-ios/issues/92)
43-
* **feature** Added the functionality to start new sessions. [#136](https://github.com/piwik/piwik-sdk-ios/issues/136)
44-
* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/piwik/piwik-sdk-ios/pull/140)
45-
* **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)
42+
* **feature** Added the possibility to set the url for a screen view event. [#92](https://github.com/matomo-org/matomo-sdk-ios/issues/92)
43+
* **feature** Added the functionality to start new sessions. [#136](https://github.com/matomo-org/matomo-sdk-ios/issues/136)
44+
* **fixed** The value of an event got wrongly encoded when dispatching. [#140](https://github.com/matomo-org/matomo-sdk-ios/pull/140)
45+
* **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)
4646

4747
## 4.0.0-beta1
4848
* no changes

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ Welcome! We are very happy to have you here. There are always too many things to
66

77
Did you find a bug? Bummer! Please help us find the reason and fix them.
88

9-
* 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?
10-
* 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:
9+
* 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?
10+
* 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:
1111
* A clear and descriptive title.
1212
* Describe your issue and add exact steps to reproduce the issue. You found a crash? Please attach a symbolicated crash report.
1313
* If possible add a few lines of code or possibly even an example project.
1414

1515
## Discussing
1616

17-
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.
17+
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.
1818

19-
You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/piwik/piwik-sdk-ios/labels/discussion).
19+
You are always welcome to add your thoughts to an existing [issue in discussion](https://github.com/matomo-org/matomo-sdk-ios/labels/discussion).
2020

2121
## Submitting changes
2222

2323
When contributing to this repository, please first discuss the change you wish to make via an issue before making a change.
2424

25-
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.
25+
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.
2626

2727
## Contributing Code
2828

@@ -34,7 +34,7 @@ You want to contribute code? Awesome. Here are some tips that should get you sta
3434

3535
### Adding code to the SDK
3636

37-
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.
37+
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.
3838

3939
### Adding example code
4040

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
@UIApplicationMain
55
class AppDelegate: UIResponder, UIApplicationDelegate {
66

77
var window: UIWindow?
88

99
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
10-
setupPiwik()
10+
setupMatomo()
1111
return true
1212
}
1313

@@ -19,12 +19,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1919
func applicationDidEnterBackground(_ application: UIApplication) {
2020
// 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.
2121
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
22-
PiwikTracker.shared?.dispatch()
22+
MatomoTracker.shared?.dispatch()
2323
}
2424

2525
func applicationWillEnterForeground(_ application: UIApplication) {
2626
// 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.
27-
PiwikTracker.shared?.startNewSession()
27+
MatomoTracker.shared?.startNewSession()
2828
}
2929

3030
func applicationDidBecomeActive(_ application: UIApplication) {
@@ -35,15 +35,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3535
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
3636
}
3737

38-
func setupPiwik() {
39-
guard let siteid = UserDefaults.standard.string(forKey: "piwik-example-siteid"),
40-
let baseurl = UserDefaults.standard.url(forKey: "piwik-example-baseurl") else {
38+
func setupMatomo() {
39+
guard let siteid = UserDefaults.standard.string(forKey: "matomo-example-siteid"),
40+
let baseurl = UserDefaults.standard.url(forKey: "matomo-example-baseurl") else {
4141
let alert = UIAlertView(title: "Configuration", message: "Please configure this example application before usage", delegate: nil, cancelButtonTitle: "OK")
4242
alert.show()
4343
return
4444
}
45-
PiwikTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl)
46-
PiwikTracker.shared?.logger = DefaultLogger(minLevel: .info)
45+
MatomoTracker.configureSharedInstance(withSiteID: siteid, baseURL: baseurl)
46+
MatomoTracker.shared?.logger = DefaultLogger(minLevel: .info)
4747
}
4848

4949
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
class ConfigurationViewController: UIViewController {
55

@@ -8,30 +8,30 @@ class ConfigurationViewController: UIViewController {
88

99
override func viewDidAppear(_ animated: Bool) {
1010
super.viewDidAppear(animated)
11-
PiwikTracker.shared?.track(view: ["menu","configuration"])
11+
MatomoTracker.shared?.track(view: ["menu","configuration"])
1212

13-
baseURLTextField.text = UserDefaults.standard.url(forKey: "piwik-example-baseurl")?.absoluteString
14-
siteIDTextField.text = UserDefaults.standard.string(forKey: "piwik-example-siteid")
13+
baseURLTextField.text = UserDefaults.standard.url(forKey: "matomo-example-baseurl")?.absoluteString
14+
siteIDTextField.text = UserDefaults.standard.string(forKey: "matomo-example-siteid")
1515
}
1616

1717
override func viewWillDisappear(_ animated: Bool) {
1818
super.viewWillDisappear(animated)
1919
guard let baseURLText = baseURLTextField.text,
2020
let baseURL = URL(string: baseURLText),
2121
let siteID = siteIDTextField.text else { return }
22-
UserDefaults.standard.set(baseURL, forKey: "piwik-example-baseurl")
23-
UserDefaults.standard.set(siteID, forKey: "piwik-example-siteid")
22+
UserDefaults.standard.set(baseURL, forKey: "matomo-example-baseurl")
23+
UserDefaults.standard.set(siteID, forKey: "matomo-example-siteid")
2424
UserDefaults.standard.synchronize()
2525

26-
PiwikTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL)
26+
MatomoTracker.configureSharedInstance(withSiteID: siteID, baseURL: baseURL)
2727
}
2828

2929
@IBAction func newSessionButtonTapped(_ sender: UIButton) {
30-
PiwikTracker.shared?.startNewSession()
30+
MatomoTracker.shared?.startNewSession()
3131
}
3232

3333
@IBAction func dispatchButtonTapped(_ sender: UIButton) {
34-
PiwikTracker.shared?.dispatch()
34+
MatomoTracker.shared?.dispatch()
3535
}
3636

3737
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
class CustomDimensionsViewController: UIViewController {
55
override func viewDidAppear(_ animated: Bool) {
66
super.viewDidAppear(animated)
7-
PiwikTracker.shared?.track(view: ["menu","custom dimensions"])
7+
MatomoTracker.shared?.track(view: ["menu","custom dimensions"])
88
}
99

1010
// Adds Custom Dimensions to every Event for OS version, Hardware and App version.
1111
@IBAction func setVisitCustomDimensionsTapped(_ sender: UIButton) {
1212
let application = Application.makeCurrentApplication()
1313
let device = Device.makeCurrentDevice()
14-
PiwikTracker.shared?.set(value: device.osVersion, forIndex: 1)
15-
PiwikTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2)
16-
PiwikTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3)
14+
MatomoTracker.shared?.set(value: device.osVersion, forIndex: 1)
15+
MatomoTracker.shared?.set(value: device.humanReadablePlatformName ?? device.platform, forIndex: 2)
16+
MatomoTracker.shared?.set(value: application.bundleShortVersion ?? "unknown", forIndex: 3)
1717
}
1818
}

Example/ios/iOS Example/CustomTrackingParametersViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
class CustomTrackingParametersViewController: UIViewController {
55

66
override func viewDidAppear(_ animated: Bool) {
77
super.viewDidAppear(animated)
8-
PiwikTracker.shared?.track(view: ["menu","custom tracking parameters"])
8+
MatomoTracker.shared?.track(view: ["menu","custom tracking parameters"])
99
}
1010

1111
@IBAction func didTapSendDownloadEvent(_ sender: UIButton) {
12-
guard let piwikTracker = PiwikTracker.shared else { return }
13-
let downloadURL = URL(string: "https://builds.piwik.org/piwik.zip")!
14-
let event = Event(tracker: piwikTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString])
15-
PiwikTracker.shared?.track(event)
12+
guard let matomoTracker = MatomoTracker.shared else { return }
13+
let downloadURL = URL(string: "https://builds.matomo.org/matomo.zip")!
14+
let event = Event(tracker: matomoTracker, action: ["menu", "custom tracking parameters"], url: downloadURL, customTrackingParameters: ["download": downloadURL.absoluteString])
15+
MatomoTracker.shared?.track(event)
1616
}
1717

1818
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
class EventsViewController: UIViewController {
55
override func viewDidAppear(_ animated: Bool) {
66
super.viewDidAppear(animated)
7-
PiwikTracker.shared?.track(view: ["menu","events"])
7+
MatomoTracker.shared?.track(view: ["menu","events"])
88
}
99
@IBAction func trackEventButtonTapped(_ sender: UIButton) {
10-
PiwikTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7)
10+
MatomoTracker.shared?.track(eventWithCategory: "TestCategory", action: "TestAction", name: "TestName", value: 7)
1111
}
1212
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import UIKit
2-
import PiwikTracker
2+
import MatomoTracker
33

44
class MenuViewController: UITableViewController {
55
override func viewDidAppear(_ animated: Bool) {
66
super.viewDidAppear(animated)
7-
PiwikTracker.shared?.track(view: ["menu"])
7+
MatomoTracker.shared?.track(view: ["menu"])
88
}
99
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
@import PiwikTracker;
1+
@import MatomoTracker;
22

33
#import "ObjectiveCCompatibilityChecker.h"
44

55
@implementation ObjectiveCCompatibilityChecker
66

77
- (void)check {
8-
[PiwikTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil];
9-
[[PiwikTracker shared] trackWithView:@[@"example"] url:nil];
10-
[[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil];
11-
[[PiwikTracker shared] dispatch];
12-
[PiwikTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose];
8+
[MatomoTracker configureSharedInstanceWithSiteID:@"5" baseURL:[NSURL URLWithString:@"http://example.com/piwik.php"] userAgent:nil];
9+
[[MatomoTracker shared] trackWithView:@[@"example"] url:nil];
10+
[[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil url:nil];
11+
[[MatomoTracker shared] dispatch];
12+
[MatomoTracker shared].logger = [[DefaultLogger alloc] initWithMinLevel:LogLevelVerbose];
1313
}
1414

1515
- (void)checkDeprecated {
16-
[[PiwikTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil];
16+
[[MatomoTracker shared] trackWithEventWithCategory:@"category" action:@"action" name:nil number:nil];
1717
}
1818

1919
@end

0 commit comments

Comments
 (0)