Closed dmiluski closed 3 years ago
Hi Folks,
Just giving a heads up to those looking for Carthage support, this brings it to this repo.
Segment guys, any update on this? We need to integrate this SDK using carthage.
Hi @ozgur ,
This integration unfortunately caused some double imports that weren't ideal. I blame it on my lack of full understanding of how these integrations fully integrate with a project and how that would play friendly with separate repo projects. Eg. with this setup, crash reporting/performance wasn't being reported.
On my team, we had a new member join who received an M1 laptop which threw our environment/setup into a tail spin to support which lead to a rush to just move all in on SPM.
To support SPM integration:
#import <Foundation/Foundation.h>
#if defined(__has_include) && __has_include(<Analytics/SEGAnalytics.h>)
#import <Analytics/SEGIntegration.h>
#else
- #import <Segment/SEGIntegration.h>
+ @import Segment;
#endif
#import <Intercom/Intercom.h>
Longer Term Goals:
Unfortunately, based on my email with segment, it doesn't seem as though SwiftPM is a priority so we needed a fast fix for the time being and this was it in order to make it to our next goals.
On further review of this repo, it looks like this change may already be in progress here: https://github.com/segment-integrations/analytics-ios-integration-firebase/pull/65/files
We're opting to not continue support Carthage on most of our libraries going forward and will be committing to SPM as the main package manager for the future. I merged a SPM PR a little earlier for this firebase integration and it'll be slowly rolling out over time to other integrations on an as-needed basis. On our new library that's in pilot, analytics-swift, it will only be supporting SPM. This will go for integrations that eventually get made for it as well.
Issue: Issue-35 Only able to be installed via cocoapods
Problem: Existing Firebase integrations do not support Carthage
Approach: Including packaging project -> framework which can be consumed by developers
There's likely a better approach given Firebase guidelines, but this allowed be to build and link with firebase + integrations with carthage via
Cartfile:
carthage bootstrap --platform ios --use-ssh --cache-builds
Changes: