From fc80550abac3d6c30dee06c457f31a9fd362ae17 Mon Sep 17 00:00:00 2001 From: Victoria <34351615+vbro1293@users.noreply.github.com> Date: Tue, 2 Jan 2024 15:36:17 +0000 Subject: [PATCH] Update manual-setup.mdx I believe the getPackages Kotlin example is not valid Kotlin (it may have been ported from the react-native example comment - which now has a ticket to update the application of adding packages https://github.com/facebook/react-native/pull/41856) --- src/platforms/react-native/manual-setup/manual-setup.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platforms/react-native/manual-setup/manual-setup.mdx b/src/platforms/react-native/manual-setup/manual-setup.mdx index 80b39739eb1ac7..382b343bd93df1 100644 --- a/src/platforms/react-native/manual-setup/manual-setup.mdx +++ b/src/platforms/react-native/manual-setup/manual-setup.mdx @@ -245,11 +245,10 @@ public class MainApplication extends Application implements ReactApplication { import io.sentry.react.RNSentryPackage class MainApplication() : Application(), ReactApplication { - override fun getPackages():List { - val packages = new PackageList(this).getPackages(); - packages.add(new RNSentryPackage()); - return packages; - } + override fun getPackages():List = + PackageList(this).packages.apply { + add(RNSentryPackage()) + } } ```