-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[iOS] [Privacy Manifest] Handle the case where the file reference doesn't have a path #44410
Conversation
If you use the only image crop picker, react-native-image-crop-picker, you can't use versions 0.74 or higher I hope this patch will be patched in a short time. Please~ |
…gation (#28646) # Why There are a few issues right now with privacy manifest aggregation (facebook/react-native#44410, facebook/react-native#44402, facebook/react-native#44402) that I expect will be fixed in React Native 0.74.2, but in order to ensure that this doesn't break builds I've disabled it by default and added this build property to allow folks to toggle it on. We can switch on by default when 0.74.2 is released and proven to handle some edge cases better. # How Same old process for adding a new property # Test Plan Run tests # Checklist - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [x] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [x] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Hi @cipolleschi! I see there is a warning from internal tests. Is there anything I can do to help fix and have this PR merged? Thanks! |
Hope it will be merge before next release :) |
@cipolleschi merged this pull request in 4ad65ac. |
This pull request was successfully merged by @robertying in 4ad65ac. When will my fix make it into a release? | How to file a pick request? |
…k#44410) Summary: The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path. Example, for a project setup like the screenshot: <img width="249" alt="image" src="https://github.com/facebook/react-native/assets/22592111/45dd1cf4-c2f6-4abb-940f-136a4d502966"> The code https://github.com/facebook/react-native/blob/05a4232dd591e2d43f192d69ca14a04f4a3fb6a1/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb#L80-L81 prints `file_refs`: ``` [ <PBXFileReference name=`LaunchScreen.storyboard` path=`learnX/LaunchScreen.storyboard` UUID=`81AB9BB72411601600AC10FF`>, <PBXVariantGroup name=`InfoPlist.strings` UUID=`D40B9F832B248EF5004BC08C`>, <PBXFileReference path=`AppCenter-Config.plist` UUID=`D40B9F802B248EC2004BC08C`>, <PBXFileReference name=`PrivacyInfo.xcprivacy` path=`learnX/PrivacyInfo.xcprivacy` UUID=`D403DD362BCA2BCF00E5295C`>, <PBXFileReference name=`Assets.xcassets` path=`learnX/Assets.xcassets` UUID=`D40B9F652B248AEB004BC08C`> ] ``` where a `PBXVariantGroup` exists and it doesn't have `path`. The error `undefined method 'end_with?' for nil` occurs as a result. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path Pull Request resolved: facebook#44410 Test Plan: 1. Add a new "Strings File (Legacy)" in Xcode to the project. 2. Run `pod install` for iOS. 3. See the error `undefined method 'end_with?' for nil`. 4. Apply the fix and rerun `pod install`. 5. The script runs successfully. Reviewed By: javache Differential Revision: D57056159 Pulled By: cipolleschi fbshipit-source-id: 42caaf1a98efb9111f6ff1014a5c8b7703b042f2
…k#44410) Summary: The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path. Example, for a project setup like the screenshot: <img width="249" alt="image" src="https://github.com/facebook/react-native/assets/22592111/45dd1cf4-c2f6-4abb-940f-136a4d502966"> The code https://github.com/facebook/react-native/blob/05a4232dd591e2d43f192d69ca14a04f4a3fb6a1/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb#L80-L81 prints `file_refs`: ``` [ <PBXFileReference name=`LaunchScreen.storyboard` path=`learnX/LaunchScreen.storyboard` UUID=`81AB9BB72411601600AC10FF`>, <PBXVariantGroup name=`InfoPlist.strings` UUID=`D40B9F832B248EF5004BC08C`>, <PBXFileReference path=`AppCenter-Config.plist` UUID=`D40B9F802B248EC2004BC08C`>, <PBXFileReference name=`PrivacyInfo.xcprivacy` path=`learnX/PrivacyInfo.xcprivacy` UUID=`D403DD362BCA2BCF00E5295C`>, <PBXFileReference name=`Assets.xcassets` path=`learnX/Assets.xcassets` UUID=`D40B9F652B248AEB004BC08C`> ] ``` where a `PBXVariantGroup` exists and it doesn't have `path`. The error `undefined method 'end_with?' for nil` occurs as a result. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path Pull Request resolved: facebook#44410 Test Plan: 1. Add a new "Strings File (Legacy)" in Xcode to the project. 2. Run `pod install` for iOS. 3. See the error `undefined method 'end_with?' for nil`. 4. Apply the fix and rerun `pod install`. 5. The script runs successfully. Reviewed By: javache Differential Revision: D57056159 Pulled By: cipolleschi fbshipit-source-id: 42caaf1a98efb9111f6ff1014a5c8b7703b042f2
Summary: The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path. Example, for a project setup like the screenshot: <img width="249" alt="image" src="https://github.com/facebook/react-native/assets/22592111/45dd1cf4-c2f6-4abb-940f-136a4d502966"> The code https://github.com/facebook/react-native/blob/05a4232dd591e2d43f192d69ca14a04f4a3fb6a1/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb#L80-L81 prints `file_refs`: ``` [ <PBXFileReference name=`LaunchScreen.storyboard` path=`learnX/LaunchScreen.storyboard` UUID=`81AB9BB72411601600AC10FF`>, <PBXVariantGroup name=`InfoPlist.strings` UUID=`D40B9F832B248EF5004BC08C`>, <PBXFileReference path=`AppCenter-Config.plist` UUID=`D40B9F802B248EC2004BC08C`>, <PBXFileReference name=`PrivacyInfo.xcprivacy` path=`learnX/PrivacyInfo.xcprivacy` UUID=`D403DD362BCA2BCF00E5295C`>, <PBXFileReference name=`Assets.xcassets` path=`learnX/Assets.xcassets` UUID=`D40B9F652B248AEB004BC08C`> ] ``` where a `PBXVariantGroup` exists and it doesn't have `path`. The error `undefined method 'end_with?' for nil` occurs as a result. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path Pull Request resolved: #44410 Test Plan: 1. Add a new "Strings File (Legacy)" in Xcode to the project. 2. Run `pod install` for iOS. 3. See the error `undefined method 'end_with?' for nil`. 4. Apply the fix and rerun `pod install`. 5. The script runs successfully. Reviewed By: javache Differential Revision: D57056159 Pulled By: cipolleschi fbshipit-source-id: 42caaf1a98efb9111f6ff1014a5c8b7703b042f2
…k#44410) Summary: The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path. Example, for a project setup like the screenshot: <img width="249" alt="image" src="https://github.com/facebook/react-native/assets/22592111/45dd1cf4-c2f6-4abb-940f-136a4d502966"> The code https://github.com/facebook/react-native/blob/05a4232dd591e2d43f192d69ca14a04f4a3fb6a1/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb#L80-L81 prints `file_refs`: ``` [ <PBXFileReference name=`LaunchScreen.storyboard` path=`learnX/LaunchScreen.storyboard` UUID=`81AB9BB72411601600AC10FF`>, <PBXVariantGroup name=`InfoPlist.strings` UUID=`D40B9F832B248EF5004BC08C`>, <PBXFileReference path=`AppCenter-Config.plist` UUID=`D40B9F802B248EC2004BC08C`>, <PBXFileReference name=`PrivacyInfo.xcprivacy` path=`learnX/PrivacyInfo.xcprivacy` UUID=`D403DD362BCA2BCF00E5295C`>, <PBXFileReference name=`Assets.xcassets` path=`learnX/Assets.xcassets` UUID=`D40B9F652B248AEB004BC08C`> ] ``` where a `PBXVariantGroup` exists and it doesn't have `path`. The error `undefined method 'end_with?' for nil` occurs as a result. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path Pull Request resolved: facebook#44410 Test Plan: 1. Add a new "Strings File (Legacy)" in Xcode to the project. 2. Run `pod install` for iOS. 3. See the error `undefined method 'end_with?' for nil`. 4. Apply the fix and rerun `pod install`. 5. The script runs successfully. Reviewed By: javache Differential Revision: D57056159 Pulled By: cipolleschi fbshipit-source-id: 42caaf1a98efb9111f6ff1014a5c8b7703b042f2
Summary: The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path. Example, for a project setup like the screenshot: <img width="249" alt="image" src="https://github.com/facebook/react-native/assets/22592111/45dd1cf4-c2f6-4abb-940f-136a4d502966"> The code https://github.com/facebook/react-native/blob/05a4232dd591e2d43f192d69ca14a04f4a3fb6a1/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb#L80-L81 prints `file_refs`: ``` [ <PBXFileReference name=`LaunchScreen.storyboard` path=`learnX/LaunchScreen.storyboard` UUID=`81AB9BB72411601600AC10FF`>, <PBXVariantGroup name=`InfoPlist.strings` UUID=`D40B9F832B248EF5004BC08C`>, <PBXFileReference path=`AppCenter-Config.plist` UUID=`D40B9F802B248EC2004BC08C`>, <PBXFileReference name=`PrivacyInfo.xcprivacy` path=`learnX/PrivacyInfo.xcprivacy` UUID=`D403DD362BCA2BCF00E5295C`>, <PBXFileReference name=`Assets.xcassets` path=`learnX/Assets.xcassets` UUID=`D40B9F652B248AEB004BC08C`> ] ``` where a `PBXVariantGroup` exists and it doesn't have `path`. The error `undefined method 'end_with?' for nil` occurs as a result. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path Pull Request resolved: #44410 Test Plan: 1. Add a new "Strings File (Legacy)" in Xcode to the project. 2. Run `pod install` for iOS. 3. See the error `undefined method 'end_with?' for nil`. 4. Apply the fix and rerun `pod install`. 5. The script runs successfully. Reviewed By: javache Differential Revision: D57056159 Pulled By: cipolleschi fbshipit-source-id: 42caaf1a98efb9111f6ff1014a5c8b7703b042f2
Summary:
The new cocoapod post install script includes aggregation and generation of privacy manifests for iOS, which is great. However, the script doesn't consider the case where the file reference doesn't have a path.
Example, for a project setup like the screenshot:
The code
react-native/packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb
Lines 80 to 81 in 05a4232
prints
file_refs
:where a
PBXVariantGroup
exists and it doesn't havepath
. The errorundefined method 'end_with?' for nil
occurs as a result.Changelog:
[IOS] [FIXED] - In privacy manifest post install script, handle the case where the file reference doesn't have a path
Test Plan:
pod install
for iOS.undefined method 'end_with?' for nil
.pod install
.