Giter Club home page Giter Club logo

Comments (14)

birdofpreyru avatar birdofpreyru commented on May 25, 2024 2

Yeah... should I mention it once again, #1197 — The future of react-native-fs?
You probably should migrate to my fork of the lib, and file new issues, do any contributions in there.

from react-native-fs.

stami avatar stami commented on May 25, 2024 1

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]
+  });
 }
 
 

from react-native-fs.

MianSaad705 avatar MianSaad705 commented on May 25, 2024 1

@gkasireddy202 Thanks.

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

How to download sh required_reason_api_scanner.sh YourAppDirectory and run in your react-native project?

from react-native-fs.

gabrielguilhoto avatar gabrielguilhoto commented on May 25, 2024

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.

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

@gabrielguilhoto - Thanks for your reply.

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

@gabrielguilhoto - After I cloned the git on my desktop.Getting error.
sh required_reason_api_scanner.sh Desktop

sh: required_reason_api_scanner.sh: No such file or directory

from react-native-fs.

WilliamWelsh avatar WilliamWelsh commented on May 25, 2024

@gabrielguilhoto - After I cloned the git on my desktop.Getting error. sh required_reason_api_scanner.sh Desktop

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 ....

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

@WilliamWelsh - Thanks it is working. Is it mandatory to update every library for iOS privacy manifest?

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

I am using react-native-fs:2.20.0.
Can I update this library for the iOS privacy manifest file?

from react-native-fs.

MianSaad705 avatar MianSaad705 commented on May 25, 2024

@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.

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

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.

from react-native-fs.

MianSaad705 avatar MianSaad705 commented on May 25, 2024

@gkasireddy202 Under this API NSPrivacyAccessedAPICategoryFileTimestamp?
Secondly after adding apple approved your app without any warnings?
Kindly mention which reason you add

  • DDA9.1
  • C617.1
  • 3B52.1
  • 0A2A.1

https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api

from react-native-fs.

gkasireddy202 avatar gkasireddy202 commented on May 25, 2024

@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.

NSPrivacyAccessedAPIType
NSPrivacyAccessedAPICategoryFileTimestamp
NSPrivacyAccessedAPITypeReasons

C617.1

from react-native-fs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.