Fix(ios): restore caching feature (#3341)

* chore: fix build issue

* fix: try to fix save typings

* chore: fix podspec

* fix: update integration guide for ios Caching

* fix: update sample to test the save function

---------

Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
Olivier Bouillet
2023-11-13 21:36:16 +01:00
committed by GitHub
parent da270891fb
commit dfac7a6ed3
11 changed files with 149 additions and 237 deletions

View File

@@ -30,7 +30,7 @@
options.useDirectorySeparation = NO;
#ifdef DEBUG
options.debugOutput = ^(NSString *string) {
RCTLog(@"Video Cache: %@", string);
NSLog(@"VideoCache: debug %@", string);
};
#endif
[self createTemporaryPath];
@@ -48,7 +48,7 @@
error:&error];
#ifdef DEBUG
if (!success || error) {
RCTLog(@"Error while! %@", error);
NSLog(@"VideoCache: Error while! %@", error);
}
#endif
}
@@ -64,7 +64,7 @@
[self.videoCache storeData:data forKey:key locked:NO withCallback:^(SPTPersistentCacheResponse * _Nonnull response) {
if (response.error) {
#ifdef DEBUG
RCTLog(@"An error occured while saving the video into the cache: %@", [response.error localizedDescription]);
NSLog(@"VideoCache: An error occured while saving the video into the cache: %@", [response.error localizedDescription]);
#endif
handler(NO);
return;