PostHog / posthog-ios

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

Carthage installation not working #64

Closed rickharrison closed 10 months ago

rickharrison commented 10 months ago

When installing posthog via carthage I am getting the following build error:

note: Building targets in dependency order
/Carthage/Checkouts/posthog-ios/Pods/Target Support Files/Pods-PostHog/Pods-PostHog.release.xcconfig:1:1: error: unable to open configuration settings file
warning: no rule to process file '/Users/rickharrison/Development/narwhal2/Carthage/Checkouts/posthog-ios/CHANGELOG.md' of type 'net.daringfireball.markdown' for architecture 'arm64' (in target 'PostHog' from project 'PostHog')
** ARCHIVE FAILED **

Xcode version: 14.3.1 macOS: 13.4.1

Any ideas on how to install this using carthage?

marandaneto commented 10 months ago

@rickharrison Thanks for the info.

If you do:

carthage update
cd Carthage/Checkouts/posthog-ios;pod install
// try to compile again

Does it work?

rickharrison commented 10 months ago

Thanks that appears to have worked:

carthage build posthog-ios --platform iOS --use-xcframeworks --no-use-binaries
*** xcodebuild output can be found in /var/folders/m9/2p5ztxyj6934tqgcrntmjz1w0000gn/T/carthage-xcodebuild.5tK8Pl.log
*** Building scheme "PostHog" in PostHog.xcworkspace

You might want to add that to this page: https://app.posthog.com/ingestion/mobile/ios

I can't be the only one who ran into this issue right?

marandaneto commented 10 months ago

@rickharrison thanks for the confirmation.

I've added a note to our docs.

The page you mentioned is being worked on here and here so I'll wait that to be finished before adding the note there.

Thanks.

rickharrison commented 3 months ago

@marandaneto It seems Carthage has been removed from the docs and all pages. Do you know why?

marandaneto commented 3 months ago

@rickharrison It is not very popular compared to SPM and Cocoapods, since we've rewritten the whole SDK, we did not implement it initially unless we saw the need for it. Can you use either one of them or is Carthage a must? if so, please open a feature request, I don't recall anyone else needing it.

rickharrison commented 3 months ago

Are you able to use SPM with an objective-c project? We don't use cocoa pods because of how heavy it is, and we don't want to swap over to cocoa pods for a single dependency.

marandaneto commented 3 months ago

@rickharrison the new SDK (v3+) is swift only, so yes you can use SPM.