PostHog / posthog-ios

PostHog iOS SDK
https://posthog.com/docs/libraries/ios
MIT License
32 stars 41 forks source link

Error importing with SPM #13

Closed AugustDev closed 3 years ago

AugustDev commented 3 years ago

When importing PostHog via Swift Package Manager I end up with an error.

Could not build Objective-C module 'PostHog'

image

To reproduce the problem:

Simply create a new Xcode project using Swift and import PostHog from "https://github.com/PostHog/posthog-ios".

I'm not sure if I'm missing something basic or the package is not compatible with SPM. All ideas are appreciated!

arunrdd commented 3 years ago

More specifically, XCode complains with the following error:

'PHGMiddleware.h' file not found

Occurs in the file posthog-ios/PostHog/Classes/Payloads/PHGPayloadManager.h on line #2

JMCPH commented 3 years ago

I'm also experiencing this problem. Did you manage to find a solution to the issue?

JMCPH commented 3 years ago

@arunrdd did you find a way to solve this error?

kconrad-cls commented 3 years ago

+1 to the people experiencing this problem.

JMCPH commented 3 years ago

@mariusandra what is the status on this? We are still getting this error with importing objective-c headers #import "PHGCrypto.h" in the PHGStorage.h file

mariusandra commented 3 years ago

Version 1.4.0 should finally fix this!