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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Privacy Manifest generator when it does not contain a NSPrivacyAccessedAPITypes key #44628

Closed

Conversation

renchap
Copy link
Contributor

@renchap renchap commented May 20, 2024

Summary:

XCode privacy files might not contain a NSPrivacyAccessedAPITypes key, which causes the following error:

[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each' for nil

node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in `block (4 levels) in get_used_required_reason_apis'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `each'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `block (3 levels) in get_used_required_reason_apis'

Changelog:

[IOS] [FIXED] - Privacy Manifest aggregation failing due to no NSPrivacyAccessedAPITypes key

Test Plan:

I tested this patch on our own app and it solved the issue.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 20, 2024
@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label May 20, 2024
@cipolleschi
Copy link
Contributor

Uhm... I'm a bit confused. How are you hitting this?
The template has that key and it is empty to start with, so you should not hit this error.

@renchap
Copy link
Contributor Author

renchap commented May 21, 2024

I am not sure what package causes it, but I have been hitting this after my last set of dependency updates.

I can provide my Podfile.lock if you ping me on the contrib Discord :)

@cipolleschi
Copy link
Contributor

oh, so it comes from a 3rd party library that has its own manifest. I understand!

@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

salah-ghanim referenced this pull request in react-native-maps/react-native-maps May 24, 2024
* feat: support apple privacy manifest  for compliance with Apple privacy requirements

* chore: downgrade example to react-native 0.74

while waiting on:
facebook/react-native#44437
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label May 29, 2024
@facebook-github-bot
Copy link
Contributor

@cipolleschi merged this pull request in fc4e099.

Copy link

This pull request was successfully merged by @renchap in fc4e099.

When will my fix make it into a release? | How to file a pick request?

cipolleschi pushed a commit that referenced this pull request Jun 3, 2024
…ccessedAPITypes` key (#44628)

Summary:
XCode privacy files might not contain a `NSPrivacyAccessedAPITypes` key, which causes the following error:

```
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each' for nil

node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in `block (4 levels) in get_used_required_reason_apis'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `each'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `block (3 levels) in get_used_required_reason_apis'
```

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Privacy Manifest aggregation failing due to no `NSPrivacyAccessedAPITypes` key

Pull Request resolved: #44628

Test Plan: I tested this patch on our own app and it solved the issue.

Reviewed By: christophpurrer

Differential Revision: D57618425

Pulled By: cipolleschi

fbshipit-source-id: 1a36ab5a1bb45b8507d3663b782c95258d97c8a4
alfonsocj pushed a commit that referenced this pull request Jun 10, 2024
…ccessedAPITypes` key (#44628)

Summary:
XCode privacy files might not contain a `NSPrivacyAccessedAPITypes` key, which causes the following error:

```
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each' for nil

node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in `block (4 levels) in get_used_required_reason_apis'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `each'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `block (3 levels) in get_used_required_reason_apis'
```

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Privacy Manifest aggregation failing due to no `NSPrivacyAccessedAPITypes` key

Pull Request resolved: #44628

Test Plan: I tested this patch on our own app and it solved the issue.

Reviewed By: christophpurrer

Differential Revision: D57618425

Pulled By: cipolleschi

fbshipit-source-id: 1a36ab5a1bb45b8507d3663b782c95258d97c8a4
kosmydel pushed a commit to kosmydel/react-native that referenced this pull request Jun 11, 2024
…ccessedAPITypes` key (facebook#44628)

Summary:
XCode privacy files might not contain a `NSPrivacyAccessedAPITypes` key, which causes the following error:

```
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each' for nil

node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in `block (4 levels) in get_used_required_reason_apis'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `each'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `block (3 levels) in get_used_required_reason_apis'
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Privacy Manifest aggregation failing due to no `NSPrivacyAccessedAPITypes` key

Pull Request resolved: facebook#44628

Test Plan: I tested this patch on our own app and it solved the issue.

Reviewed By: christophpurrer

Differential Revision: D57618425

Pulled By: cipolleschi

fbshipit-source-id: 1a36ab5a1bb45b8507d3663b782c95258d97c8a4
gabrieldonadel pushed a commit that referenced this pull request Jul 1, 2024
…ccessedAPITypes` key (#44628)

Summary:
XCode privacy files might not contain a `NSPrivacyAccessedAPITypes` key, which causes the following error:

```
[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `each' for nil

node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in `block (4 levels) in get_used_required_reason_apis'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `each'
node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in `block (3 levels) in get_used_required_reason_apis'
```

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[IOS] [FIXED] - Privacy Manifest aggregation failing due to no `NSPrivacyAccessedAPITypes` key

Pull Request resolved: #44628

Test Plan: I tested this patch on our own app and it solved the issue.

Reviewed By: christophpurrer

Differential Revision: D57618425

Pulled By: cipolleschi

fbshipit-source-id: 1a36ab5a1bb45b8507d3663b782c95258d97c8a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants