eager-pizza-76165
03/10/2023, 8:09 AMeager-pizza-76165
03/10/2023, 8:14 AM<*providers*>
<RudderStackInit />
<RootStackNavigator />
</*providers*>
• `RudderStackInit.tsx`:
export const RudderStackInit = () => {
useEffect(() => {
rudderClient
.setup(config.rudderstackWriteKey, {
dataPlaneUrl: config.rudderstackUrl,
trackAppLifecycleEvents: true,
})
.catch((e) => handleError(e))
}, [])
return null
}calm-yak-10773
03/10/2023, 9:28 AMeager-pizza-76165
03/10/2023, 10:06 AMandroid/app/proguard-rules.pro files is empty and our android/app/build.gradle looks like this (uses default proguard-android.txt):
...
def enableProguardInReleaseBuilds = false
...
android {
...
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
...
}
...eager-pizza-76165
03/10/2023, 10:09 AM-keep class com.rudderstack.android.** { *; }
line into proguard-rules.pro and do another release. frankly, I’m not experienced with proguard, so please tell me whether it makes sense.
also, if this is a rule that should be always present, it may make sense to reference it in the setup section od the docs, now it’s only at the bottom of the FAQ.calm-yak-10773
03/10/2023, 11:00 AMkind-carpenter-27609
03/23/2023, 5:22 AMcalm-yak-10773
03/23/2023, 5:59 AMproguard rules are enabled on your release build.
release {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
this line basically: minifyEnabled enableProguardInReleaseBuilds
Hence you need to follow this steps mentioned earlier, refer here.eager-pizza-76165
03/23/2023, 1:18 PMenableProguardInReleaseBuilds is set to false as seen in my code. however, the issue is now indeed resolved, but I can’t really confirm it was the proguard rule that made the difference 😕calm-yak-10773
03/23/2023, 7:32 PMeager-pizza-76165
03/24/2023, 12:57 PM