Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with analytics-swift (Segment) #670

Closed
qwer10023500 opened this issue Mar 25, 2024 · 26 comments
Closed

Conflict with analytics-swift (Segment) #670

qwer10023500 opened this issue Mar 25, 2024 · 26 comments

Comments

@qwer10023500
Copy link

qwer10023500 commented Mar 25, 2024

90128368-78FA-4F3C-AD62-2A414FFD4F88

WX20240325-142303@2x

@Shahroz16
Copy link
Contributor

Hey @qwer10023500, thank you for reaching out. This is correct, the customer.io iOS SDK is using Segment SDK.

Can you please share your usecase, why do you need both the SDKs?

@qwer10023500
Copy link
Author

We use customerio in our project, and also use segment to forward to other platforms such as firebase.

@qwer10023500
Copy link
Author

image

https://github.com/segmentio/analytics-swift

Analytics-swift and customerio-ios cannot be integrated at the same time

@Shahroz16
Copy link
Contributor

Ideally you should just need on CDP. I would love to talk more about your usecase and see what we can do here.

Are you using destination plugin for firebase? Or it a destination?

@qwer10023500
Copy link
Author

Yes, we use segment Supported Device Mode Destinations

https://github.com/segmentio/analytics-swift?tab=readme-ov-file#supported-device-mode-destinations

@Shahroz16
Copy link
Contributor

@qwer10023500 Excellent thanks for the information, I think it should work with Customer.io SDK as well.

Once you add the dependency,

.package(
            name: "Segment",
            url: "https://github.com/segment-integrations/analytics-swift-firebase.git",
            from: "1.1.3"
        ),

initialize the SDK,

 let config = SDKConfigBuilder(cdpApiKey: "YOUR_CDP_API_KEY")
         .migrationSiteId(YOUR_SITE_ID)
         .autoTrackDeviceAttributes(true)

     CustomerIO.initialize(withConfig: config.build())
     CustomerIO.add(plugin: FirebaseDestination())

Can you please try that and let me know?

@Shahroz16
Copy link
Contributor

Just add the customer.io SDK and not the analytics-swift, please before trying the above.

@Shahroz16
Copy link
Contributor

Alright, so I see, https://github.com/segment-integrations/analytics-swift-firebase.git is brining in the dependency as well which is causing the conflict, let me see how we can fix it and get back to you, thanks for working with me here on this :)

@qwer10023500
Copy link
Author

okay, thank you

@Shahroz16
Copy link
Contributor

Shahroz16 commented Mar 25, 2024

@qwer10023500 thank you for your patience here, would you be willing to give this package a shot?

use
https://github.com/customerio/cdp-analytics-swift-firebase
instead of
https://github.com/segment-integrations/analytics-swift-firebase.git

just add this dependency to your project, and then add the plugin, code in ReadMe as well

import CioDataPipelines
import SegmentFirebase // <-- Add this line

 // Configure and initialize the Customer.io SDK
  let config = SDKConfigBuilder(cdpApiKey: "cdpApiKey")
 CustomerIO.initialize(withConfig: config.build())
        
 CustomerIO.shared.add(plugin: FirebaseDestination())

Let me know if you face any issue while getting it to work, I'll be keeping an eye out for your message.

@qwer10023500
Copy link
Author

Sorry, my boss thinks this is wrong and he will contact you guys via support later.

@qwer10023500
Copy link
Author

If you do this you must support all of the following platforms
WX20240326-104215@2x

@scotttwittrockcio
Copy link
Collaborator

@qwer10023500 Thanks for sharing that additional information. We'll keep looking into ways to utilize both the segment SDK and customer-io SDK. Is this a full list of device mode destinations you are utilizing? We don't currently support device mode destinations on our mobile SDK, but trying to capture interest in the various destinations.

@qwer10023500
Copy link
Author

I am using Swift Package Manager to manage third-party tools. I found that after integrating CustomerIO and analytics-swift at the same time, the program cannot be run. By observing, I found that the following content in Package.swift in CustomerIO caused the problem.
WX20240326-111423@2x
Can you guys try to modify it?

@qwer10023500
Copy link
Author

I think changing the url to "https://github.com/segmentio/analytics-swift.git" can solve this problem

@qwer10023500
Copy link
Author

@qwer10023500
Copy link
Author

Our project contains Supported Device Mode Destinations

Amplitude
AppsFlyer
Facebook
Firebase
Customer IO

Therefore I need to add dependencies through segment instead of Customer IO

@Ahmed-CIO
Copy link
Contributor

@qwer10023500 thank you for your patience and all the details provided. We are looking into this to provide either a solution or a simple feasible work around till we build a more long term solution.

@Ahmed-CIO
Copy link
Contributor

Ahmed-CIO commented Mar 27, 2024

Hi @qwer10023500 thanks again for your patience while we are trying to find a resolution. For the time being if you need to use Segment side by side with our iOS SDK, the best option is to use our latest iOS SDK 2.x instead of 3.x.
We are committed to supporting SDK 2.x till the SDK 3.x works smoothly in scenario like yours.

I will also communicate with our TS team to help your team for any relevant follow ups with this one.

@darryljohnson
Copy link

darryljohnson commented Mar 29, 2024

Hey team, I want to callout that this is affecting our app as well. We use CustomerIO for messaging and Segment as our CDP. For the time being we'll remain on 2.x until you all are able to support 3.x side-by-side with direct Segment usage.

@Shahroz16
Copy link
Contributor

Hey @darryljohnson, thanks for reaching out and it's noted. We are working on it, appreciate your patience here.

@Ahmed-CIO Ahmed-CIO added the Unplanned label Apr 5, 2024 — with Linear
@matthewkertis
Copy link

We are also seeing issues when trying to integrate 3.1.0 while using Analytics-iOS. We noticed this was closed and marked as unplanned, is there a current fix for this somewhere or an ETA on when one is expected?

@scotttwittrockcio
Copy link
Collaborator

Hi @matthewkertis, thanks for your feedback. Are you looking to run both the CIO SDK and Analytic-iOS SDK in your app or are you transitioning over? We are evaluating the effort to be able to support running both in parallel. We just haven't locked in a clear solution yet.

In the meantime, we do offer a lot of the same functionality as the Analytics-iOS SDK so you might be able to use our SDK only. I'd love to hear more about your use case. If it's easier to share privately you can email product@customer.io to start a thread with me.

@PaulWen
Copy link

PaulWen commented Apr 22, 2024

Hi @scotttwittrockcio, I am also running into the same issue. Currently, we use Segment for tracking app events and only have the CIO SDK in place for rich push notifications and in-app messages. The main reason for updating to 3x is the privacy manifest added in 3.1.0.

(CC: @Shahroz16)

@Shahroz16
Copy link
Contributor

Hey @PaulWen, thanks for more details, the privacy manifest is added in 2.x as well.

@Ahmed-Ali
Copy link
Contributor

I am happy to share with you that from the release 3.2, we expect Segment to work just fine side by side with our SDK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants