-
Notifications
You must be signed in to change notification settings - Fork 986
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 #1232
Comments
How to download sh required_reason_api_scanner.sh YourAppDirectory and run in your react-native project? |
You can clone the https://github.com/Wooder/ios_17_required_reason_api_scanner repository to be able to run it. |
@gabrielguilhoto - Thanks for your reply. |
@gabrielguilhoto - After I cloned the git on my desktop.Getting error. sh: required_reason_api_scanner.sh: No such file or directory |
If you cloned it on your desktop then there is no folder called Desktop... you would just put |
@WilliamWelsh - Thanks it is working. Is it mandatory to update every library for iOS privacy manifest? |
Yeah... should I mention it once again, #1197 — The future of react-native-fs? |
I am using react-native-fs:2.20.0. |
I have no use for disk space APIs so I removed them with patch-package: diff --git a/node_modules/react-native-fs/RNFSManager.m b/node_modules/react-native-fs/RNFSManager.m
index 5ddd941..80fb3e9 100755
--- a/node_modules/react-native-fs/RNFSManager.m
+++ b/node_modules/react-native-fs/RNFSManager.m
@@ -726,24 +726,11 @@ + (BOOL)requiresMainQueueSetup
{
unsigned long long totalSpace = 0;
unsigned long long totalFreeSpace = 0;
-
- __autoreleasing NSError *error = nil;
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error:&error];
-
- if (dictionary) {
- NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize];
- NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey:NSFileSystemFreeSize];
- totalSpace = [fileSystemSizeInBytes unsignedLongLongValue];
- totalFreeSpace = [freeFileSystemSizeInBytes unsignedLongLongValue];
-
- resolve(@{
- @"totalSpace": [NSNumber numberWithUnsignedLongLong:totalSpace],
- @"freeSpace": [NSNumber numberWithUnsignedLongLong:totalFreeSpace]
- });
- } else {
- [self reject:reject withError:error];
- }
+ // Remove disk space APIs to not to trigger NSPrivacyAccessedAPICategoryDiskSpace for privacy manifest
+ resolve(@{
+ @"totalSpace": [NSNumber numberWithUnsignedLongLong:totalSpace],
+ @"freeSpace": [NSNumber numberWithUnsignedLongLong:totalFreeSpace]
+ });
}
|
@gabrielguilhoto @gkasireddy202 Have You found any workaround for this or do we have to manually add the reason in PrivacyInfo.xcprivacy under this API Type NSPrivacyAccessedAPICategoryFileTimestamp. |
I added this API reason in PrivacyInfo.xcprivacy file in my app. |
@gkasireddy202 Under this API NSPrivacyAccessedAPICategoryFileTimestamp?
|
@MianSaad705 - I added the below API type and reason in my app privacy file.I did not get any warning emails from Apple and also app is approved. |
@gkasireddy202 Thanks. |
Starting May 1, Apple will require iOS submissions to the App Store to have privacy manifests describing the use of required reason APIs: https://developer.apple.com/news/?id=3d8a9yyh.
I used a script to find required reason APIs in our project and it pointed to 4 uses by
react-native-fs
in theRNFSManager.m
file, at least in version 2.19.0:NSFileCreationDate
NSFileModificationDate
NSFileSystemFreeSize
NSFileSystemSize
Could you please add the required privacy manifest?
The text was updated successfully, but these errors were encountered: