react-native-matomo
react-native-matomo copied to clipboard
piwik is dead
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
As piwik is now matomo, it is better to remove this assert.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-matomo/ios/MatomoTracker/MatomoTracker.swift b/node_modules/react-native-matomo/ios/MatomoTracker/MatomoTracker.swift
index 1b4fca8..baaa2c0 100755
--- a/node_modules/react-native-matomo/ios/MatomoTracker/MatomoTracker.swift
+++ b/node_modules/react-native-matomo/ios/MatomoTracker/MatomoTracker.swift
@@ -115,7 +115,7 @@ final public class MatomoTracker: NSObject {
/// - baseURL: The url of the Matomo server. This url has to end in `piwik.php`.
/// - userAgent: An optional parameter for custom user agent.
@objc 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")
+ //assert(baseURL.absoluteString.hasSuffix("piwik.php"), "The baseURL is expected to end in piwik.php")
let queue = MemoryQueue()
let dispatcher = URLSessionDispatcher(baseURL: baseURL, userAgent: userAgent)
This issue body was partially generated by patch-package.
as a temporary workaround you can add a fake parameter to the URL
https://xxxxxxxxxxxxxx/matomo.php?fakeParam=piwik.php
Hi!
Many thanx for the answer. Will think about Your workaround.
bump is there a chance we'll get https://github.com/BonifyByForteil/react-native-matomo/pull/67/files merged soon, and an update out?