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

Read the Write Key #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeonardoRosaa
Copy link

@LeonardoRosaa LeonardoRosaa commented Jul 10, 2022

The most applications to Flutter have support for IOS and Android therefore it does make sense to keep the loading WRITE_KEY within the package.

@LeonardoRosaa LeonardoRosaa changed the title changed how to read WRITE_KEY Read the Write Key Jul 10, 2022
@danielgomezrico
Copy link
Contributor

@LeonardoRosaa what's the purpose of this write key? I want to have more context to understand the value of the implementation

@LeonardoRosaa
Copy link
Author

@LeonardoRosaa what's the purpose of this write key? I want to have more context to understand the value of the implementation

I felt that is unnecessary that the client needs to do their logic to get the Android or IOS write key.

This PR implements that the own package solves the logic to load the right key.

@danielgomezrico
Copy link
Contributor

@LeonardoRosaa thanks for the answer, I was asking about the write key related to segment, I dont have context about the purpose of this, excuse for that

@LeonardoRosaa
Copy link
Author

@LeonardoRosaa thanks for the answer, I was asking about the write key related to segment, I dont have context about the purpose of this, excuse for that

The write key is required to send data to the Segment Platform.

@savy-91
Copy link

savy-91 commented Aug 30, 2022

@LeonardoRosaa thanks for the answer, I was asking about the write key related to segment, I dont have context about the purpose of this, excuse for that

@danielgomezrico to make it more clear, currently users have to do something like this:

    Segment.config(
        options: SegmentConfig(
      writeKey: Platform.isAndroid ? ANDROID_WRITE_KEY : IOS_WRITE_KEY,
      trackApplicationLifecycleEvents: true,
    ));

@LeonardoRosaa moved the logic to decide which write key to use in the package, so when initializing Segment the user has to provide both write keys and this library will then decide which one to use depending on the platform.

@danielgomezrico
Copy link
Contributor

danielgomezrico commented Apr 14, 2023

Sorry for the delay

I was thinking that not every project has iOS and android at the same time, we are currently working on a project that started as android only. So, I'm thinking that this use case may break for some people, and so we should not move into that direction? 🤔

@LeonardoRosaa
Copy link
Author

I was thinking that not every project has iOS and android at the same time, we are currently working on a project that started as android only. So, I'm thinking that this use case may break for some people, and so we should not move into that direction? 🤔

Does make sense to start the package on a platform that will not use the package?

@danielgomezrico
Copy link
Contributor

danielgomezrico commented Apr 14, 2023

Sorry, I don't get your question, we are using it, but currently we have only android (on our project), can you reword your question please?

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

Successfully merging this pull request may close these issues.

3 participants