From 6d90f312a7fcc08032aba0938061669074027181 Mon Sep 17 00:00:00 2001 From: sethkfman <10342624+sethkfman@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:34:39 -0600 Subject: [PATCH 1/5] added option to exclude ios files from backup in filesystemstorage patch --- ...dux-persist-filesystem-storage+3.0.0.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 patches/redux-persist-filesystem-storage+3.0.0.patch diff --git a/patches/redux-persist-filesystem-storage+3.0.0.patch b/patches/redux-persist-filesystem-storage+3.0.0.patch new file mode 100644 index 00000000000..31d806ce44a --- /dev/null +++ b/patches/redux-persist-filesystem-storage+3.0.0.patch @@ -0,0 +1,20 @@ +diff --git a/node_modules/redux-persist-filesystem-storage/index.js b/node_modules/redux-persist-filesystem-storage/index.js +index 7198fde..b32b721 100644 +--- a/node_modules/redux-persist-filesystem-storage/index.js ++++ b/node_modules/redux-persist-filesystem-storage/index.js +@@ -41,11 +41,13 @@ const FilesystemStorage = { + onStorageReady = onStorageReadyFactory(options.storagePath); + }, + +- setItem: (key: string, value: string, callback?: (error: ?Error) => void) => ++ setItem: (key: string, value: string, callback?: (error: ?Error) => void) => { ++ if ( !options.backupAllowed )RNFetchBlob.ios?.excludeFromBackupKey(options.storagePath); + RNFetchBlob.fs + .writeFile(pathForKey(key), value, options.encoding) + .then(() => callback && callback()) +- .catch(error => callback && callback(error)), ++ .catch(error => callback && callback(error)); ++ }, + + getItem: onStorageReady( + (key: string, callback?: (error: ?Error, result: ?(Array | string)) => void) => { From 720ce7d2e423581edaaa44f7fe30f4c5dd6e057e Mon Sep 17 00:00:00 2001 From: sethkfman <10342624+sethkfman@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:51:44 -0600 Subject: [PATCH 2/5] updated patch to disable iCLoud backups unless user overrides --- .../redux-persist-filesystem-storage+3.0.0.patch | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/patches/redux-persist-filesystem-storage+3.0.0.patch b/patches/redux-persist-filesystem-storage+3.0.0.patch index 31d806ce44a..38c70452ae6 100644 --- a/patches/redux-persist-filesystem-storage+3.0.0.patch +++ b/patches/redux-persist-filesystem-storage+3.0.0.patch @@ -1,14 +1,23 @@ diff --git a/node_modules/redux-persist-filesystem-storage/index.js b/node_modules/redux-persist-filesystem-storage/index.js -index 7198fde..b32b721 100644 +index 7198fde..1f54f03 100644 --- a/node_modules/redux-persist-filesystem-storage/index.js +++ b/node_modules/redux-persist-filesystem-storage/index.js +@@ -19,7 +19,7 @@ const onStorageReadyFactory = (storagePath: string) => (func: Function) => { + return (...args: Array) => storage.then(() => func(...args)); + }; + +-const defaultStoragePath = `${RNFetchBlob.fs.dirs.DocumentDir}/persistStore`; ++const defaultStoragePath = `${RNFetchBlob.fs.dirs.LibraryDir}/Application Support/persistStore`; + + let onStorageReady = onStorageReadyFactory(defaultStoragePath); + let options = { @@ -41,11 +41,13 @@ const FilesystemStorage = { onStorageReady = onStorageReadyFactory(options.storagePath); }, - setItem: (key: string, value: string, callback?: (error: ?Error) => void) => + setItem: (key: string, value: string, callback?: (error: ?Error) => void) => { -+ if ( !options.backupAllowed )RNFetchBlob.ios?.excludeFromBackupKey(options.storagePath); ++ RNFetchBlob.ios?.excludeFromBackupKey(pathForKey(key)); RNFetchBlob.fs .writeFile(pathForKey(key), value, options.encoding) .then(() => callback && callback()) From b3ccccda3f6dc1fb48bf084b5a3a65649095fd61 Mon Sep 17 00:00:00 2001 From: sethkfman <10342624+sethkfman@users.noreply.github.com> Date: Tue, 26 Apr 2022 10:53:41 -0600 Subject: [PATCH 3/5] updates storage location to be default --- patches/redux-persist-filesystem-storage+3.0.0.patch | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/patches/redux-persist-filesystem-storage+3.0.0.patch b/patches/redux-persist-filesystem-storage+3.0.0.patch index 38c70452ae6..12680dc38a3 100644 --- a/patches/redux-persist-filesystem-storage+3.0.0.patch +++ b/patches/redux-persist-filesystem-storage+3.0.0.patch @@ -1,16 +1,7 @@ diff --git a/node_modules/redux-persist-filesystem-storage/index.js b/node_modules/redux-persist-filesystem-storage/index.js -index 7198fde..1f54f03 100644 +index 7198fde..eb187bd 100644 --- a/node_modules/redux-persist-filesystem-storage/index.js +++ b/node_modules/redux-persist-filesystem-storage/index.js -@@ -19,7 +19,7 @@ const onStorageReadyFactory = (storagePath: string) => (func: Function) => { - return (...args: Array) => storage.then(() => func(...args)); - }; - --const defaultStoragePath = `${RNFetchBlob.fs.dirs.DocumentDir}/persistStore`; -+const defaultStoragePath = `${RNFetchBlob.fs.dirs.LibraryDir}/Application Support/persistStore`; - - let onStorageReady = onStorageReadyFactory(defaultStoragePath); - let options = { @@ -41,11 +41,13 @@ const FilesystemStorage = { onStorageReady = onStorageReadyFactory(options.storagePath); }, From 2d11895f5376956d7b0fdceb5b0439103cd2e9fd Mon Sep 17 00:00:00 2001 From: sethkfman <10342624+sethkfman@users.noreply.github.com> Date: Tue, 26 Apr 2022 11:23:36 -0600 Subject: [PATCH 4/5] updated podfile.lock --- ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index da445d50c67..d3f3d6ed2c4 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -753,7 +753,7 @@ SPEC CHECKSUMS: Branch: bd6c472d6cab03206877ac86c1241327a3f217d1 BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 + DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: de148e8310b8b878db304ceea2fec13f2c02e3a0 FBReactNativeSpec: 6192956c9e346013d5f1809ba049af720b11c6a4 Flipper: b1fddf9a17c32097b2b4c806ad158b2f36bb2692 @@ -766,7 +766,7 @@ SPEC CHECKSUMS: Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: aec2d931adeee48a07bab1ea8bcc8a6bb87dfce4 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 5337263514dd6f09803962437687240c5dc39aa4 + glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31 lottie-react-native: 7ca15c46249b61e3f9ffcf114cb4123e907a2156 From 3d15bb2e0edd8cf58427da20a6cb8b14fe97536c Mon Sep 17 00:00:00 2001 From: sethkfman <10342624+sethkfman@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:58:16 -0600 Subject: [PATCH 5/5] Update Podfile.lock reverted changes, not needed --- ios/Podfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d3f3d6ed2c4..da445d50c67 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -753,7 +753,7 @@ SPEC CHECKSUMS: Branch: bd6c472d6cab03206877ac86c1241327a3f217d1 BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: cde416483dac037923206447da6e1454df403714 + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: de148e8310b8b878db304ceea2fec13f2c02e3a0 FBReactNativeSpec: 6192956c9e346013d5f1809ba049af720b11c6a4 Flipper: b1fddf9a17c32097b2b4c806ad158b2f36bb2692 @@ -766,7 +766,7 @@ SPEC CHECKSUMS: Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: aec2d931adeee48a07bab1ea8bcc8a6bb87dfce4 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 + glog: 5337263514dd6f09803962437687240c5dc39aa4 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 lottie-ios: a50d5c0160425cd4b01b852bb9578963e6d92d31 lottie-react-native: 7ca15c46249b61e3f9ffcf114cb4123e907a2156