snowplow / snowplow-ios-tracker

Snowplow event tracker for Swift and Objective-C. Add analytics to your iOS, macOS, tvOS and watchOS apps and games
http://snowplow.io
Apache License 2.0
80 stars 92 forks source link

Fix SNOWPLOW_TARGET not working with Xcode 12.5 #589

Closed ejensen closed 3 years ago

ejensen commented 3 years ago

Describe the bug When using the Swift Package Manager in Xcode 12.5 the SNOWPLOW_TARGET_IOS (and other SNOWPLOW_TARGET_X macros) is undefined, causing the library to be missing public methods definitions in SPUtilities.h

To Reproduce Integrate snowplow-objc-tracker using the Swift Package Manager on Xcode 12.5

Expected behavior Snowplow's SPUtilities.getTriggerType and SPUtilities.convert methods are defined.

Screenshots

Missing methods

Device information (please complete the following information):

AlexBenny commented 3 years ago

Hi @ejensen , thanks a lot for reporting this and for the PR. We are going to release today the version 2.0 as it was already prepared and tested for the release. I'll take care to add your fix to the next patch version 2.0.1.

AlexBenny commented 3 years ago

Hi @ejensen , I've tried to reproduce the issue with no luck. I'm importing the tracker v.2.0 using SPM on Xcode 12.5 but It seems to work fine calling the SPUtilities methods correctly. Is there any other detail in your configuration that raises the bug?

ejensen commented 3 years ago

Attached is an example project demonstrating the issue: SnowplowExample.zip

Screen Shot 2021-05-03 at 11 03 03 AM
AlexBenny commented 3 years ago

Thanks a lot for the example. I see the issue appears with the v1.7 but it doesn't happen with the previous versions and the v2.0. I checked what is changed between 1.7 and 1.6.2 but I haven't noticed nothing that can cause the issue.

Considering the v2.0 seems to work fine I'll apply your fix to a patch version of the 1.7. Please, let me know if you see the problem on the version 2.0 too.