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

When install MatomoTracker on objective-c project, I get more than 200 errors related to Mach-O #250

Closed elkanaoptimove closed 6 years ago

elkanaoptimove commented 6 years ago

Hi, I installed MatomoTracker through Cocoapods. After I tried to build from the generated workspace, I was asked to specify swift version. After that, I tried to build again and received more than 200 errors related to Mach-O screen shot 2018-05-29 at 18 57 07

How can I fix this issue?

brototyp commented 6 years ago

Hi @elkanaoptimove, thanks for getting it touch. That is a very unfortunate issue you are having here. I guess the core issue is the "Auto-Linking library not found for ..." warnings up top. Can you give me some more information?

elkorb commented 6 years ago

@brototyp Hi, I'm using xcode9.3 and swift version 4.1 was selected inside the Pods project

screen shot 2018-05-30 at 16 09 47
brototyp commented 6 years ago

Hi @elkorb, thanks for your reply. Defining the Swift version there should not be necessary. Please try the following steps:

I hope that solves your issue.

elkorb commented 6 years ago

Working πŸ˜ƒπŸ˜ƒπŸ˜ƒ. Thanks a lot.

brototyp commented 6 years ago

Awesome! Thanks for the feedback. I guess we will update our guide on how to integrate the SDK into a project that has never seen a swift file before 😊

flaushi commented 6 years ago

I do have a similar problem. I cannot instantiate the matomoTracker image

I did create a random swift file, and was asked if the bridging header should be created, what I answered with Yes.

I experience this problem since the last update (to xcode 9.4 or 9.3). Seems like the cocoapods integration or so has changed...?

The documentation here confuses me as well, since it mentions version 4 of the SDK. However, the current version is 5.1.1. Should this be the origin of my problem such that I have to downgrade to v4? Can u help please?

brototyp commented 6 years ago

Hi @flaushi, thanks for getting in touch.

About the documentation; Yes the version 4 there is misleading. It should state version for and higher, which it now does.

About your issue: Checking your screenshot it looks like there is a syntax error ("Expected ']'") in your file there. Please try and remove this init function and write it again. I guess there might be a non-visible character hiding there.

flaushi commented 6 years ago

Hey, thanks! You were right, after simply retyping my init function, everything is fine now. Thanks! Viele Grüße, Olli

Am 14.06.2018 um 10:39 schrieb Cornelius Horstmann notifications@github.com:

Hi @flaushi https://github.com/flaushi, thanks for getting in touch.

About the documentation; Yes the version 4 there is misleading. It should state version for and higher, which it now does.

About your issue: Checking your screenshot it looks like there is a syntax error ("Expected ']'") in your file there. Please try and remove this init function and write it again. I guess there might be a non-visible character hiding there.

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matomo-org/matomo-sdk-ios/issues/250#issuecomment-397217752, or mute the thread https://github.com/notifications/unsubscribe-auth/APFiu8UQS0YCFzTgZ94plUMMhaUiuSBvks5t8iFIgaJpZM4URxd1.

brototyp commented 6 years ago

@flaushi Thanks for the feedback! Great to hear!