Hi :slightly_smiling_face: I have a website and m...
# support
s
Hi šŸ™‚ I have a website and mobile app built in flutter (iOS and android). I want to integrate Braze from Rudderstack using device mode. - In Braze, do I need to create an app for each platform (web, iOS and android) ? - In Rudderstack, do I need to create a braze destination for each platform ? - Should I use the rudder_integration_braze_flutter plugin in my flutter app ? - Would I be able to integrate only rudderstack SDK in order to use braze’s feature such as in-app messages and push notifications? Or would I have to integrate braze sdk along with rudderstack SDK in order to use those features ? Thank you very much!
s
Hey There! šŸ‘‹ Your message has been received by the RudderStack team. We will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
c
Hey @stale-furniture-60415 , 1. It should depends upon your use case, as Braze support apps for multiple platforms. But having a single app for all the platforms should be preferred. 2. I would suggest to have a single Braze destination connected to a Flutter source for convenience. But you’re not restricted from creating multiple Braze destinations and connect to the Flutter source. 3. Yeah you should use that plugin, please refer (Flutter section): https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/#adding-device-mode-integration 4. To use those features you need to have Braze native SDK integrated along with RudderStack SDK.
Actually
Rest Api Key
is not a mandatory section for Braze device mode and you may fill random value in it. So to send events to Braze you need to fill: 1. App Key 2. Data Center
s
Actually I have 3 different
App keys
, one for each platform (web, android an iOS). Which one should I fill in the
App Key
field when creating the destination ?
c
I’m discussing with the team and will get back to you.
šŸ‘ 1
s
Hi @calm-yak-10773 I’ve added Flutter as a source. I’ve added Braze as a destination. I’ve integrated Rudderstack plugin in flutter https://pub.dev/packages/rudder_sdk_flutter So far, I can see the events in the flutter source in rudderstack. But the event is not sent to Braze. Any idea what I might have done wrong here ? Thank you
c
Let’s ensure following things are configured properly at Rudderstack-Braze dashboard: • App Key • Data Center • and
Use device-mode to send events
is turned on. (This settings could be found at the bottom). Also can you set the log to Verbose (https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-flutter-sdk/flutter-v2/#debugging) and check if you’re getting any kind of error or not from the Braze SDK? To test if events are reaching to Braze or not, please try following steps: 1. Log in to Braze account. 2. Open
Developer Console
at the left bottom side. 3. Open
Internal Groups
tab and
Create Internal Group
(refer second pic) 4. Navigate to the created group ->
Add Test User
and enter external id (it could be a random Id for testing purpose) (refer third pic) 5. Once above steps are done successfully: a. Now make identify event with the external id (which was set in the fourth step) b. To set the externalId: Follow this https://www.rudderstack.com/docs/sources/event-streams/sdks/rudderstack-flutter-sdk/flutter-v2/#external-id c. Now make any other types of supported events 6. Your events could be found under
Event User Log
tab. Additional tips: 1. Events are delivered instantly which means ideally you shouldn’t have to wait to check for the events. 2. You might need to refresh the page after each time you send the event.
Meanwhile can you share with me the code snippet where you’re initialising the RudderStack Flutter SDK?
s
Thank you for your response. On initializing the SDK, I have these 2 lines:
Copy code
builder.withDataPlaneUrl("https://rudderstacgwyx.dataplane.rudderstack.com");
  builder.withControlPlaneUrl("https://api.rudderlabs.com");
Can you precise where I could find
<DATA_PLANE_URL>
and
<CONTROL_PLACE_URL>
? I’m actually on the free plan.
c
Actually you’re trying to send the events using Flutter device mode destinations, but haven’t provided a way to do so while SDK initialisation. Hence events were not being sent to the Braze. Please refer this Braze doc (Flutter section): https://www.rudderstack.com/docs/destinations/streaming-destinations/braze/#adding-device-mode-integration
Copy code
final RudderController rudderClient = RudderController.instance;
RudderConfigBuilder builder = RudderConfigBuilder();
builder.withFactory(RudderIntegrationBrazeFlutter());
rudderClient.initialize(<WRITE_KEY>, config: builder.build(), options: null);
This is necessary step:
builder.withFactory(RudderIntegrationBrazeFlutter());
to send events using device mode. Now, coming to your question: • You don’t need to pass
CONTROL_PLANE_URL
as SDK manages that URL. ā—¦ ā€œhttps://api.rudderlabs.comā€ is the default CONTROL_PLANE_URL. • To find
DATA_PLANE_URL
open: https://app.rudderstack.com/ ā—¦ You could find the url in the top (refer pic).
s
This is the code snippet of the SDK’s initialization :
Copy code
void initRudderstack() {
  RudderConfigBuilder builder = RudderConfigBuilder();

  builder.withDataPlaneUrl("https://****.dataplane.rudderstack.com");
  builder.withControlPlaneUrl("https://api.rudderlabs.com");
  builder.withLogLevel(RudderLogger.VERBOSE);

  builder.withFactories([RudderIntegrationBrazeFlutter()]);

  RudderOption options = RudderOption();
  const String writeKey = "*****";

  RudderClient.instance
      .initialize(writeKey, config: builder.build(), options: options);
}
I’m getting this error
c
What is the version of Rudder Flutter SDK, can you please confirm once?
s
Copy code
rudder_sdk_flutter: ^2.3.0
rudder_integration_braze_flutter: ^1.0.2
c
Instead of this:
builder.withFactories([RudderIntegrationBrazeFlutter()])
please use this:
Copy code
builder.withFactory(RudderIntegrationBrazeFlutter());
You may refer the sample Flutter app here: https://github.com/rudderlabs/rudder-sdk-flutter/blob/develop/packages/example/lib/home_screen.dart
Let me know, if the error is still there!
s
The error is still there šŸ˜•
Here’s the updated snippet
Copy code
import 'package:flutter_segment/flutter_segment.dart';
import 'package:rudder_integration_braze_flutter/rudder_integration_braze_flutter.dart';
import 'package:rudder_sdk_flutter/RudderClient.dart';
// ignore: depend_on_referenced_packages
import 'package:rudder_sdk_flutter_platform_interface/platform.dart';

void initRudderstack() {
  RudderConfigBuilder builder = RudderConfigBuilder();

  builder.withDataPlaneUrl("https://*.dataplane.rudderstack.com");
  builder.withControlPlaneUrl("https://api.rudderlabs.com");
  builder.withLogLevel(RudderLogger.VERBOSE);

  builder.withFactory(RudderIntegrationBrazeFlutter());

  RudderOption options = RudderOption();
  const String writeKey = "*";

  RudderClient.instance
      .initialize(writeKey, config: builder.build(), options: options);
}
c
I’m checking with the team.
šŸ™ 1
s
I cleared the cache and restarted the process
It worked on android
šŸ‘ 1
But in iOS I’m getting this error
Copy code
Undefined symbols for architecture arm64:
      "_OBJC_CLASS_$_RudderBrazeFactory", referenced from:
          objc-class-ref in RudderIntegrationBrazeFlutterPlugin.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
Copy code
Error (Xcode): Undefined symbol: _OBJC_CLASS_$_RudderBrazeFactory
c
Does your Mac contain an M1 chip?
s
M2*
šŸ‘€ 1
c
This issue seems related to the new M1/M2 chip mac. We will look into it. Meanwhile, can you please share the exact command/steps which you use to run the iOS app? (Actually for our React-Native SDKs in M1 chip we need to use
arch -x86_64
to run the iOS app.) Also, please try this steps (Open Xcode through Rosetta) and if it works please let us know: 1. Open Finder 2. Right click on Xcode in applications folder 3. Get Info 4. set Open with Rosetta to true Now open your iOS app
*.xcworkspace
file in XCode and run the app directly. This might solve your issue.
s
Thank you for your response. Weirdly, it actually worked on my physical iPhone, but not on the simulator
šŸ‘ 1
I tried to install a simulator with iOS 13.6 (has intel support), but I got the same error
c
Can you please add
arm64
as an Excluded Architecture in your
Build Settings
as shown in the below image:
Let us know if it solves the issue.
s
Still getting the error:
c
We are looking at it. Did you tried this steps, I mentioned earlier (checking if it solves the issues or mot):
Also, please try this steps (Open Xcode through Rosetta) and if it works please let us know:
1. Open Finder
2. Right click on Xcode in applications folder
3. Get Info
4. set Open with Rosetta to true
Now open your iOS app
*.xcworkspace
file in XCode and run the app directly. This might solve your issue.
Also please try this once:
flutter clean && flutter pub get && flutter run
in your flutter project.
s
Hello @calm-yak-10773, I’m actually having an issue while running my app in release mode on android
flutter run --release
. I don’t see events coming to my flutter source on Rudderstack, so nothing is happening on Braze as well. This only happens when running the app in release mode.
c
Do you have any ProGuard rules in Android? In case of iOS release build are events flowing fine?
Seems like you’ve started a new thread, here. Let’s discuss about this issue over there.