Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add privacy manifest from bugsnag-cocoa to React Native #2132

Open
sparga opened this issue May 2, 2024 · 3 comments
Open

Add privacy manifest from bugsnag-cocoa to React Native #2132

sparga opened this issue May 2, 2024 · 3 comments
Labels
backlog We hope to fix this feature/bug in the future

Comments

@sparga
Copy link

sparga commented May 2, 2024

Hi! 馃憢

While adding privacy manifest to my project, I noticed that the one provided by Bugsnag wasn't included in the final bundle. It turns out that the podspec to integrate bugsnag-cocoa in a React Native project is different.

I had to update the podspecs from bugsnag-js to fix it. For now I am using patch-package but I think it would be great to have that change merged upstream.

Here is the diff that solved my problem:

diff --git a/node_modules/@bugsnag/react-native/BugsnagReactNative.podspec b/node_modules/@bugsnag/react-native/BugsnagReactNative.podspec
index 13f1617..9a3b1e3 100644
--- a/node_modules/@bugsnag/react-native/BugsnagReactNative.podspec
+++ b/node_modules/@bugsnag/react-native/BugsnagReactNative.podspec
@@ -18,6 +18,9 @@ Pod::Spec.new do |s|
   s.public_header_files = "ios/vendor/bugsnag-cocoa/{#{bugsnag_cocoa_public_header_files.join(',')}}"
   s.header_dir = 'Bugsnag'
   s.requires_arc = true
+  s.resource_bundles = {
+    'Bugsnag' => ['ios/vendor/bugsnag-cocoa/Bugsnag/resources/PrivacyInfo.xcprivacy'],
+  }
 
   if ENV['RCT_NEW_ARCH_ENABLED'] == "1"
     install_modules_dependencies(s)

Thank you!

@mclack
Copy link
Contributor

mclack commented May 8, 2024

Hi @sparga

Thanks for raising this with us.

Just to confirm, can you please let us know which version of the BugSnag React Native SDK you have installed in your app? Since the v7.22.3 release, the SDK should be using v6.28.0 of bugsnag-cocoa which is compliant with Apple's required reasons for API usage, and we've not received any other reports of this failing to work for React Native projects.

Are you also able to confirm how you installed the SDK? For example, did you follow the CLI setup steps? https://docs.bugsnag.com/platforms/react-native/react-native/#installation-and-configuration

Also, was your app rejected by Apple prior to you making this change, or did you simply just observe that the BugSnag privacy manifest seemed to be missing from the final bundle?

@mclack mclack added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label May 8, 2024
@sparga
Copy link
Author

sparga commented May 8, 2024

I am using bugsnag/js version 7.22.4 and I can confirm with the Podfile.lock that Bugsnag ReactNative is also using this version.

Bugsnag-Cocoa v6.28.0 is indeed compliant and correctly include the Privacy Manifest in the app bundle. But the React Native SDK seems to use a different podspec file which doesn't include the manifest.

The SDK was installed years ago so I cannot confirm how it was installed but the git history suggests that the CLI was used.

I haven't tried submitting an app without this change. I simply noticed that other 3rd party SDKs had their privacy manifest included in the final app bundle whereas Bugsnag didn't. Other libraries all seem to be using resource_bundles in the Podspec to include it.

@mclack
Copy link
Contributor

mclack commented May 9, 2024

Hi @sparga

Thanks for the additional information.

We've created a task to look into this and update the BugsnagReactNative.podspec. We will make sure to post any updates on this thread.

@mclack mclack added backlog We hope to fix this feature/bug in the future and removed awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future
Projects
None yet
Development

No branches or pull requests

2 participants