Hello,
I’m working in the integration of Piwik in our mobile application on iOS.
We already did it in Android & Web/Angular, we’re able to send events to the Piwik server.
But when I try to send an event, I’ve this error message in XCode :
Task <F82E3824-425E-459F-BB27-F0F9CB143245>.<77> finished with error [-1100] Error Domain=NSURLErrorDomain Code=-1100 "The requested URL was not found on this server." UserInfo={NSLocalizedDescription=The requested URL was not found on this server., NSErrorFailingURLStringKey=file:///https:/piwik.php, NSErrorFailingURLKey=file:///https:/piwik.php, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <F82E3824-425E-459F-BB27-F0F9CB143245>.<77>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <F82E3824-425E-459F-BB27-F0F9CB143245>.<77>, NSUnderlyingError=0x280eec900 {Error Domain=kCFErrorDomainCFNetwork Code=-1100 "(null)"}}
The methods to create the tracker and send a view tracking :
@objc(startTracker:)
func startTracker(_ command: CDVInvokedUrlCommand){
var containerUrlObject: URL
if let containerUrlTemp = command.argument(at: 0) as? String{
if #available(iOS 16.0, *) {
containerUrlObject = URL(filePath: containerUrlTemp)
} else {
containerUrlObject = URL(fileURLWithPath: containerUrlTemp)
}
if let containerIdTemp = command.argument(at: 1) as? String{
tracker = PiwikTracker.sharedInstance(siteID: containerIdTemp, baseURL: containerUrlObject)
}
}
}
@objc(trackView:)
func trackView(_ command: CDVInvokedUrlCommand){
if let view = command.argument(at:0) as? String{
PiwikTracker.sharedInstance()?.sendView(view: "Home")
}
}
Have you any clue to resolve this ?
Thanks,
Have a nice day,
Raphael