Code Monkey home page Code Monkey logo

braze-segment-swift's People

Contributors

bsneed avatar hokstuff avatar jerielng avatar michaelghseg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

braze-segment-swift's Issues

No way to set `triggerMinimumTimeInterval`

I don't see any possibility to set the triggerMinimumTimeInterval with Segment and this Braze integration. Both Analytics and BrazeDestination do not have this field in their api and the Braze instance within the destination is isolated. How is a Segment user supposed to access this?
The SEGAppboyIntegrationFactory used to allow settings the ABKMinimumTriggerTimeIntervalKey, is the access removal on purpose, is this a bug, or is there an undocumented way to do this?

Thread warning when adding destination

When adding the BrazeDestination to Segment via add(plugin: brazeDestination) and setting configuration.push.automation = true, I always get the warning:

Unable to perform push notification automation steps. The SDK will not be able to automatically process push notifications.
- reason: The SDK must be initialized on the main thread to enable push automation.

Wrapping the call in main dispatch or using MainActor does not change anything. Does the integration always dispatch the Braze initialisation to a background queue?

Run before and enrichment plugins in the BrazeDestination plugin (to enable debounce middleware)

Using the old SDK, we were advised to utilise this bit of middleware to avoid sending duplicate identify calls to Braze, which costs money. https://github.com/segmentio/segment-braze-mobile-middleware

There is no provided alternative that works with Segments new plugin system in the segment-swift package. I tried to manually implement this however the problem is as follows:

  • Segment runs adds its DestinationMetadataPlugin an enrichment step to its own SegmentDestination plugin
  • We want to run our middleware after that step, but before the BrazeDestination sends its event.
  • This should be easy as you can add before and enrichment plugins to a specific DestinationPlugin, however, the BrazeDestination plugin is not running any of the plugins added to it's timeline, as it provides a different implementation of execute(event:). See SegmentDestination for how they run timeline plugins before there own event code.

Do you have any advice on the best approach to implementing the debounce plugin? I suggest removing the execute(event:) implementation in BrazeDestination and using the default provided by Segment that runs the timeline middleware. The code for adding setting the IDFA on Braze can be moved to it's own plugin

Migration doubt

Hi!

We are currently migrating Braze to the Swift version, as well as the Segment plugin for Braze and I have a doubt: In the objC version of the library we had saveRemoteNotification as well as saveLaunchOptions to store any received userInfo while Braze was still uninitialized. I'm not seeing anything similar for the new destination plugin. How are we intended to proceed with this during the migration? what's your recommendation?

Thanks!

Exact version missing.

Currently I am using SPM with rules set branch as main
Screen Shot 2022-09-28 at 3 51 41 pm

Instead above, I wanted to pin this dependency into my project with exact version.
Right now there is no release tag found in this repo.

Is there a version already or I am missing something here?
Please help.

Crash on iOS 17 Beta latest release

There is a crash on iOS when I integrate Braze with Segment. This happens when I open the app.

My code is below:

let configuration = Configuration(writeKey: apiKey)
            .trackApplicationLifecycleEvents(true)
            .flushAt(3)
            .flushInterval(10)
var analytics: Analytics? = nil
analytics?.add(plugin: BrazeDestination())

Crash Details Below

Thread 3 Queue : com.braze.http (serial)
#0	0x0000000109612c00 in closure #1 in static HTTP.Client.Plugin.modify(urlComponents:) ()
#1	0x000000010955b090 in partial apply for closure #1 in static HTTP.Client.Plugin.modify(urlComponents:) ()
#2	0x000000010955de7c in closure #1 in static HTTP.Client.Plugin.modify(urlComponents:)partial apply ()
#3	0x00000001095583f8 in specialized URLRequest.init<τ_0_0>(api:plugins:) ()
#4	0x000000010955a9f0 in specialized implicit closure #1 in HTTP.Client.innerPerform(_:extraPlugins:) ()
#5	0x000000010955cb04 in specialized thunk for @escaping @callee_guaranteed (@in_guaranteed τ_0_0, @guaranteed [HTTP.Client<τ_0_0>.Plugin]) -> (@out URLRequest, @error @owned Error) ()

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.