Skip to content

Commit

Permalink
Fix(ios): restore caching feature (#3341)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
freeboub and olivier authored Nov 13, 2023
1 parent da27089 commit dfac7a6
Show file tree
Hide file tree
Showing 11 changed files with 144 additions and 232 deletions.
16 changes: 9 additions & 7 deletions docs/pages/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Add `use_frameworks! :linkage => :static` just under `platform :ios` in your ios

[See the example ios project for reference](examples/basic/ios/Podfile#L5)

### Using CocoaPods (required to enable caching)
### Using CocoaPods

Setup your Podfile like it is described in the [react-native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies).

Expand All @@ -50,15 +50,17 @@ Video only:
+ `pod 'react-native-video', :path => '../node_modules/react-native-video/react-native-video.podspec'`
end
```
### Enable custom feature in podfile file

Video with caching ([more info](other/caching.md)):
### Video caching

```diff
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
+ `pod 'react-native-video/VideoCaching', :path => '../node_modules/react-native-video/react-native-video.podspec'`
end
To enable Video caching usage, add following line in your podfile:
([more info here](other/caching.md))

```podfile
# enable Video caching
+ $RNVideoUseVideoCaching=true
```
### Enable custom feature in podfile file

#### Google IMA

Expand Down
4 changes: 3 additions & 1 deletion examples/basic/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ end
target 'videoplayer' do
config = use_native_modules!

use_frameworks! :linkage => :static
# $RNVideoUseGoogleIMA = true
$RNVideoUseVideoCaching = true

# Flags change depending on the env values.
flags = get_default_flags()
Expand All @@ -42,7 +44,7 @@ target 'videoplayer' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand Down
158 changes: 30 additions & 128 deletions examples/basic/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- DVAssetLoaderDelegate (0.3.3)
- FBLazyVector (0.72.5)
- FBReactNativeSpec (0.72.5):
- RCT-Folly (= 2021.07.22.00)
Expand All @@ -10,71 +10,12 @@ PODS:
- React-Core (= 0.72.5)
- React-jsi (= 0.72.5)
- ReactCommon/turbomodule/core (= 0.72.5)
- Flipper (0.182.0):
- Flipper-Folly (~> 2.6)
- Flipper-Boost-iOSX (1.76.0.1.11)
- Flipper-DoubleConversion (3.2.0.1)
- Flipper-Fmt (7.1.7)
- Flipper-Folly (2.6.10):
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt (= 7.1.7)
- Flipper-Glog
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- Flipper-Glog (0.5.0.5)
- Flipper-PeerTalk (0.0.4)
- FlipperKit (0.182.0):
- FlipperKit/Core (= 0.182.0)
- FlipperKit/Core (0.182.0):
- Flipper (~> 0.182.0)
- FlipperKit/CppBridge
- FlipperKit/FBCxxFollyDynamicConvert
- FlipperKit/FBDefines
- FlipperKit/FKPortForwarding
- SocketRocket (~> 0.6.0)
- FlipperKit/CppBridge (0.182.0):
- Flipper (~> 0.182.0)
- FlipperKit/FBCxxFollyDynamicConvert (0.182.0):
- Flipper-Folly (~> 2.6)
- FlipperKit/FBDefines (0.182.0)
- FlipperKit/FKPortForwarding (0.182.0):
- CocoaAsyncSocket (~> 7.6)
- Flipper-PeerTalk (~> 0.0.4)
- FlipperKit/FlipperKitHighlightOverlay (0.182.0)
- FlipperKit/FlipperKitLayoutHelpers (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutTextSearchable
- FlipperKit/FlipperKitLayoutIOSDescriptors (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- YogaKit (~> 1.18)
- FlipperKit/FlipperKitLayoutPlugin (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- FlipperKit/FlipperKitLayoutIOSDescriptors
- FlipperKit/FlipperKitLayoutTextSearchable
- YogaKit (~> 1.18)
- FlipperKit/FlipperKitLayoutTextSearchable (0.182.0)
- FlipperKit/FlipperKitNetworkPlugin (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitReactPlugin (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitUserDefaultsPlugin (0.182.0):
- FlipperKit/Core
- FlipperKit/SKIOSNetworkPlugin (0.182.0):
- FlipperKit/Core
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- hermes-engine (0.72.5):
- hermes-engine/Pre-built (= 0.72.5)
- hermes-engine/Pre-built (0.72.5)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- PromisesObjC (2.2.0)
- PromisesSwift (2.2.0):
- PromisesObjC (= 2.2.0)
Expand Down Expand Up @@ -378,12 +319,14 @@ PODS:
- React-jsinspector (0.72.5)
- React-logger (0.72.5):
- glog
- react-native-video (6.0.0-alpha.8):
- react-native-video (6.0.0-alpha.9):
- React-Core
- react-native-video/Video (= 6.0.0-alpha.8)
- react-native-video/Video (6.0.0-alpha.8):
- react-native-video/Video (= 6.0.0-alpha.9)
- react-native-video/Video (6.0.0-alpha.9):
- DVAssetLoaderDelegate (~> 0.3.1)
- PromisesSwift
- React-Core
- SPTPersistentCache (~> 1.1.0)
- React-NativeModulesApple (0.72.5):
- hermes-engine
- React-callinvoker
Expand Down Expand Up @@ -497,47 +440,24 @@ PODS:
- RNCPicker (1.16.8):
- React-Core
- SocketRocket (0.6.1)
- SPTPersistentCache (1.1.0)
- Yoga (1.14.0)
- YogaKit (1.18.1):
- Yoga (~> 1.14)

DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.182.0)
- Flipper-Boost-iOSX (= 1.76.0.1.11)
- Flipper-DoubleConversion (= 3.2.0.1)
- Flipper-Fmt (= 7.1.7)
- Flipper-Folly (= 2.6.10)
- Flipper-Glog (= 0.5.0.5)
- Flipper-PeerTalk (= 0.0.4)
- FlipperKit (= 0.182.0)
- FlipperKit/Core (= 0.182.0)
- FlipperKit/CppBridge (= 0.182.0)
- FlipperKit/FBCxxFollyDynamicConvert (= 0.182.0)
- FlipperKit/FBDefines (= 0.182.0)
- FlipperKit/FKPortForwarding (= 0.182.0)
- FlipperKit/FlipperKitHighlightOverlay (= 0.182.0)
- FlipperKit/FlipperKitLayoutPlugin (= 0.182.0)
- FlipperKit/FlipperKitLayoutTextSearchable (= 0.182.0)
- FlipperKit/FlipperKitNetworkPlugin (= 0.182.0)
- FlipperKit/FlipperKitReactPlugin (= 0.182.0)
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.182.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.182.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- React (from `../node_modules/react-native/`)
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
- React-Codegen (from `build/generated/ios`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
Expand Down Expand Up @@ -570,22 +490,13 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- CocoaAsyncSocket
- Flipper
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- FlipperKit
- DVAssetLoaderDelegate
- fmt
- libevent
- OpenSSL-Universal
- PromisesObjC
- PromisesSwift
- SocketRocket
- YogaKit
- SPTPersistentCache

EXTERNAL SOURCES:
boost:
Expand Down Expand Up @@ -674,63 +585,54 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
DVAssetLoaderDelegate: 0caec20e4e08b8560b691131539e9180024d4bce
FBLazyVector: 71803c074f6325f10b5ec891c443b6bbabef0ca7
FBReactNativeSpec: 448e08a759d29a96e15725ae532445bf4343567c
Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
FlipperKit: 2efad7007d6745a3f95e4034d547be637f89d3f6
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
hermes-engine: f6cf92a471053245614d9d8097736f6337d5b86c
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef
PromisesSwift: cf9eb58666a43bbe007302226e510b16c1e10959
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: df81ab637d35fac9e6eb94611cfd20f0feb05455
RCTTypeSafety: 4636e4a36c7c2df332bda6d59b19b41c443d4287
React: e0cc5197a804031a6c53fb38483c3485fcb9d6f3
React-callinvoker: 1a635856fe0c3d8b13fccd4ed7e76283b99b0868
React-Codegen: 78d61f981cccc68a771a598f71621cb7db14b04c
React-Core: 252f8e9ca5a4e91af9b9be58670846d662b1c49f
React-CoreModules: f8b9e91fac7bd5d18729ce961a4978c70b5031cc
React-Codegen: 8169df63a7d5731337aad8f3c911a349a55932d3
React-Core: cb6fb2637b5828a0944d4afc1c8678ffff570dcc
React-CoreModules: c39f9ef5cf812b2b266c63364a8969b29d30ba2a
React-cxxreact: 70284b32dcd367439d7dae84d9f72660544181b5
React-debug: ee33d7ba43766d9b10b32561527b57ccfbcb6bd1
React-debug: 93d183299eb4bd7b0bf8cb6e376f608e2a95b64f
React-hermes: 91f97ea2669dc5847e1f26c243aaad913319c570
React-jsi: bd68b7779746014f01ea72d1b738809e132d7f1e
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-video: 86950ad481cec184d7c9420ec3bca0c27904bbcd
React-NativeModulesApple: 797bc6078d566eef3fb3f74127e6e1d2e945a15f
react-native-video: dccff18cfd50cb55ef1ae38ef356bb0f1b0ee5f1
React-NativeModulesApple: 54adc761c7a6fa5f183ca62ad0cb94f4f1cdce4a
React-perflogger: cd8886513f68e1c135a1e79d20575c6489641597
React-RCTActionSheet: 726d2615ca62a77ce3e2c13d87f65379cdc73498
React-RCTAnimation: 8f2716b881c37c64858e4ecee0f58bfa57ff9afd
React-RCTAppDelegate: d4a213f29e81682f6b9c7d22f62a2ccab6d125ae
React-RCTBlob: dfaa933231c3497915bbcc9d98fcff7b6b60582c
React-RCTImage: 747e3d7b656a67470f9c234baedb8d41bbc4e745
React-RCTLinking: 148332b5b0396b280b05534f7d168e560a3bbd5f
React-RCTNetwork: 1d818121a8e678f064de663a6db7aaefc099e53c
React-RCTSettings: 4b95d26ebc88bfd3b6535b2d7904914ff88dbfc2
React-RCTAnimation: 0dcffbaab5acd05334d1d3b157f9275291e3a15b
React-RCTAppDelegate: 48df00f9da9e3019fa0759d1ca900e9f586ef1b1
React-RCTBlob: 5ccfb7a8353fad6edaf9a2456e184ceca8c77150
React-RCTImage: a80cc7170c7cd07b7b109353c605930b24d14bcf
React-RCTLinking: fb1add50b83dc4f3d39526d4ff5127f171cdad86
React-RCTNetwork: 6acdb13f8df6cff487f87ac799a3839ce1d45dac
React-RCTSettings: 0b8b7c2ebb78c540f7b0c0bbe46ab5481023f8a8
React-RCTText: ce4499e4f2d8f85dc4b93ff0559313a016c4f3e2
React-RCTVibration: 45372e61b35e96d16893540958d156675afbeb63
React-rncore: a79d1cb3d6c01b358a8aa0b31ccc04ab5f0dbebc
React-RCTVibration: abb9c73984f4f0052cf50efe0ae6d6f877a74843
React-rncore: 3775c85216adc845837e5420c823a689aeaae630
React-runtimeexecutor: 7e31e2bc6d0ecc83d4ba05eadc98401007abc10c
React-runtimescheduler: cc32add98c45c5df18436a6a52a7e1f6edec102c
React-utils: 7a9918a1ffdd39aba67835d42386f592ea3f8e76
ReactCommon: 91ece8350ebb3dd2be9cef662abd78b6948233c0
React-runtimescheduler: f248b96bdf61c5e078d3fa689adce6894c900659
React-utils: 40cdd9acee23230df5b78bf78a64ce8a2084c2d0
ReactCommon: 4ec7cc40d091eed0a510755619940b6a03cb507b
RNCPicker: 0991c56da7815c0cf946d6f63cf920b25296e5f6
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
SPTPersistentCache: df36ea46762d7cf026502bbb86a8b79d0080dff4
Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 6899e375fcfa0d3a42aa6cb55266008b8f7419cb
PODFILE CHECKSUM: b4ad0158c6631f45dd67f49e7179d58716f9009b

COCOAPODS: 1.12.1
Loading

0 comments on commit dfac7a6

Please sign in to comment.