matomo-org / matomo-sdk-ios

Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift
MIT License
388 stars 164 forks source link

crash in 3.3.0 #143

Closed HelloWorldStap closed 7 years ago

HelloWorldStap commented 7 years ago

NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"piwiktracker" withExtension:@"momd"]; the modelURl is nil in 3.3.0
my progect using OC

brototyp commented 7 years ago

Hi @HelloWorldStap, thank you for your bug report. Can you give me some more inside on the crash? Do you have a crash report? Please check the Contributing Guidelines to see a list of information that will help us help you.

luohui8891 commented 7 years ago

Hi @brototyp, face the same issue when I used 3.3.0 in my project. Seem the reason is that the core data resource haven't been copied to main bundle.

BTW, pod --version is 1.2.1

brototyp commented 7 years ago

Hi @HelloWorldStap, Hi @luohui8891, thank you both for your feedback. I've just seen that a fix was implemented in this commit: https://github.com/piwik/piwik-sdk-ios/commit/139d573808298222c01aed61396bc2d8b909b9d1

It was just not released yet. Can you do me a favor and try out the Piwik SDK from this exact branch and get back to me?

pod 'PiwikTracker', :git => 'https://github.com/piwik/piwik-sdk-ios.git', :commit => '139d573808298222c01aed61396bc2d8b909b9d1'

luohui8891 commented 7 years ago

@brototyp I have upgraded it to 4.0 (Swift 3) and it works fine.

YvesCandel commented 7 years ago

I tested that specific commit and it worked fine!

brototyp commented 7 years ago

Hi @luohui8891, Hi @YvesCandel, thank you both for you feedback. I will release a new patch for the Piwik SDK Version 3 so it is not necessary to reference the commit directly. I will post here, once it's done.