question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flavorAware configuration for iOS

See original GitHub issue

At https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#fetch-sentryproperties you document the support of flavorAware configuration for Android.
Meaning we can have different sentry.properties file for each flavor.

Is there any way to do the same thing for the iOS build under a React Native project? Probably based on build "configuration"s. I can’t find the doc specifying this.

Thank you

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
krystofwoldrichcommented, Dec 9, 2022

At the moment iOS doesn’t support the flavorAware flag.

If you would like to have multiple property files for different flavors, you would need to adjust the path in the SENTRY_PROPERTIES variable in the Bundle React Native code and images build phase.

export SENTRY_PROPERTIES=sentry.properties

I think there is no ENV for the scheme name, but it’s possible to add custom ENVs for every scheme, where SCHEME_NAME can be defined.

Then the SENTRY_PROPERTIES could be adjusted like follow:

export SENTRY_PROPERTIES="sentry-${SCHEME_NAME}.properties"
0reactions
brustolincommented, Dec 13, 2022

I believe flavors is similar to build configuration + Schemes. It is possible to do the same thing with both.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manual Configuration for React Native - Sentry Documentation
Learn about manual configuration for iOS and Android. ... sentryCli = [ logLevel: "debug", flavorAware: true ]. The corresponding flavor files should also ......
Read more >
Installing app variants on the same device
To configure which target is used, use the scheme field for iOS. ... sentryCli = [ flavorAware: true ] to android/app/build.gradle and name...
Read more >
Configure multiple flavor/schema for React Native Apps
iOS. Adding new configurations. - Select your project under PROJECT in XCode and in the Info tab, search for Configurations.
Read more >
Build Flavor / scheme for React Native | by Ujjwal Manandhar
So let's get started and see how we setup for both android and iOS. Let's start with iOS first. Open your iOS workspace...
Read more >
sentry/react-native/sentry.gradle - UNPKG
flavorAware && config.sentryProperties) {. 12, throw new GradleException("Incompatible sentry configuration. " +. 13, "You cannot use both `flavorAware` and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found