Git Product home page Git Product logo

Comments (4)

alexs-mparticle avatar alexs-mparticle commented on July 22, 2024 1

Tracking internally as https://go.mparticle.com/work/SQDSDKS-2772

from react-native-mparticle.

willpassidomo avatar willpassidomo commented on July 22, 2024

Hey @markgibaud-vtail thanks for raising this! The blocker for us currently is migrating the SDK initialization logic (MParticle.start(MParticleOptions) to the JS side. Historically, we have strongly recommended that everyone initialize the SDK in Application.onCreate(), primarily to start Kits as early in the application lifecycle as possible. Based on this, in most of our tertiary SDKs that wrap their Native counterparts, the paradigm we follow is 1) require initialization of the SDKs in the native layer 2) interact with the initialized SDK in the platform layer (ie in React, the JS layer)

Now, since attribution can happen quite quickly after initialization, we require AttributionListener instances to be registered from within MParticleOptions so due to this, there is no Native endpoint (MParticle#setAttributionListener() for example) that we can map to from the React JS layer. That is, unless we chose to wrap MParticleOptions altogether and go down the path of allowing full-on initialization from JS.

Obviously, there are some assumptions we could and are revisiting here; do we need to initialize exactly in onCreate(), are there any downsides of opening an additional API to register an AttributionListener after SDK initialization, etc. Basically, this is my long-winded way of saying "we agree but there are a few complicating factors beyond just adding a mapping" :)

from react-native-mparticle.

markgibaud-vtail avatar markgibaud-vtail commented on July 22, 2024

Hi @willpassidomo thanks for the reply and description! I imagined it wasn't straight forward.

One option is checking out how react-native-voip-notification lib does it, where they just store the events on the native side until the RN side is detected to be up / listener wired up, then send over the collection of events. Requires implementing startObserving and blah blah on the RN side so also not trivial but perhaps an option!

https://github.com/react-native-webrtc/react-native-voip-push-notification/blob/master/ios/RNVoipPushNotification/RNVoipPushNotificationManager.m#L116

react-native-callkeep has a similar approach:

https://github.com/react-native-webrtc/react-native-callkeep/blob/master/ios/RNCallKeep/RNCallKeep.m#L108

Not causing us any huge issues so far though, just a code convenience, so happy for this to go into the backlog until there are more requests around it!

from react-native-mparticle.

einsteinx2 avatar einsteinx2 commented on July 22, 2024

Tracking internally as ticket #76390.

This is in the backlog, but as it's not high priority I can't give a reasonably accurate ETA at this time. We'll update this ticket when more information is available.

from react-native-mparticle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.