createViewManagers(@NonNull ReactApplicationContext reactContext) {
26 | return Collections.emptyList();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/android/src/main/java/com/reactnativevideocachecontrol/VideoCacheListener.java:
--------------------------------------------------------------------------------
1 | package com.reactnativevideocachecontrol;
2 |
3 | import android.util.Log;
4 |
5 | import com.danikula.videocache.CacheListener;
6 | import com.facebook.react.bridge.Callback;
7 |
8 | import java.io.File;
9 |
10 | public class VideoCacheListener implements CacheListener {
11 | private Callback callback;
12 |
13 | VideoCacheListener(Callback callback) {
14 | this.callback = callback;
15 | }
16 |
17 | @Override
18 | public void onCacheAvailable(File file, String url, int percentsAvailable) {
19 | Log.d("VideoCacheControl", ""+file);
20 | Log.d("VideoCacheControl", ""+percentsAvailable);
21 | callback.invoke(file, percentsAvailable);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
3 |
4 | import com.android.build.OutputFile
5 |
6 | /**
7 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
8 | * and bundleReleaseJsAndAssets).
9 | * These basically call `react-native bundle` with the correct arguments during the Android build
10 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
11 | * bundle directly from the development server. Below you can see all the possible configurations
12 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
13 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
14 | *
15 | * project.ext.react = [
16 | * // the name of the generated asset file containing your JS bundle
17 | * bundleAssetName: "index.android.bundle",
18 | *
19 | * // the entry file for bundle generation
20 | * entryFile: "index.android.js",
21 | *
22 | * // https://reactnative.dev/docs/performance#enable-the-ram-format
23 | * bundleCommand: "ram-bundle",
24 | *
25 | * // whether to bundle JS and assets in debug mode
26 | * bundleInDebug: false,
27 | *
28 | * // whether to bundle JS and assets in release mode
29 | * bundleInRelease: true,
30 | *
31 | * // whether to bundle JS and assets in another build variant (if configured).
32 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
33 | * // The configuration property can be in the following formats
34 | * // 'bundleIn${productFlavor}${buildType}'
35 | * // 'bundleIn${buildType}'
36 | * // bundleInFreeDebug: true,
37 | * // bundleInPaidRelease: true,
38 | * // bundleInBeta: true,
39 | *
40 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
41 | * // for VideoCacheControlExample: to disable dev mode in the staging build type (if configured)
42 | * devDisabledInStaging: true,
43 | * // The configuration property can be in the following formats
44 | * // 'devDisabledIn${productFlavor}${buildType}'
45 | * // 'devDisabledIn${buildType}'
46 | *
47 | * // the root of your project, i.e. where "package.json" lives
48 | * root: "../../",
49 | *
50 | * // where to put the JS bundle asset in debug mode
51 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
52 | *
53 | * // where to put the JS bundle asset in release mode
54 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
55 | *
56 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
57 | * // require('./image.png')), in debug mode
58 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
59 | *
60 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
61 | * // require('./image.png')), in release mode
62 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
63 | *
64 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
65 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
66 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
67 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
68 | * // for VideoCacheControlExample, you might want to remove it from here.
69 | * inputExcludes: ["android/**", "ios/**"],
70 | *
71 | * // override which node gets called and with what additional arguments
72 | * nodeExecutableAndArgs: ["node"],
73 | *
74 | * // supply additional arguments to the packager
75 | * extraPackagerArgs: []
76 | * ]
77 | */
78 |
79 | project.ext.react = [
80 | enableHermes: false, // clean and rebuild if changing
81 | entryFile: "index.tsx",
82 | ]
83 |
84 | apply from: "../../node_modules/react-native/react.gradle"
85 |
86 | /**
87 | * Set this to true to create two separate APKs instead of one:
88 | * - An APK that only works on ARM devices
89 | * - An APK that only works on x86 devices
90 | * The advantage is the size of the APK is reduced by about 4MB.
91 | * Upload all the APKs to the Play Store and people will download
92 | * the correct one based on the CPU architecture of their device.
93 | */
94 | def enableSeparateBuildPerCPUArchitecture = false
95 |
96 | /**
97 | * Run Proguard to shrink the Java bytecode in release builds.
98 | */
99 | def enableProguardInReleaseBuilds = false
100 |
101 | /**
102 | * The preferred build flavor of JavaScriptCore.
103 | *
104 | * For VideoCacheControlExample, to use the international variant, you can use:
105 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106 | *
107 | * The international variant includes ICU i18n library and necessary data
108 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109 | * give correct results when using with locales other than en-US. Note that
110 | * this variant is about 6MiB larger per architecture than default.
111 | */
112 | def jscFlavor = 'org.webkit:android-jsc:+'
113 |
114 | /**
115 | * Whether to enable the Hermes VM.
116 | *
117 | * This should be set on project.ext.react and mirrored here. If it is not set
118 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119 | * and the benefits of using Hermes will therefore be sharply reduced.
120 | */
121 | def enableHermes = project.ext.react.get("enableHermes", false);
122 |
123 | android {
124 | compileSdkVersion rootProject.ext.compileSdkVersion
125 |
126 | compileOptions {
127 | sourceCompatibility JavaVersion.VERSION_1_8
128 | targetCompatibility JavaVersion.VERSION_1_8
129 | }
130 |
131 | defaultConfig {
132 | applicationId "com.example.reactnativevideocachecontrol"
133 | minSdkVersion rootProject.ext.minSdkVersion
134 | targetSdkVersion rootProject.ext.targetSdkVersion
135 | versionCode 1
136 | versionName "1.0"
137 | }
138 | splits {
139 | abi {
140 | reset()
141 | enable enableSeparateBuildPerCPUArchitecture
142 | universalApk false // If true, also generate a universal APK
143 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
144 | }
145 | }
146 | signingConfigs {
147 | debug {
148 | storeFile file('debug.keystore')
149 | storePassword 'android'
150 | keyAlias 'androiddebugkey'
151 | keyPassword 'android'
152 | }
153 | }
154 | buildTypes {
155 | debug {
156 | signingConfig signingConfigs.debug
157 | }
158 | release {
159 | // Caution! In production, you need to generate your own keystore file.
160 | // see https://reactnative.dev/docs/signed-apk-android.
161 | signingConfig signingConfigs.debug
162 | minifyEnabled enableProguardInReleaseBuilds
163 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
164 | }
165 | }
166 | // applicationVariants are e.g. debug, release
167 | applicationVariants.all { variant ->
168 | variant.outputs.each { output ->
169 | // For each separate APK per architecture, set a unique version code as described here:
170 | // https://developer.android.com/studio/build/configure-apk-splits.html
171 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
172 | def abi = output.getFilter(OutputFile.ABI)
173 | if (abi != null) { // null for the universal-debug, universal-release variants
174 | output.versionCodeOverride =
175 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
176 | }
177 |
178 | }
179 | }
180 | }
181 |
182 | dependencies {
183 | implementation fileTree(dir: "libs", include: ["*.jar"])
184 | //noinspection GradleDynamicVersion
185 | implementation "com.facebook.react:react-native:+" // From node_modules
186 |
187 |
188 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
189 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
190 | exclude group:'com.facebook.fbjni'
191 | }
192 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
193 | exclude group:'com.facebook.flipper'
194 | exclude group:'com.squareup.okhttp3', module:'okhttp'
195 | }
196 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
197 | exclude group:'com.facebook.flipper'
198 | }
199 |
200 | if (enableHermes) {
201 | def hermesPath = "../../node_modules/hermes-engine/android/";
202 | debugImplementation files(hermesPath + "hermes-debug.aar")
203 | releaseImplementation files(hermesPath + "hermes-release.aar")
204 | } else {
205 | implementation jscFlavor
206 | }
207 |
208 | implementation project(':reactnativevideocachecontrol')
209 | }
210 |
211 | // Run this once to be able to run the application with BUCK
212 | // puts all compile dependencies into folder libs for BUCK to use
213 | task copyDownloadableDepsToLibs(type: Copy) {
214 | from configurations.compile
215 | into 'libs'
216 | }
217 |
218 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
219 |
--------------------------------------------------------------------------------
/example/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/debug.keystore
--------------------------------------------------------------------------------
/example/android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/example/reactnativevideocachecontrol/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example.reactnativevideocachecontrol;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | public class ReactNativeFlipper {
28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29 | if (FlipperUtils.shouldEnableFlipper(context)) {
30 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
32 | client.addPlugin(new ReactFlipperPlugin());
33 | client.addPlugin(new DatabasesFlipperPlugin(context));
34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
35 | client.addPlugin(CrashReporterPlugin.getInstance());
36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
37 | NetworkingModule.setCustomClientBuilder(
38 | new NetworkingModule.CustomClientBuilder() {
39 | @Override
40 | public void apply(OkHttpClient.Builder builder) {
41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
42 | }
43 | });
44 | client.addPlugin(networkFlipperPlugin);
45 | client.start();
46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
47 | // Hence we run if after all native modules have been initialized
48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
49 | if (reactContext == null) {
50 | reactInstanceManager.addReactInstanceEventListener(
51 | new ReactInstanceManager.ReactInstanceEventListener() {
52 | @Override
53 | public void onReactContextInitialized(ReactContext reactContext) {
54 | reactInstanceManager.removeReactInstanceEventListener(this);
55 | reactContext.runOnNativeModulesQueueThread(
56 | new Runnable() {
57 | @Override
58 | public void run() {
59 | client.addPlugin(new FrescoFlipperPlugin());
60 | }
61 | });
62 | }
63 | });
64 | } else {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
13 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/reactnativevideocachecontrol/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.reactnativevideocachecontrol;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript. This is used to schedule
9 | * rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "VideoCacheControlExample";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/reactnativevideocachecontrol/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.example.reactnativevideocachecontrol;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.facebook.react.PackageList;
6 | import com.facebook.react.ReactApplication;
7 | import com.facebook.react.ReactNativeHost;
8 | import com.facebook.react.ReactPackage;
9 | import com.facebook.react.ReactInstanceManager;
10 | import com.facebook.soloader.SoLoader;
11 | import java.lang.reflect.InvocationTargetException;
12 | import java.util.List;
13 | import com.reactnativevideocachecontrol.VideoCacheControlPackage;
14 |
15 | public class MainApplication extends Application implements ReactApplication {
16 |
17 | private final ReactNativeHost mReactNativeHost =
18 | new ReactNativeHost(this) {
19 | @Override
20 | public boolean getUseDeveloperSupport() {
21 | return BuildConfig.DEBUG;
22 | }
23 |
24 | @Override
25 | protected List getPackages() {
26 | @SuppressWarnings("UnnecessaryLocalVariable")
27 | List packages = new PackageList(this).getPackages();
28 | // Packages that cannot be autolinked yet can be added manually here, for VideoCacheControlExample:
29 | // packages.add(new MyReactNativePackage());
30 | packages.add(new VideoCacheControlPackage());
31 | return packages;
32 | }
33 |
34 | @Override
35 | protected String getJSMainModuleName() {
36 | return "index";
37 | }
38 | };
39 |
40 | @Override
41 | public ReactNativeHost getReactNativeHost() {
42 | return mReactNativeHost;
43 | }
44 |
45 | @Override
46 | public void onCreate() {
47 | super.onCreate();
48 | SoLoader.init(this, /* native exopackage */ false);
49 | initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled
50 | }
51 |
52 | /**
53 | * Loads Flipper in React Native templates.
54 | *
55 | * @param context
56 | */
57 | private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
58 | if (BuildConfig.DEBUG) {
59 | try {
60 | /*
61 | We use reflection here to pick up the class that initializes Flipper,
62 | since Flipper library is not available in release mode
63 | */
64 | Class> aClass = Class.forName("com.example.reactnativevideocachecontrol.ReactNativeFlipper");
65 | aClass
66 | .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
67 | .invoke(null, context, reactInstanceManager);
68 | } catch (ClassNotFoundException e) {
69 | e.printStackTrace();
70 | } catch (NoSuchMethodException e) {
71 | e.printStackTrace();
72 | } catch (IllegalAccessException e) {
73 | e.printStackTrace();
74 | } catch (InvocationTargetException e) {
75 | e.printStackTrace();
76 | }
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | VideoCacheControl Example
3 |
4 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext {
5 | minSdkVersion = 16
6 | compileSdkVersion = 31
7 | targetSdkVersion = 31
8 | }
9 | repositories {
10 | google()
11 | mavenCentral()
12 | jcenter()
13 | }
14 | dependencies {
15 | classpath("com.android.tools.build:gradle:3.5.3")
16 |
17 | // NOTE: Do not place your application dependencies here; they belong
18 | // in the individual module build.gradle files
19 | }
20 | }
21 |
22 | allprojects {
23 | repositories {
24 | mavenLocal()
25 | maven {
26 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27 | url("$rootDir/../node_modules/react-native/android")
28 | }
29 | maven {
30 | // Android JSC is installed from npm
31 | url("$rootDir/../node_modules/jsc-android/dist")
32 | }
33 |
34 | google()
35 | mavenCentral()
36 | jcenter()
37 | maven { url 'https://www.jitpack.io' }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useAndroidX=true
21 | android.enableJetifier=true
22 | FLIPPER_VERSION=0.54.0
23 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FeatherJiang/react-native-video-cache-control/0706b214c501f9125b42599e91bf9ad921f9e921/example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # https://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin or MSYS, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=`expr $i + 1`
158 | done
159 | case $i in
160 | 0) set -- ;;
161 | 1) set -- "$args0" ;;
162 | 2) set -- "$args0" "$args1" ;;
163 | 3) set -- "$args0" "$args1" "$args2" ;;
164 | 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=`save "$@"`
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | exec "$JAVACMD" "$@"
184 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 | @rem Execute Gradle
88 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
89 |
90 | :end
91 | @rem End local scope for the variables with windows NT shell
92 | if "%ERRORLEVEL%"=="0" goto mainEnd
93 |
94 | :fail
95 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
96 | rem the _cmd.exe /c_ return code!
97 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
98 | exit /b 1
99 |
100 | :mainEnd
101 | if "%OS%"=="Windows_NT" endlocal
102 |
103 | :omega
104 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'VideoCacheControlExample'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 |
5 | include ':reactnativevideocachecontrol'
6 | project(':reactnativevideocachecontrol').projectDir = new File(rootProject.projectDir, '../../android')
7 |
--------------------------------------------------------------------------------
/example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "VideoCacheControlExample",
3 | "displayName": "VideoCacheControl Example"
4 | }
5 |
--------------------------------------------------------------------------------
/example/babel.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const pak = require('../package.json');
3 |
4 | module.exports = {
5 | presets: ['module:metro-react-native-babel-preset'],
6 | plugins: [
7 | [
8 | 'module-resolver',
9 | {
10 | extensions: ['.tsx', '.ts', '.js', '.json'],
11 | alias: {
12 | [pak.name]: path.join(__dirname, '..', pak.source),
13 | },
14 | },
15 | ],
16 | ],
17 | };
18 |
--------------------------------------------------------------------------------
/example/index.tsx:
--------------------------------------------------------------------------------
1 | import { AppRegistry } from 'react-native';
2 | import App from './src/App';
3 | import { name as appName } from './app.json';
4 |
5 | AppRegistry.registerComponent(appName, () => App);
6 |
--------------------------------------------------------------------------------
/example/ios/File.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // VideoCacheControlExample
4 | //
5 |
6 | import Foundation
7 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | require_relative '../node_modules/react-native/scripts/react_native_pods'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | platform :ios, '10.0'
5 |
6 | target 'VideoCacheControlExample' do
7 | config = use_native_modules!
8 |
9 | use_react_native!(:path => config["reactNativePath"])
10 |
11 | pod 'react-native-video-cache-control', :path => '../..'
12 |
13 | # Enables Flipper.
14 | #
15 | # Note that if you have use_frameworks! enabled, Flipper will not work and
16 | # you should disable these next few lines.
17 | # use_flipper!({ 'Flipper' => '0.80.0' })
18 | # post_install do |installer|
19 | # flipper_post_install(installer)
20 | # end
21 | end
22 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.63.4)
6 | - FBReactNativeSpec (0.63.4):
7 | - Folly (= 2020.01.13.00)
8 | - RCTRequired (= 0.63.4)
9 | - RCTTypeSafety (= 0.63.4)
10 | - React-Core (= 0.63.4)
11 | - React-jsi (= 0.63.4)
12 | - ReactCommon/turbomodule/core (= 0.63.4)
13 | - Folly (2020.01.13.00):
14 | - boost-for-react-native
15 | - DoubleConversion
16 | - Folly/Default (= 2020.01.13.00)
17 | - glog
18 | - Folly/Default (2020.01.13.00):
19 | - boost-for-react-native
20 | - DoubleConversion
21 | - glog
22 | - glog (0.3.5)
23 | - KTVCocoaHTTPServer (1.0.0):
24 | - CocoaAsyncSocket
25 | - KTVHTTPCache (2.0.1):
26 | - KTVCocoaHTTPServer
27 | - RCTRequired (0.63.4)
28 | - RCTTypeSafety (0.63.4):
29 | - FBLazyVector (= 0.63.4)
30 | - Folly (= 2020.01.13.00)
31 | - RCTRequired (= 0.63.4)
32 | - React-Core (= 0.63.4)
33 | - React (0.63.4):
34 | - React-Core (= 0.63.4)
35 | - React-Core/DevSupport (= 0.63.4)
36 | - React-Core/RCTWebSocket (= 0.63.4)
37 | - React-RCTActionSheet (= 0.63.4)
38 | - React-RCTAnimation (= 0.63.4)
39 | - React-RCTBlob (= 0.63.4)
40 | - React-RCTImage (= 0.63.4)
41 | - React-RCTLinking (= 0.63.4)
42 | - React-RCTNetwork (= 0.63.4)
43 | - React-RCTSettings (= 0.63.4)
44 | - React-RCTText (= 0.63.4)
45 | - React-RCTVibration (= 0.63.4)
46 | - React-callinvoker (0.63.4)
47 | - React-Core (0.63.4):
48 | - Folly (= 2020.01.13.00)
49 | - glog
50 | - React-Core/Default (= 0.63.4)
51 | - React-cxxreact (= 0.63.4)
52 | - React-jsi (= 0.63.4)
53 | - React-jsiexecutor (= 0.63.4)
54 | - Yoga
55 | - React-Core/CoreModulesHeaders (0.63.4):
56 | - Folly (= 2020.01.13.00)
57 | - glog
58 | - React-Core/Default
59 | - React-cxxreact (= 0.63.4)
60 | - React-jsi (= 0.63.4)
61 | - React-jsiexecutor (= 0.63.4)
62 | - Yoga
63 | - React-Core/Default (0.63.4):
64 | - Folly (= 2020.01.13.00)
65 | - glog
66 | - React-cxxreact (= 0.63.4)
67 | - React-jsi (= 0.63.4)
68 | - React-jsiexecutor (= 0.63.4)
69 | - Yoga
70 | - React-Core/DevSupport (0.63.4):
71 | - Folly (= 2020.01.13.00)
72 | - glog
73 | - React-Core/Default (= 0.63.4)
74 | - React-Core/RCTWebSocket (= 0.63.4)
75 | - React-cxxreact (= 0.63.4)
76 | - React-jsi (= 0.63.4)
77 | - React-jsiexecutor (= 0.63.4)
78 | - React-jsinspector (= 0.63.4)
79 | - Yoga
80 | - React-Core/RCTActionSheetHeaders (0.63.4):
81 | - Folly (= 2020.01.13.00)
82 | - glog
83 | - React-Core/Default
84 | - React-cxxreact (= 0.63.4)
85 | - React-jsi (= 0.63.4)
86 | - React-jsiexecutor (= 0.63.4)
87 | - Yoga
88 | - React-Core/RCTAnimationHeaders (0.63.4):
89 | - Folly (= 2020.01.13.00)
90 | - glog
91 | - React-Core/Default
92 | - React-cxxreact (= 0.63.4)
93 | - React-jsi (= 0.63.4)
94 | - React-jsiexecutor (= 0.63.4)
95 | - Yoga
96 | - React-Core/RCTBlobHeaders (0.63.4):
97 | - Folly (= 2020.01.13.00)
98 | - glog
99 | - React-Core/Default
100 | - React-cxxreact (= 0.63.4)
101 | - React-jsi (= 0.63.4)
102 | - React-jsiexecutor (= 0.63.4)
103 | - Yoga
104 | - React-Core/RCTImageHeaders (0.63.4):
105 | - Folly (= 2020.01.13.00)
106 | - glog
107 | - React-Core/Default
108 | - React-cxxreact (= 0.63.4)
109 | - React-jsi (= 0.63.4)
110 | - React-jsiexecutor (= 0.63.4)
111 | - Yoga
112 | - React-Core/RCTLinkingHeaders (0.63.4):
113 | - Folly (= 2020.01.13.00)
114 | - glog
115 | - React-Core/Default
116 | - React-cxxreact (= 0.63.4)
117 | - React-jsi (= 0.63.4)
118 | - React-jsiexecutor (= 0.63.4)
119 | - Yoga
120 | - React-Core/RCTNetworkHeaders (0.63.4):
121 | - Folly (= 2020.01.13.00)
122 | - glog
123 | - React-Core/Default
124 | - React-cxxreact (= 0.63.4)
125 | - React-jsi (= 0.63.4)
126 | - React-jsiexecutor (= 0.63.4)
127 | - Yoga
128 | - React-Core/RCTSettingsHeaders (0.63.4):
129 | - Folly (= 2020.01.13.00)
130 | - glog
131 | - React-Core/Default
132 | - React-cxxreact (= 0.63.4)
133 | - React-jsi (= 0.63.4)
134 | - React-jsiexecutor (= 0.63.4)
135 | - Yoga
136 | - React-Core/RCTTextHeaders (0.63.4):
137 | - Folly (= 2020.01.13.00)
138 | - glog
139 | - React-Core/Default
140 | - React-cxxreact (= 0.63.4)
141 | - React-jsi (= 0.63.4)
142 | - React-jsiexecutor (= 0.63.4)
143 | - Yoga
144 | - React-Core/RCTVibrationHeaders (0.63.4):
145 | - Folly (= 2020.01.13.00)
146 | - glog
147 | - React-Core/Default
148 | - React-cxxreact (= 0.63.4)
149 | - React-jsi (= 0.63.4)
150 | - React-jsiexecutor (= 0.63.4)
151 | - Yoga
152 | - React-Core/RCTWebSocket (0.63.4):
153 | - Folly (= 2020.01.13.00)
154 | - glog
155 | - React-Core/Default (= 0.63.4)
156 | - React-cxxreact (= 0.63.4)
157 | - React-jsi (= 0.63.4)
158 | - React-jsiexecutor (= 0.63.4)
159 | - Yoga
160 | - React-CoreModules (0.63.4):
161 | - FBReactNativeSpec (= 0.63.4)
162 | - Folly (= 2020.01.13.00)
163 | - RCTTypeSafety (= 0.63.4)
164 | - React-Core/CoreModulesHeaders (= 0.63.4)
165 | - React-jsi (= 0.63.4)
166 | - React-RCTImage (= 0.63.4)
167 | - ReactCommon/turbomodule/core (= 0.63.4)
168 | - React-cxxreact (0.63.4):
169 | - boost-for-react-native (= 1.63.0)
170 | - DoubleConversion
171 | - Folly (= 2020.01.13.00)
172 | - glog
173 | - React-callinvoker (= 0.63.4)
174 | - React-jsinspector (= 0.63.4)
175 | - React-jsi (0.63.4):
176 | - boost-for-react-native (= 1.63.0)
177 | - DoubleConversion
178 | - Folly (= 2020.01.13.00)
179 | - glog
180 | - React-jsi/Default (= 0.63.4)
181 | - React-jsi/Default (0.63.4):
182 | - boost-for-react-native (= 1.63.0)
183 | - DoubleConversion
184 | - Folly (= 2020.01.13.00)
185 | - glog
186 | - React-jsiexecutor (0.63.4):
187 | - DoubleConversion
188 | - Folly (= 2020.01.13.00)
189 | - glog
190 | - React-cxxreact (= 0.63.4)
191 | - React-jsi (= 0.63.4)
192 | - React-jsinspector (0.63.4)
193 | - react-native-video (5.2.0):
194 | - React-Core
195 | - react-native-video/Video (= 5.2.0)
196 | - react-native-video-cache-control (1.1.2):
197 | - KTVHTTPCache (~> 2.0.0)
198 | - React-Core
199 | - react-native-video/Video (5.2.0):
200 | - React-Core
201 | - React-RCTActionSheet (0.63.4):
202 | - React-Core/RCTActionSheetHeaders (= 0.63.4)
203 | - React-RCTAnimation (0.63.4):
204 | - FBReactNativeSpec (= 0.63.4)
205 | - Folly (= 2020.01.13.00)
206 | - RCTTypeSafety (= 0.63.4)
207 | - React-Core/RCTAnimationHeaders (= 0.63.4)
208 | - React-jsi (= 0.63.4)
209 | - ReactCommon/turbomodule/core (= 0.63.4)
210 | - React-RCTBlob (0.63.4):
211 | - FBReactNativeSpec (= 0.63.4)
212 | - Folly (= 2020.01.13.00)
213 | - React-Core/RCTBlobHeaders (= 0.63.4)
214 | - React-Core/RCTWebSocket (= 0.63.4)
215 | - React-jsi (= 0.63.4)
216 | - React-RCTNetwork (= 0.63.4)
217 | - ReactCommon/turbomodule/core (= 0.63.4)
218 | - React-RCTImage (0.63.4):
219 | - FBReactNativeSpec (= 0.63.4)
220 | - Folly (= 2020.01.13.00)
221 | - RCTTypeSafety (= 0.63.4)
222 | - React-Core/RCTImageHeaders (= 0.63.4)
223 | - React-jsi (= 0.63.4)
224 | - React-RCTNetwork (= 0.63.4)
225 | - ReactCommon/turbomodule/core (= 0.63.4)
226 | - React-RCTLinking (0.63.4):
227 | - FBReactNativeSpec (= 0.63.4)
228 | - React-Core/RCTLinkingHeaders (= 0.63.4)
229 | - React-jsi (= 0.63.4)
230 | - ReactCommon/turbomodule/core (= 0.63.4)
231 | - React-RCTNetwork (0.63.4):
232 | - FBReactNativeSpec (= 0.63.4)
233 | - Folly (= 2020.01.13.00)
234 | - RCTTypeSafety (= 0.63.4)
235 | - React-Core/RCTNetworkHeaders (= 0.63.4)
236 | - React-jsi (= 0.63.4)
237 | - ReactCommon/turbomodule/core (= 0.63.4)
238 | - React-RCTSettings (0.63.4):
239 | - FBReactNativeSpec (= 0.63.4)
240 | - Folly (= 2020.01.13.00)
241 | - RCTTypeSafety (= 0.63.4)
242 | - React-Core/RCTSettingsHeaders (= 0.63.4)
243 | - React-jsi (= 0.63.4)
244 | - ReactCommon/turbomodule/core (= 0.63.4)
245 | - React-RCTText (0.63.4):
246 | - React-Core/RCTTextHeaders (= 0.63.4)
247 | - React-RCTVibration (0.63.4):
248 | - FBReactNativeSpec (= 0.63.4)
249 | - Folly (= 2020.01.13.00)
250 | - React-Core/RCTVibrationHeaders (= 0.63.4)
251 | - React-jsi (= 0.63.4)
252 | - ReactCommon/turbomodule/core (= 0.63.4)
253 | - ReactCommon/turbomodule/core (0.63.4):
254 | - DoubleConversion
255 | - Folly (= 2020.01.13.00)
256 | - glog
257 | - React-callinvoker (= 0.63.4)
258 | - React-Core (= 0.63.4)
259 | - React-cxxreact (= 0.63.4)
260 | - React-jsi (= 0.63.4)
261 | - RNVectorIcons (9.1.0):
262 | - React-Core
263 | - Yoga (1.14.0)
264 |
265 | DEPENDENCIES:
266 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
267 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
268 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
269 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
270 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
271 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
272 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
273 | - React (from `../node_modules/react-native/`)
274 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
275 | - React-Core (from `../node_modules/react-native/`)
276 | - React-Core/DevSupport (from `../node_modules/react-native/`)
277 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
278 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
279 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
280 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
281 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
282 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
283 | - react-native-video (from `../node_modules/react-native-video`)
284 | - react-native-video-cache-control (from `../..`)
285 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
286 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
287 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
288 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
289 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
290 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
291 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
292 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
293 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
294 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
295 | - RNVectorIcons (from `../node_modules/react-native-vector-icons`)
296 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
297 |
298 | SPEC REPOS:
299 | trunk:
300 | - boost-for-react-native
301 | - CocoaAsyncSocket
302 | - KTVCocoaHTTPServer
303 | - KTVHTTPCache
304 |
305 | EXTERNAL SOURCES:
306 | DoubleConversion:
307 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
308 | FBLazyVector:
309 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
310 | FBReactNativeSpec:
311 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
312 | Folly:
313 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
314 | glog:
315 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
316 | RCTRequired:
317 | :path: "../node_modules/react-native/Libraries/RCTRequired"
318 | RCTTypeSafety:
319 | :path: "../node_modules/react-native/Libraries/TypeSafety"
320 | React:
321 | :path: "../node_modules/react-native/"
322 | React-callinvoker:
323 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
324 | React-Core:
325 | :path: "../node_modules/react-native/"
326 | React-CoreModules:
327 | :path: "../node_modules/react-native/React/CoreModules"
328 | React-cxxreact:
329 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
330 | React-jsi:
331 | :path: "../node_modules/react-native/ReactCommon/jsi"
332 | React-jsiexecutor:
333 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
334 | React-jsinspector:
335 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
336 | react-native-video:
337 | :path: "../node_modules/react-native-video"
338 | react-native-video-cache-control:
339 | :path: "../.."
340 | React-RCTActionSheet:
341 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
342 | React-RCTAnimation:
343 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
344 | React-RCTBlob:
345 | :path: "../node_modules/react-native/Libraries/Blob"
346 | React-RCTImage:
347 | :path: "../node_modules/react-native/Libraries/Image"
348 | React-RCTLinking:
349 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
350 | React-RCTNetwork:
351 | :path: "../node_modules/react-native/Libraries/Network"
352 | React-RCTSettings:
353 | :path: "../node_modules/react-native/Libraries/Settings"
354 | React-RCTText:
355 | :path: "../node_modules/react-native/Libraries/Text"
356 | React-RCTVibration:
357 | :path: "../node_modules/react-native/Libraries/Vibration"
358 | ReactCommon:
359 | :path: "../node_modules/react-native/ReactCommon"
360 | RNVectorIcons:
361 | :path: "../node_modules/react-native-vector-icons"
362 | Yoga:
363 | :path: "../node_modules/react-native/ReactCommon/yoga"
364 |
365 | SPEC CHECKSUMS:
366 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
367 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
368 | DoubleConversion: cde416483dac037923206447da6e1454df403714
369 | FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e
370 | FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
371 | Folly: b73c3869541e86821df3c387eb0af5f65addfab4
372 | glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
373 | KTVCocoaHTTPServer: df8d7b861e603ff8037e9b2138aca2563a6b768d
374 | KTVHTTPCache: 588c3eb16f6bd1e6fde1e230dabfb7bd4e490a4d
375 | RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e
376 | RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b
377 | React: b0a957a2c44da4113b0c4c9853d8387f8e64e615
378 | React-callinvoker: c3f44dd3cb195b6aa46621fff95ded79d59043fe
379 | React-Core: d3b2a1ac9a2c13c3bcde712d9281fc1c8a5b315b
380 | React-CoreModules: 0581ff36cb797da0943d424f69e7098e43e9be60
381 | React-cxxreact: c1480d4fda5720086c90df537ee7d285d4c57ac3
382 | React-jsi: a0418934cf48f25b485631deb27c64dc40fb4c31
383 | React-jsiexecutor: 93bd528844ad21dc07aab1c67cb10abae6df6949
384 | React-jsinspector: 58aef7155bc9a9683f5b60b35eccea8722a4f53a
385 | react-native-video: a4c2635d0802f983594b7057e1bce8f442f0ad28
386 | react-native-video-cache-control: 831869063f45800d2802aeb50b4814709cc24ed5
387 | React-RCTActionSheet: 89a0ca9f4a06c1f93c26067af074ccdce0f40336
388 | React-RCTAnimation: 1bde3ecc0c104c55df246eda516e0deb03c4e49b
389 | React-RCTBlob: a97d378b527740cc667e03ebfa183a75231ab0f0
390 | React-RCTImage: c1b1f2d3f43a4a528c8946d6092384b5c880d2f0
391 | React-RCTLinking: 35ae4ab9dc0410d1fcbdce4d7623194a27214fb2
392 | React-RCTNetwork: 29ec2696f8d8cfff7331fac83d3e893c95ef43ae
393 | React-RCTSettings: 60f0691bba2074ef394f95d4c2265ec284e0a46a
394 | React-RCTText: 5c51df3f08cb9dedc6e790161195d12bac06101c
395 | React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d
396 | ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
397 | RNVectorIcons: 7923e585eaeb139b9f4531d25a125a1500162a0b
398 | Yoga: 4bd86afe9883422a7c4028c00e34790f560923d6
399 |
400 | PODFILE CHECKSUM: 5cda8a0dc8acc95371d0b43bda2bb89c004310ae
401 |
402 | COCOAPODS: 1.11.3
403 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* VideoCacheControlExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* VideoCacheControlExampleTests.m */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
12 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
14 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
15 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
16 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
17 | 2DCD954D1E0B4F2C00145EB5 /* VideoCacheControlExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* VideoCacheControlExampleTests.m */; };
18 | 4C39C56BAD484C67AA576FFA /* libPods-VideoCacheControlExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E69C5B9553B26FBA2DF04 /* libPods-VideoCacheControlExample.a */; };
19 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
28 | remoteInfo = VideoCacheControlExample;
29 | };
30 | 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = {
31 | isa = PBXContainerItemProxy;
32 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
33 | proxyType = 1;
34 | remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
35 | remoteInfo = "VideoCacheControlExample-tvOS";
36 | };
37 | /* End PBXContainerItemProxy section */
38 |
39 | /* Begin PBXFileReference section */
40 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
41 | 00E356EE1AD99517003FC87E /* VideoCacheControlExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VideoCacheControlExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | 00E356F21AD99517003FC87E /* VideoCacheControlExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VideoCacheControlExampleTests.m; sourceTree = ""; };
44 | 13B07F961A680F5B00A75B9A /* VideoCacheControlExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VideoCacheControlExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
45 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = VideoCacheControlExample/AppDelegate.h; sourceTree = ""; };
46 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = VideoCacheControlExample/AppDelegate.m; sourceTree = ""; };
47 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = VideoCacheControlExample/Images.xcassets; sourceTree = ""; };
48 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = VideoCacheControlExample/Info.plist; sourceTree = ""; };
49 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = VideoCacheControlExample/main.m; sourceTree = ""; };
50 | 2D02E47B1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "VideoCacheControlExample-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
51 | 2D02E4901E0B4A5D006451C7 /* VideoCacheControlExample-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "VideoCacheControlExample-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 47F7ED3B7971BE374F7B8635 /* Pods-VideoCacheControlExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoCacheControlExample.debug.xcconfig"; path = "Target Support Files/Pods-VideoCacheControlExample/Pods-VideoCacheControlExample.debug.xcconfig"; sourceTree = ""; };
53 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = VideoCacheControlExample/LaunchScreen.storyboard; sourceTree = ""; };
54 | CA3E69C5B9553B26FBA2DF04 /* libPods-VideoCacheControlExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-VideoCacheControlExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
55 | E00ACF0FDA8BF921659E2F9A /* Pods-VideoCacheControlExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoCacheControlExample.release.xcconfig"; path = "Target Support Files/Pods-VideoCacheControlExample/Pods-VideoCacheControlExample.release.xcconfig"; sourceTree = ""; };
56 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
57 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | 4C39C56BAD484C67AA576FFA /* libPods-VideoCacheControlExample.a in Frameworks */,
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | 2D02E4781E0B4A5D006451C7 /* Frameworks */ = {
77 | isa = PBXFrameworksBuildPhase;
78 | buildActionMask = 2147483647;
79 | files = (
80 | );
81 | runOnlyForDeploymentPostprocessing = 0;
82 | };
83 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = {
84 | isa = PBXFrameworksBuildPhase;
85 | buildActionMask = 2147483647;
86 | files = (
87 | );
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | /* End PBXFrameworksBuildPhase section */
91 |
92 | /* Begin PBXGroup section */
93 | 00E356EF1AD99517003FC87E /* VideoCacheControlExampleTests */ = {
94 | isa = PBXGroup;
95 | children = (
96 | 00E356F21AD99517003FC87E /* VideoCacheControlExampleTests.m */,
97 | 00E356F01AD99517003FC87E /* Supporting Files */,
98 | );
99 | path = VideoCacheControlExampleTests;
100 | sourceTree = "";
101 | };
102 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
103 | isa = PBXGroup;
104 | children = (
105 | 00E356F11AD99517003FC87E /* Info.plist */,
106 | );
107 | name = "Supporting Files";
108 | sourceTree = "";
109 | };
110 | 13B07FAE1A68108700A75B9A /* VideoCacheControlExample */ = {
111 | isa = PBXGroup;
112 | children = (
113 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
114 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
115 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
116 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
117 | 13B07FB61A68108700A75B9A /* Info.plist */,
118 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
119 | 13B07FB71A68108700A75B9A /* main.m */,
120 | );
121 | name = VideoCacheControlExample;
122 | sourceTree = "";
123 | };
124 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
125 | isa = PBXGroup;
126 | children = (
127 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
128 | ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
129 | CA3E69C5B9553B26FBA2DF04 /* libPods-VideoCacheControlExample.a */,
130 | );
131 | name = Frameworks;
132 | sourceTree = "";
133 | };
134 | 6B9684456A2045ADE5A6E47E /* Pods */ = {
135 | isa = PBXGroup;
136 | children = (
137 | 47F7ED3B7971BE374F7B8635 /* Pods-VideoCacheControlExample.debug.xcconfig */,
138 | E00ACF0FDA8BF921659E2F9A /* Pods-VideoCacheControlExample.release.xcconfig */,
139 | );
140 | path = Pods;
141 | sourceTree = "";
142 | };
143 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
144 | isa = PBXGroup;
145 | children = (
146 | );
147 | name = Libraries;
148 | sourceTree = "";
149 | };
150 | 83CBB9F61A601CBA00E9B192 = {
151 | isa = PBXGroup;
152 | children = (
153 | 13B07FAE1A68108700A75B9A /* VideoCacheControlExample */,
154 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
155 | 00E356EF1AD99517003FC87E /* VideoCacheControlExampleTests */,
156 | 83CBBA001A601CBA00E9B192 /* Products */,
157 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
158 | 6B9684456A2045ADE5A6E47E /* Pods */,
159 | );
160 | indentWidth = 2;
161 | sourceTree = "";
162 | tabWidth = 2;
163 | usesTabs = 0;
164 | };
165 | 83CBBA001A601CBA00E9B192 /* Products */ = {
166 | isa = PBXGroup;
167 | children = (
168 | 13B07F961A680F5B00A75B9A /* VideoCacheControlExample.app */,
169 | 00E356EE1AD99517003FC87E /* VideoCacheControlExampleTests.xctest */,
170 | 2D02E47B1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS.app */,
171 | 2D02E4901E0B4A5D006451C7 /* VideoCacheControlExample-tvOSTests.xctest */,
172 | );
173 | name = Products;
174 | sourceTree = "";
175 | };
176 | /* End PBXGroup section */
177 |
178 | /* Begin PBXNativeTarget section */
179 | 00E356ED1AD99517003FC87E /* VideoCacheControlExampleTests */ = {
180 | isa = PBXNativeTarget;
181 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "VideoCacheControlExampleTests" */;
182 | buildPhases = (
183 | 00E356EA1AD99517003FC87E /* Sources */,
184 | 00E356EB1AD99517003FC87E /* Frameworks */,
185 | 00E356EC1AD99517003FC87E /* Resources */,
186 | );
187 | buildRules = (
188 | );
189 | dependencies = (
190 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
191 | );
192 | name = VideoCacheControlExampleTests;
193 | productName = VideoCacheControlExampleTests;
194 | productReference = 00E356EE1AD99517003FC87E /* VideoCacheControlExampleTests.xctest */;
195 | productType = "com.apple.product-type.bundle.unit-test";
196 | };
197 | 13B07F861A680F5B00A75B9A /* VideoCacheControlExample */ = {
198 | isa = PBXNativeTarget;
199 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VideoCacheControlExample" */;
200 | buildPhases = (
201 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */,
202 | FD10A7F022414F080027D42C /* Start Packager */,
203 | 13B07F871A680F5B00A75B9A /* Sources */,
204 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
205 | 13B07F8E1A680F5B00A75B9A /* Resources */,
206 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
207 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */,
208 | );
209 | buildRules = (
210 | );
211 | dependencies = (
212 | );
213 | name = VideoCacheControlExample;
214 | productName = VideoCacheControlExample;
215 | productReference = 13B07F961A680F5B00A75B9A /* VideoCacheControlExample.app */;
216 | productType = "com.apple.product-type.application";
217 | };
218 | 2D02E47A1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS */ = {
219 | isa = PBXNativeTarget;
220 | buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "VideoCacheControlExample-tvOS" */;
221 | buildPhases = (
222 | FD10A7F122414F3F0027D42C /* Start Packager */,
223 | 2D02E4771E0B4A5D006451C7 /* Sources */,
224 | 2D02E4781E0B4A5D006451C7 /* Frameworks */,
225 | 2D02E4791E0B4A5D006451C7 /* Resources */,
226 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */,
227 | );
228 | buildRules = (
229 | );
230 | dependencies = (
231 | );
232 | name = "VideoCacheControlExample-tvOS";
233 | productName = "VideoCacheControlExample-tvOS";
234 | productReference = 2D02E47B1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS.app */;
235 | productType = "com.apple.product-type.application";
236 | };
237 | 2D02E48F1E0B4A5D006451C7 /* VideoCacheControlExample-tvOSTests */ = {
238 | isa = PBXNativeTarget;
239 | buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "VideoCacheControlExample-tvOSTests" */;
240 | buildPhases = (
241 | 2D02E48C1E0B4A5D006451C7 /* Sources */,
242 | 2D02E48D1E0B4A5D006451C7 /* Frameworks */,
243 | 2D02E48E1E0B4A5D006451C7 /* Resources */,
244 | );
245 | buildRules = (
246 | );
247 | dependencies = (
248 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */,
249 | );
250 | name = "VideoCacheControlExample-tvOSTests";
251 | productName = "VideoCacheControlExample-tvOSTests";
252 | productReference = 2D02E4901E0B4A5D006451C7 /* VideoCacheControlExample-tvOSTests.xctest */;
253 | productType = "com.apple.product-type.bundle.unit-test";
254 | };
255 | /* End PBXNativeTarget section */
256 |
257 | /* Begin PBXProject section */
258 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
259 | isa = PBXProject;
260 | attributes = {
261 | LastUpgradeCheck = 1130;
262 | TargetAttributes = {
263 | 00E356ED1AD99517003FC87E = {
264 | CreatedOnToolsVersion = 6.2;
265 | TestTargetID = 13B07F861A680F5B00A75B9A;
266 | };
267 | 13B07F861A680F5B00A75B9A = {
268 | DevelopmentTeam = 6T7GW2X66M;
269 | LastSwiftMigration = 1120;
270 | };
271 | 2D02E47A1E0B4A5D006451C7 = {
272 | CreatedOnToolsVersion = 8.2.1;
273 | ProvisioningStyle = Automatic;
274 | };
275 | 2D02E48F1E0B4A5D006451C7 = {
276 | CreatedOnToolsVersion = 8.2.1;
277 | ProvisioningStyle = Automatic;
278 | TestTargetID = 2D02E47A1E0B4A5D006451C7;
279 | };
280 | };
281 | };
282 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VideoCacheControlExample" */;
283 | compatibilityVersion = "Xcode 3.2";
284 | developmentRegion = en;
285 | hasScannedForEncodings = 0;
286 | knownRegions = (
287 | en,
288 | Base,
289 | );
290 | mainGroup = 83CBB9F61A601CBA00E9B192;
291 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
292 | projectDirPath = "";
293 | projectRoot = "";
294 | targets = (
295 | 13B07F861A680F5B00A75B9A /* VideoCacheControlExample */,
296 | 00E356ED1AD99517003FC87E /* VideoCacheControlExampleTests */,
297 | 2D02E47A1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS */,
298 | 2D02E48F1E0B4A5D006451C7 /* VideoCacheControlExample-tvOSTests */,
299 | );
300 | };
301 | /* End PBXProject section */
302 |
303 | /* Begin PBXResourcesBuildPhase section */
304 | 00E356EC1AD99517003FC87E /* Resources */ = {
305 | isa = PBXResourcesBuildPhase;
306 | buildActionMask = 2147483647;
307 | files = (
308 | );
309 | runOnlyForDeploymentPostprocessing = 0;
310 | };
311 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
312 | isa = PBXResourcesBuildPhase;
313 | buildActionMask = 2147483647;
314 | files = (
315 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
316 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
317 | );
318 | runOnlyForDeploymentPostprocessing = 0;
319 | };
320 | 2D02E4791E0B4A5D006451C7 /* Resources */ = {
321 | isa = PBXResourcesBuildPhase;
322 | buildActionMask = 2147483647;
323 | files = (
324 | 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */,
325 | );
326 | runOnlyForDeploymentPostprocessing = 0;
327 | };
328 | 2D02E48E1E0B4A5D006451C7 /* Resources */ = {
329 | isa = PBXResourcesBuildPhase;
330 | buildActionMask = 2147483647;
331 | files = (
332 | );
333 | runOnlyForDeploymentPostprocessing = 0;
334 | };
335 | /* End PBXResourcesBuildPhase section */
336 |
337 | /* Begin PBXShellScriptBuildPhase section */
338 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
339 | isa = PBXShellScriptBuildPhase;
340 | buildActionMask = 2147483647;
341 | files = (
342 | );
343 | inputPaths = (
344 | );
345 | name = "Bundle React Native code and images";
346 | outputPaths = (
347 | );
348 | runOnlyForDeploymentPostprocessing = 0;
349 | shellPath = /bin/sh;
350 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
351 | };
352 | 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
353 | isa = PBXShellScriptBuildPhase;
354 | buildActionMask = 2147483647;
355 | files = (
356 | );
357 | inputPaths = (
358 | );
359 | name = "Bundle React Native Code And Images";
360 | outputPaths = (
361 | );
362 | runOnlyForDeploymentPostprocessing = 0;
363 | shellPath = /bin/sh;
364 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
365 | };
366 | 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = {
367 | isa = PBXShellScriptBuildPhase;
368 | buildActionMask = 2147483647;
369 | files = (
370 | );
371 | inputFileListPaths = (
372 | );
373 | inputPaths = (
374 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
375 | "${PODS_ROOT}/Manifest.lock",
376 | );
377 | name = "[CP] Check Pods Manifest.lock";
378 | outputFileListPaths = (
379 | );
380 | outputPaths = (
381 | "$(DERIVED_FILE_DIR)/Pods-VideoCacheControlExample-checkManifestLockResult.txt",
382 | );
383 | runOnlyForDeploymentPostprocessing = 0;
384 | shellPath = /bin/sh;
385 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
386 | showEnvVarsInLog = 0;
387 | };
388 | C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */ = {
389 | isa = PBXShellScriptBuildPhase;
390 | buildActionMask = 2147483647;
391 | files = (
392 | );
393 | inputPaths = (
394 | "${PODS_ROOT}/Target Support Files/Pods-VideoCacheControlExample/Pods-VideoCacheControlExample-resources.sh",
395 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf",
396 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Entypo.ttf",
397 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf",
398 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Feather.ttf",
399 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf",
400 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Brands.ttf",
401 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf",
402 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Solid.ttf",
403 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf",
404 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Foundation.ttf",
405 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf",
406 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf",
407 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf",
408 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Octicons.ttf",
409 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf",
410 | "${PODS_ROOT}/../../node_modules/react-native-vector-icons/Fonts/Zocial.ttf",
411 | "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
412 | );
413 | name = "[CP] Copy Pods Resources";
414 | outputPaths = (
415 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AntDesign.ttf",
416 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Entypo.ttf",
417 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EvilIcons.ttf",
418 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Feather.ttf",
419 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome.ttf",
420 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Brands.ttf",
421 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Regular.ttf",
422 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/FontAwesome5_Solid.ttf",
423 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Fontisto.ttf",
424 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Foundation.ttf",
425 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Ionicons.ttf",
426 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialCommunityIcons.ttf",
427 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/MaterialIcons.ttf",
428 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Octicons.ttf",
429 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/SimpleLineIcons.ttf",
430 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Zocial.ttf",
431 | "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AccessibilityResources.bundle",
432 | );
433 | runOnlyForDeploymentPostprocessing = 0;
434 | shellPath = /bin/sh;
435 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-VideoCacheControlExample/Pods-VideoCacheControlExample-resources.sh\"\n";
436 | showEnvVarsInLog = 0;
437 | };
438 | FD10A7F022414F080027D42C /* Start Packager */ = {
439 | isa = PBXShellScriptBuildPhase;
440 | buildActionMask = 2147483647;
441 | files = (
442 | );
443 | inputFileListPaths = (
444 | );
445 | inputPaths = (
446 | );
447 | name = "Start Packager";
448 | outputFileListPaths = (
449 | );
450 | outputPaths = (
451 | );
452 | runOnlyForDeploymentPostprocessing = 0;
453 | shellPath = /bin/sh;
454 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
455 | showEnvVarsInLog = 0;
456 | };
457 | FD10A7F122414F3F0027D42C /* Start Packager */ = {
458 | isa = PBXShellScriptBuildPhase;
459 | buildActionMask = 2147483647;
460 | files = (
461 | );
462 | inputFileListPaths = (
463 | );
464 | inputPaths = (
465 | );
466 | name = "Start Packager";
467 | outputFileListPaths = (
468 | );
469 | outputPaths = (
470 | );
471 | runOnlyForDeploymentPostprocessing = 0;
472 | shellPath = /bin/sh;
473 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
474 | showEnvVarsInLog = 0;
475 | };
476 | /* End PBXShellScriptBuildPhase section */
477 |
478 | /* Begin PBXSourcesBuildPhase section */
479 | 00E356EA1AD99517003FC87E /* Sources */ = {
480 | isa = PBXSourcesBuildPhase;
481 | buildActionMask = 2147483647;
482 | files = (
483 | 00E356F31AD99517003FC87E /* VideoCacheControlExampleTests.m in Sources */,
484 | );
485 | runOnlyForDeploymentPostprocessing = 0;
486 | };
487 | 13B07F871A680F5B00A75B9A /* Sources */ = {
488 | isa = PBXSourcesBuildPhase;
489 | buildActionMask = 2147483647;
490 | files = (
491 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
492 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
493 | );
494 | runOnlyForDeploymentPostprocessing = 0;
495 | };
496 | 2D02E4771E0B4A5D006451C7 /* Sources */ = {
497 | isa = PBXSourcesBuildPhase;
498 | buildActionMask = 2147483647;
499 | files = (
500 | 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */,
501 | 2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */,
502 | );
503 | runOnlyForDeploymentPostprocessing = 0;
504 | };
505 | 2D02E48C1E0B4A5D006451C7 /* Sources */ = {
506 | isa = PBXSourcesBuildPhase;
507 | buildActionMask = 2147483647;
508 | files = (
509 | 2DCD954D1E0B4F2C00145EB5 /* VideoCacheControlExampleTests.m in Sources */,
510 | );
511 | runOnlyForDeploymentPostprocessing = 0;
512 | };
513 | /* End PBXSourcesBuildPhase section */
514 |
515 | /* Begin PBXTargetDependency section */
516 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
517 | isa = PBXTargetDependency;
518 | target = 13B07F861A680F5B00A75B9A /* VideoCacheControlExample */;
519 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
520 | };
521 | 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = {
522 | isa = PBXTargetDependency;
523 | target = 2D02E47A1E0B4A5D006451C7 /* VideoCacheControlExample-tvOS */;
524 | targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */;
525 | };
526 | /* End PBXTargetDependency section */
527 |
528 | /* Begin XCBuildConfiguration section */
529 | 00E356F61AD99517003FC87E /* Debug */ = {
530 | isa = XCBuildConfiguration;
531 | buildSettings = {
532 | BUNDLE_LOADER = "$(TEST_HOST)";
533 | GCC_PREPROCESSOR_DEFINITIONS = (
534 | "DEBUG=1",
535 | "$(inherited)",
536 | );
537 | INFOPLIST_FILE = VideoCacheControlExampleTests/Info.plist;
538 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
539 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
540 | OTHER_LDFLAGS = (
541 | "-ObjC",
542 | "-lc++",
543 | "$(inherited)",
544 | );
545 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativevideocachecontrol;
546 | PRODUCT_NAME = "$(TARGET_NAME)";
547 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoCacheControlExample.app/VideoCacheControlExample";
548 | };
549 | name = Debug;
550 | };
551 | 00E356F71AD99517003FC87E /* Release */ = {
552 | isa = XCBuildConfiguration;
553 | buildSettings = {
554 | BUNDLE_LOADER = "$(TEST_HOST)";
555 | COPY_PHASE_STRIP = NO;
556 | INFOPLIST_FILE = VideoCacheControlExampleTests/Info.plist;
557 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
558 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
559 | OTHER_LDFLAGS = (
560 | "-ObjC",
561 | "-lc++",
562 | "$(inherited)",
563 | );
564 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativevideocachecontrol;
565 | PRODUCT_NAME = "$(TARGET_NAME)";
566 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoCacheControlExample.app/VideoCacheControlExample";
567 | };
568 | name = Release;
569 | };
570 | 13B07F941A680F5B00A75B9A /* Debug */ = {
571 | isa = XCBuildConfiguration;
572 | baseConfigurationReference = 47F7ED3B7971BE374F7B8635 /* Pods-VideoCacheControlExample.debug.xcconfig */;
573 | buildSettings = {
574 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
575 | CLANG_ENABLE_MODULES = YES;
576 | CURRENT_PROJECT_VERSION = 1;
577 | DEVELOPMENT_TEAM = 6T7GW2X66M;
578 | ENABLE_BITCODE = NO;
579 | INFOPLIST_FILE = VideoCacheControlExample/Info.plist;
580 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
581 | OTHER_LDFLAGS = (
582 | "$(inherited)",
583 | "-ObjC",
584 | "-lc++",
585 | );
586 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativevideocachecontrol;
587 | PRODUCT_NAME = VideoCacheControlExample;
588 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
589 | SWIFT_VERSION = 5.0;
590 | VERSIONING_SYSTEM = "apple-generic";
591 | };
592 | name = Debug;
593 | };
594 | 13B07F951A680F5B00A75B9A /* Release */ = {
595 | isa = XCBuildConfiguration;
596 | baseConfigurationReference = E00ACF0FDA8BF921659E2F9A /* Pods-VideoCacheControlExample.release.xcconfig */;
597 | buildSettings = {
598 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
599 | CLANG_ENABLE_MODULES = YES;
600 | CURRENT_PROJECT_VERSION = 1;
601 | DEVELOPMENT_TEAM = 6T7GW2X66M;
602 | INFOPLIST_FILE = VideoCacheControlExample/Info.plist;
603 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
604 | OTHER_LDFLAGS = (
605 | "$(inherited)",
606 | "-ObjC",
607 | "-lc++",
608 | );
609 | PRODUCT_BUNDLE_IDENTIFIER = com.example.reactnativevideocachecontrol;
610 | PRODUCT_NAME = VideoCacheControlExample;
611 | SWIFT_VERSION = 5.0;
612 | VERSIONING_SYSTEM = "apple-generic";
613 | };
614 | name = Release;
615 | };
616 | 2D02E4971E0B4A5E006451C7 /* Debug */ = {
617 | isa = XCBuildConfiguration;
618 | buildSettings = {
619 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
620 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
621 | CLANG_ANALYZER_NONNULL = YES;
622 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
623 | CLANG_WARN_INFINITE_RECURSION = YES;
624 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
625 | DEBUG_INFORMATION_FORMAT = dwarf;
626 | ENABLE_TESTABILITY = YES;
627 | GCC_NO_COMMON_BLOCKS = YES;
628 | INFOPLIST_FILE = "VideoCacheControlExample-tvOS/Info.plist";
629 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
630 | OTHER_LDFLAGS = (
631 | "$(inherited)",
632 | "-ObjC",
633 | "-lc++",
634 | );
635 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.VideoCacheControlExample-tvOS";
636 | PRODUCT_NAME = "$(TARGET_NAME)";
637 | SDKROOT = appletvos;
638 | TARGETED_DEVICE_FAMILY = 3;
639 | TVOS_DEPLOYMENT_TARGET = 10.0;
640 | };
641 | name = Debug;
642 | };
643 | 2D02E4981E0B4A5E006451C7 /* Release */ = {
644 | isa = XCBuildConfiguration;
645 | buildSettings = {
646 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
647 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
648 | CLANG_ANALYZER_NONNULL = YES;
649 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
650 | CLANG_WARN_INFINITE_RECURSION = YES;
651 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
652 | COPY_PHASE_STRIP = NO;
653 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
654 | GCC_NO_COMMON_BLOCKS = YES;
655 | INFOPLIST_FILE = "VideoCacheControlExample-tvOS/Info.plist";
656 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
657 | OTHER_LDFLAGS = (
658 | "$(inherited)",
659 | "-ObjC",
660 | "-lc++",
661 | );
662 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.VideoCacheControlExample-tvOS";
663 | PRODUCT_NAME = "$(TARGET_NAME)";
664 | SDKROOT = appletvos;
665 | TARGETED_DEVICE_FAMILY = 3;
666 | TVOS_DEPLOYMENT_TARGET = 10.0;
667 | };
668 | name = Release;
669 | };
670 | 2D02E4991E0B4A5E006451C7 /* Debug */ = {
671 | isa = XCBuildConfiguration;
672 | buildSettings = {
673 | BUNDLE_LOADER = "$(TEST_HOST)";
674 | CLANG_ANALYZER_NONNULL = YES;
675 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
676 | CLANG_WARN_INFINITE_RECURSION = YES;
677 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
678 | DEBUG_INFORMATION_FORMAT = dwarf;
679 | ENABLE_TESTABILITY = YES;
680 | GCC_NO_COMMON_BLOCKS = YES;
681 | INFOPLIST_FILE = "VideoCacheControlExample-tvOSTests/Info.plist";
682 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
683 | OTHER_LDFLAGS = (
684 | "$(inherited)",
685 | "-ObjC",
686 | "-lc++",
687 | );
688 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.VideoCacheControlExample-tvOSTests";
689 | PRODUCT_NAME = "$(TARGET_NAME)";
690 | SDKROOT = appletvos;
691 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoCacheControlExample-tvOS.app/VideoCacheControlExample-tvOS";
692 | TVOS_DEPLOYMENT_TARGET = 10.1;
693 | };
694 | name = Debug;
695 | };
696 | 2D02E49A1E0B4A5E006451C7 /* Release */ = {
697 | isa = XCBuildConfiguration;
698 | buildSettings = {
699 | BUNDLE_LOADER = "$(TEST_HOST)";
700 | CLANG_ANALYZER_NONNULL = YES;
701 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
702 | CLANG_WARN_INFINITE_RECURSION = YES;
703 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
704 | COPY_PHASE_STRIP = NO;
705 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
706 | GCC_NO_COMMON_BLOCKS = YES;
707 | INFOPLIST_FILE = "VideoCacheControlExample-tvOSTests/Info.plist";
708 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
709 | OTHER_LDFLAGS = (
710 | "$(inherited)",
711 | "-ObjC",
712 | "-lc++",
713 | );
714 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.VideoCacheControlExample-tvOSTests";
715 | PRODUCT_NAME = "$(TARGET_NAME)";
716 | SDKROOT = appletvos;
717 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VideoCacheControlExample-tvOS.app/VideoCacheControlExample-tvOS";
718 | TVOS_DEPLOYMENT_TARGET = 10.1;
719 | };
720 | name = Release;
721 | };
722 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
723 | isa = XCBuildConfiguration;
724 | buildSettings = {
725 | ALWAYS_SEARCH_USER_PATHS = NO;
726 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
727 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
728 | CLANG_CXX_LIBRARY = "libc++";
729 | CLANG_ENABLE_MODULES = YES;
730 | CLANG_ENABLE_OBJC_ARC = YES;
731 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
732 | CLANG_WARN_BOOL_CONVERSION = YES;
733 | CLANG_WARN_COMMA = YES;
734 | CLANG_WARN_CONSTANT_CONVERSION = YES;
735 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
736 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
737 | CLANG_WARN_EMPTY_BODY = YES;
738 | CLANG_WARN_ENUM_CONVERSION = YES;
739 | CLANG_WARN_INFINITE_RECURSION = YES;
740 | CLANG_WARN_INT_CONVERSION = YES;
741 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
742 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
743 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
744 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
745 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
746 | CLANG_WARN_STRICT_PROTOTYPES = YES;
747 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
748 | CLANG_WARN_UNREACHABLE_CODE = YES;
749 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
750 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
751 | COPY_PHASE_STRIP = NO;
752 | ENABLE_STRICT_OBJC_MSGSEND = YES;
753 | ENABLE_TESTABILITY = YES;
754 | GCC_C_LANGUAGE_STANDARD = gnu99;
755 | GCC_DYNAMIC_NO_PIC = NO;
756 | GCC_NO_COMMON_BLOCKS = YES;
757 | GCC_OPTIMIZATION_LEVEL = 0;
758 | GCC_PREPROCESSOR_DEFINITIONS = (
759 | "DEBUG=1",
760 | "$(inherited)",
761 | );
762 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
763 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
764 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
765 | GCC_WARN_UNDECLARED_SELECTOR = YES;
766 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
767 | GCC_WARN_UNUSED_FUNCTION = YES;
768 | GCC_WARN_UNUSED_VARIABLE = YES;
769 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
770 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
771 | LIBRARY_SEARCH_PATHS = (
772 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
773 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
774 | "\"$(inherited)\"",
775 | );
776 | MTL_ENABLE_DEBUG_INFO = YES;
777 | ONLY_ACTIVE_ARCH = YES;
778 | SDKROOT = iphoneos;
779 | };
780 | name = Debug;
781 | };
782 | 83CBBA211A601CBA00E9B192 /* Release */ = {
783 | isa = XCBuildConfiguration;
784 | buildSettings = {
785 | ALWAYS_SEARCH_USER_PATHS = NO;
786 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
787 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
788 | CLANG_CXX_LIBRARY = "libc++";
789 | CLANG_ENABLE_MODULES = YES;
790 | CLANG_ENABLE_OBJC_ARC = YES;
791 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
792 | CLANG_WARN_BOOL_CONVERSION = YES;
793 | CLANG_WARN_COMMA = YES;
794 | CLANG_WARN_CONSTANT_CONVERSION = YES;
795 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
796 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
797 | CLANG_WARN_EMPTY_BODY = YES;
798 | CLANG_WARN_ENUM_CONVERSION = YES;
799 | CLANG_WARN_INFINITE_RECURSION = YES;
800 | CLANG_WARN_INT_CONVERSION = YES;
801 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
802 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
803 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
804 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
805 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
806 | CLANG_WARN_STRICT_PROTOTYPES = YES;
807 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
808 | CLANG_WARN_UNREACHABLE_CODE = YES;
809 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
810 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
811 | COPY_PHASE_STRIP = YES;
812 | ENABLE_NS_ASSERTIONS = NO;
813 | ENABLE_STRICT_OBJC_MSGSEND = YES;
814 | GCC_C_LANGUAGE_STANDARD = gnu99;
815 | GCC_NO_COMMON_BLOCKS = YES;
816 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
817 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
818 | GCC_WARN_UNDECLARED_SELECTOR = YES;
819 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
820 | GCC_WARN_UNUSED_FUNCTION = YES;
821 | GCC_WARN_UNUSED_VARIABLE = YES;
822 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
823 | LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
824 | LIBRARY_SEARCH_PATHS = (
825 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
826 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
827 | "\"$(inherited)\"",
828 | );
829 | MTL_ENABLE_DEBUG_INFO = NO;
830 | SDKROOT = iphoneos;
831 | VALIDATE_PRODUCT = YES;
832 | };
833 | name = Release;
834 | };
835 | /* End XCBuildConfiguration section */
836 |
837 | /* Begin XCConfigurationList section */
838 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "VideoCacheControlExampleTests" */ = {
839 | isa = XCConfigurationList;
840 | buildConfigurations = (
841 | 00E356F61AD99517003FC87E /* Debug */,
842 | 00E356F71AD99517003FC87E /* Release */,
843 | );
844 | defaultConfigurationIsVisible = 0;
845 | defaultConfigurationName = Release;
846 | };
847 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "VideoCacheControlExample" */ = {
848 | isa = XCConfigurationList;
849 | buildConfigurations = (
850 | 13B07F941A680F5B00A75B9A /* Debug */,
851 | 13B07F951A680F5B00A75B9A /* Release */,
852 | );
853 | defaultConfigurationIsVisible = 0;
854 | defaultConfigurationName = Release;
855 | };
856 | 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "VideoCacheControlExample-tvOS" */ = {
857 | isa = XCConfigurationList;
858 | buildConfigurations = (
859 | 2D02E4971E0B4A5E006451C7 /* Debug */,
860 | 2D02E4981E0B4A5E006451C7 /* Release */,
861 | );
862 | defaultConfigurationIsVisible = 0;
863 | defaultConfigurationName = Release;
864 | };
865 | 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "VideoCacheControlExample-tvOSTests" */ = {
866 | isa = XCConfigurationList;
867 | buildConfigurations = (
868 | 2D02E4991E0B4A5E006451C7 /* Debug */,
869 | 2D02E49A1E0B4A5E006451C7 /* Release */,
870 | );
871 | defaultConfigurationIsVisible = 0;
872 | defaultConfigurationName = Release;
873 | };
874 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "VideoCacheControlExample" */ = {
875 | isa = XCConfigurationList;
876 | buildConfigurations = (
877 | 83CBBA201A601CBA00E9B192 /* Debug */,
878 | 83CBBA211A601CBA00E9B192 /* Release */,
879 | );
880 | defaultConfigurationIsVisible = 0;
881 | defaultConfigurationName = Release;
882 | };
883 | /* End XCConfigurationList section */
884 | };
885 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
886 | }
887 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample.xcodeproj/xcshareddata/xcschemes/VideoCacheControlExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
81 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (nonatomic, strong) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import "AppDelegate.h"
9 |
10 | #import
11 | #import
12 | #import
13 |
14 | #ifdef FB_SONARKIT_ENABLED
15 | #import
16 | #import
17 | #import
18 | #import
19 | #import
20 | #import
21 | static void InitializeFlipper(UIApplication *application) {
22 | FlipperClient *client = [FlipperClient sharedClient];
23 | SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
24 | [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
25 | [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
26 | [client addPlugin:[FlipperKitReactPlugin new]];
27 | [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
28 | [client start];
29 | }
30 | #endif
31 |
32 | @implementation AppDelegate
33 |
34 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
35 | {
36 | #ifdef FB_SONARKIT_ENABLED
37 | InitializeFlipper(application);
38 | #endif
39 | RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
40 | RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
41 | moduleName:@"VideoCacheControlExample"
42 | initialProperties:nil];
43 |
44 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
45 |
46 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
47 | UIViewController *rootViewController = [UIViewController new];
48 | rootViewController.view = rootView;
49 | self.window.rootViewController = rootViewController;
50 | [self.window makeKeyAndVisible];
51 | return YES;
52 | }
53 |
54 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
55 | {
56 | #if DEBUG
57 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
58 | #else
59 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
60 | #endif
61 | }
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | VideoCacheControl Example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSAllowsArbitraryLoads
30 |
31 | NSExceptionDomains
32 |
33 | localhost
34 |
35 | NSExceptionAllowsInsecureHTTPLoads
36 |
37 |
38 |
39 |
40 | NSLocationWhenInUseUsageDescription
41 |
42 | UILaunchStoryboardName
43 | LaunchScreen
44 | UIRequiredDeviceCapabilities
45 |
46 | armv7
47 |
48 | UISupportedInterfaceOrientations
49 |
50 | UIInterfaceOrientationPortrait
51 | UIInterfaceOrientationLandscapeLeft
52 | UIInterfaceOrientationLandscapeRight
53 |
54 | UIViewControllerBasedStatusBarAppearance
55 |
56 | UIAppFonts
57 |
58 | MaterialIcons.ttf
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
25 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/example/ios/VideoCacheControlExample/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the
5 | * LICENSE file in the root directory of this source tree.
6 | */
7 |
8 | #import
9 |
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/metro.config.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const blacklist = require('metro-config/src/defaults/blacklist');
3 | const escape = require('escape-string-regexp');
4 | const pak = require('../package.json');
5 |
6 | const root = path.resolve(__dirname, '..');
7 |
8 | const modules = Object.keys({
9 | ...pak.peerDependencies,
10 | });
11 |
12 | module.exports = {
13 | projectRoot: __dirname,
14 | watchFolders: [root],
15 |
16 | // We need to make sure that only one version is loaded for peerDependencies
17 | // So we blacklist them at the root, and alias them to the versions in example's node_modules
18 | resolver: {
19 | blacklistRE: blacklist(
20 | modules.map(
21 | (m) =>
22 | new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`)
23 | )
24 | ),
25 |
26 | extraNodeModules: modules.reduce((acc, name) => {
27 | acc[name] = path.join(__dirname, 'node_modules', name);
28 | return acc;
29 | }, {}),
30 | },
31 |
32 | transformer: {
33 | getTransformOptions: async () => ({
34 | transform: {
35 | experimentalImportSupport: false,
36 | inlineRequires: true,
37 | },
38 | }),
39 | },
40 | };
41 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-video-cache-control-example",
3 | "description": "Example app for react-native-video-cache-control",
4 | "version": "0.0.1",
5 | "private": true,
6 | "scripts": {
7 | "android": "react-native run-android",
8 | "ios": "react-native run-ios",
9 | "start": "react-native start"
10 | },
11 | "dependencies": {
12 | "react": "16.13.1",
13 | "react-native": "0.63.4",
14 | "react-native-vector-icons": "^9.1.0",
15 | "react-native-video": "^5.2.0",
16 | "react-native-video-player": "^0.12.0"
17 | },
18 | "devDependencies": {
19 | "@babel/core": "^7.12.10",
20 | "@babel/runtime": "^7.12.5",
21 | "@types/react-native-video-player": "^0.10.3",
22 | "babel-plugin-module-resolver": "^4.0.0",
23 | "metro-react-native-babel-preset": "^0.64.0"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/example/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
3 | import convertToProxyURL, {
4 | clearCache,
5 | isCached,
6 | } from 'react-native-video-cache-control';
7 | import VideoPlayer from 'react-native-video-player';
8 |
9 | const styles = StyleSheet.create({});
10 |
11 | const array = [
12 | 'https://prod-streaming-video-msn-com.akamaized.net/a8c412fa-f696-4ff2-9c76-e8ed9cdffe0f/604a87fc-e7bc-463e-8d56-cde7e661d690.mp4',
13 | ];
14 |
15 | function App() {
16 | const [proxyUrl, setProxyUrl] = useState('');
17 | const [cached, setCached] = useState(false);
18 |
19 | useEffect(() => {
20 | const bool = isCached({
21 | url: array[0],
22 | headers: {
23 | referer: 'https://www.test.com',
24 | },
25 | });
26 | setCached(bool);
27 | const url = convertToProxyURL({
28 | url: array[0],
29 | headers: {
30 | referer: 'https://www.test.com',
31 | },
32 | });
33 | setProxyUrl(url);
34 | }, []);
35 |
36 | return (
37 |
38 |
39 |
47 |
48 |
51 | {
53 | const bool = isCached({
54 | url: array[0],
55 | headers: {
56 | referer: 'https://www.test.com',
57 | },
58 | });
59 | setCached(bool);
60 | }}
61 | >
62 | {`url: ${array[0]}`}
63 | {`proxy: ${proxyUrl}`}
64 | {`cached: ${cached}`}
65 |
66 | {
68 | try {
69 | await clearCache(
70 | 'https://prod-streaming-video-msn-com.akamaized.net/a8c412fa-f696-4ff2-9c76-e8ed9cdffe0f/604a87fc-e7bc-463e-8d56-cde7e661d690.mp4'
71 | );
72 | } catch (error) {
73 | console.log(error);
74 | }
75 | }}
76 | >
77 | 清除缓存
78 |
79 |
80 |
81 | );
82 | }
83 |
84 | export default App;
85 |
--------------------------------------------------------------------------------
/ios/VideoCacheControl.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface VideoCacheControl : NSObject
4 |
5 | @end
6 |
--------------------------------------------------------------------------------
/ios/VideoCacheControl.m:
--------------------------------------------------------------------------------
1 | #import "VideoCacheControl.h"
2 | #import
3 |
4 | @implementation VideoCacheControl
5 |
6 | RCT_EXPORT_MODULE()
7 |
8 | RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(convert:(NSDictionary *)source)
9 | {
10 | if (!KTVHTTPCache.proxyIsRunning) {
11 | NSError *error;
12 | [KTVHTTPCache proxyStart:&error];
13 | if (error) {
14 | return [source objectForKey:@"url"];
15 | }
16 | }
17 | if ([source objectForKey:@"headers"]) {
18 | [KTVHTTPCache downloadSetAdditionalHeaders:[source objectForKey:@"headers"]];
19 | }
20 | NSURL* videoUrl = [NSURL URLWithString:[source objectForKey:@"url"]];
21 | @try {
22 | NSURL *completedCacheFileURL = [KTVHTTPCache cacheCompleteFileURLWithURL:videoUrl];
23 | if (completedCacheFileURL != nil) {
24 | return completedCacheFileURL.absoluteString;
25 | }
26 | }
27 | @catch (NSException *exception) {
28 | }
29 |
30 | return [KTVHTTPCache proxyURLWithOriginalURL:videoUrl].absoluteString;
31 | }
32 |
33 | RCT_EXPORT_METHOD(convertAsync:(NSDictionary *)source
34 | resolver:(RCTPromiseResolveBlock)resolve
35 | rejecter:(RCTPromiseRejectBlock)reject)
36 | {
37 | if (!KTVHTTPCache.proxyIsRunning) {
38 | NSError *error;
39 | [KTVHTTPCache proxyStart:&error];
40 | if (error) {
41 | reject(@"init.error", @"failed to start proxy server", error);
42 | return;
43 | }
44 | }
45 | if ([source objectForKey:@"headers"]) {
46 | [KTVHTTPCache downloadSetAdditionalHeaders:[source objectForKey:@"headers"]];
47 | }
48 | NSURL* videoUrl = [NSURL URLWithString:[source objectForKey:@"url"]];
49 | @try {
50 | NSURL *completedCacheFileURL = [KTVHTTPCache cacheCompleteFileURLWithURL:videoUrl];
51 | if (completedCacheFileURL != nil) {
52 | resolve(completedCacheFileURL.absoluteString);
53 | return;
54 | }
55 | }
56 | @catch (NSException *exception) {
57 | reject(@"cacheComplete.error", @"failed to test cacheComplete error", exception);
58 | }
59 | resolve([KTVHTTPCache proxyURLWithOriginalURL:videoUrl].absoluteString);
60 | }
61 |
62 | RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(isCached:(NSDictionary *)source)
63 | {
64 | NSURL *completeCacheFileURL= [KTVHTTPCache cacheCompleteFileURLWithURL:[NSURL URLWithString:[source objectForKey:@"url"]]];
65 | if (completeCacheFileURL == nil) {
66 | return @NO;
67 | } else {
68 | return @YES;
69 | }
70 | }
71 |
72 | RCT_EXPORT_METHOD(clearCache:(NSURL *)url resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject)
73 | {
74 | @try {
75 | if (url) {
76 | [KTVHTTPCache cacheDeleteCacheWithURL: url];
77 | resolve(@YES);
78 | } else {
79 | [KTVHTTPCache cacheDeleteAllCaches];
80 | resolve(@YES);
81 | }
82 |
83 | }
84 | @catch (NSException *exception) {
85 | reject(@"delete.error", @"failed to delete cache", exception);
86 | }
87 | }
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/ios/VideoCacheControl.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 |
11 | 5E555C0D2413F4C50049A1A2 /* VideoCacheControl.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* VideoCacheControl.m */; };
12 |
13 | /* End PBXBuildFile section */
14 |
15 | /* Begin PBXCopyFilesBuildPhase section */
16 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
17 | isa = PBXCopyFilesBuildPhase;
18 | buildActionMask = 2147483647;
19 | dstPath = "include/$(PRODUCT_NAME)";
20 | dstSubfolderSpec = 16;
21 | files = (
22 | );
23 | runOnlyForDeploymentPostprocessing = 0;
24 | };
25 | /* End PBXCopyFilesBuildPhase section */
26 |
27 | /* Begin PBXFileReference section */
28 | 134814201AA4EA6300B7C361 /* libVideoCacheControl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVideoCacheControl.a; sourceTree = BUILT_PRODUCTS_DIR; };
29 |
30 | B3E7B5881CC2AC0600A0062D /* VideoCacheControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoCacheControl.h; sourceTree = ""; };
31 | B3E7B5891CC2AC0600A0062D /* VideoCacheControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoCacheControl.m; sourceTree = ""; };
32 |
33 | /* End PBXFileReference section */
34 |
35 | /* Begin PBXFrameworksBuildPhase section */
36 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
37 | isa = PBXFrameworksBuildPhase;
38 | buildActionMask = 2147483647;
39 | files = (
40 | );
41 | runOnlyForDeploymentPostprocessing = 0;
42 | };
43 | /* End PBXFrameworksBuildPhase section */
44 |
45 | /* Begin PBXGroup section */
46 | 134814211AA4EA7D00B7C361 /* Products */ = {
47 | isa = PBXGroup;
48 | children = (
49 | 134814201AA4EA6300B7C361 /* libVideoCacheControl.a */,
50 | );
51 | name = Products;
52 | sourceTree = "";
53 | };
54 | 58B511D21A9E6C8500147676 = {
55 | isa = PBXGroup;
56 | children = (
57 |
58 | B3E7B5881CC2AC0600A0062D /* VideoCacheControl.h */,
59 | B3E7B5891CC2AC0600A0062D /* VideoCacheControl.m */,
60 |
61 | 134814211AA4EA7D00B7C361 /* Products */,
62 | );
63 | sourceTree = "";
64 | };
65 | /* End PBXGroup section */
66 |
67 | /* Begin PBXNativeTarget section */
68 | 58B511DA1A9E6C8500147676 /* VideoCacheControl */ = {
69 | isa = PBXNativeTarget;
70 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VideoCacheControl" */;
71 | buildPhases = (
72 | 58B511D71A9E6C8500147676 /* Sources */,
73 | 58B511D81A9E6C8500147676 /* Frameworks */,
74 | 58B511D91A9E6C8500147676 /* CopyFiles */,
75 | );
76 | buildRules = (
77 | );
78 | dependencies = (
79 | );
80 | name = VideoCacheControl;
81 | productName = RCTDataManager;
82 | productReference = 134814201AA4EA6300B7C361 /* libVideoCacheControl.a */;
83 | productType = "com.apple.product-type.library.static";
84 | };
85 | /* End PBXNativeTarget section */
86 |
87 | /* Begin PBXProject section */
88 | 58B511D31A9E6C8500147676 /* Project object */ = {
89 | isa = PBXProject;
90 | attributes = {
91 | LastUpgradeCheck = 0920;
92 | ORGANIZATIONNAME = Facebook;
93 | TargetAttributes = {
94 | 58B511DA1A9E6C8500147676 = {
95 | CreatedOnToolsVersion = 6.1.1;
96 | };
97 | };
98 | };
99 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VideoCacheControl" */;
100 | compatibilityVersion = "Xcode 3.2";
101 | developmentRegion = English;
102 | hasScannedForEncodings = 0;
103 | knownRegions = (
104 | English,
105 | en,
106 | );
107 | mainGroup = 58B511D21A9E6C8500147676;
108 | productRefGroup = 58B511D21A9E6C8500147676;
109 | projectDirPath = "";
110 | projectRoot = "";
111 | targets = (
112 | 58B511DA1A9E6C8500147676 /* VideoCacheControl */,
113 | );
114 | };
115 | /* End PBXProject section */
116 |
117 | /* Begin PBXSourcesBuildPhase section */
118 | 58B511D71A9E6C8500147676 /* Sources */ = {
119 | isa = PBXSourcesBuildPhase;
120 | buildActionMask = 2147483647;
121 | files = (
122 |
123 | B3E7B58A1CC2AC0600A0062D /* VideoCacheControl.m in Sources */,
124 |
125 | );
126 | runOnlyForDeploymentPostprocessing = 0;
127 | };
128 | /* End PBXSourcesBuildPhase section */
129 |
130 | /* Begin XCBuildConfiguration section */
131 | 58B511ED1A9E6C8500147676 /* Debug */ = {
132 | isa = XCBuildConfiguration;
133 | buildSettings = {
134 | ALWAYS_SEARCH_USER_PATHS = NO;
135 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
136 | CLANG_CXX_LIBRARY = "libc++";
137 | CLANG_ENABLE_MODULES = YES;
138 | CLANG_ENABLE_OBJC_ARC = YES;
139 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
140 | CLANG_WARN_BOOL_CONVERSION = YES;
141 | CLANG_WARN_COMMA = YES;
142 | CLANG_WARN_CONSTANT_CONVERSION = YES;
143 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
144 | CLANG_WARN_EMPTY_BODY = YES;
145 | CLANG_WARN_ENUM_CONVERSION = YES;
146 | CLANG_WARN_INFINITE_RECURSION = YES;
147 | CLANG_WARN_INT_CONVERSION = YES;
148 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
149 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
150 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
151 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
152 | CLANG_WARN_STRICT_PROTOTYPES = YES;
153 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
154 | CLANG_WARN_UNREACHABLE_CODE = YES;
155 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
156 | COPY_PHASE_STRIP = NO;
157 | ENABLE_STRICT_OBJC_MSGSEND = YES;
158 | ENABLE_TESTABILITY = YES;
159 | GCC_C_LANGUAGE_STANDARD = gnu99;
160 | GCC_DYNAMIC_NO_PIC = NO;
161 | GCC_NO_COMMON_BLOCKS = YES;
162 | GCC_OPTIMIZATION_LEVEL = 0;
163 | GCC_PREPROCESSOR_DEFINITIONS = (
164 | "DEBUG=1",
165 | "$(inherited)",
166 | );
167 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
168 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
169 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
170 | GCC_WARN_UNDECLARED_SELECTOR = YES;
171 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
172 | GCC_WARN_UNUSED_FUNCTION = YES;
173 | GCC_WARN_UNUSED_VARIABLE = YES;
174 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
175 | MTL_ENABLE_DEBUG_INFO = YES;
176 | ONLY_ACTIVE_ARCH = YES;
177 | SDKROOT = iphoneos;
178 | };
179 | name = Debug;
180 | };
181 | 58B511EE1A9E6C8500147676 /* Release */ = {
182 | isa = XCBuildConfiguration;
183 | buildSettings = {
184 | ALWAYS_SEARCH_USER_PATHS = NO;
185 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
186 | CLANG_CXX_LIBRARY = "libc++";
187 | CLANG_ENABLE_MODULES = YES;
188 | CLANG_ENABLE_OBJC_ARC = YES;
189 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
190 | CLANG_WARN_BOOL_CONVERSION = YES;
191 | CLANG_WARN_COMMA = YES;
192 | CLANG_WARN_CONSTANT_CONVERSION = YES;
193 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
194 | CLANG_WARN_EMPTY_BODY = YES;
195 | CLANG_WARN_ENUM_CONVERSION = YES;
196 | CLANG_WARN_INFINITE_RECURSION = YES;
197 | CLANG_WARN_INT_CONVERSION = YES;
198 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
199 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
200 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
201 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
202 | CLANG_WARN_STRICT_PROTOTYPES = YES;
203 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
204 | CLANG_WARN_UNREACHABLE_CODE = YES;
205 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
206 | COPY_PHASE_STRIP = YES;
207 | ENABLE_NS_ASSERTIONS = NO;
208 | ENABLE_STRICT_OBJC_MSGSEND = YES;
209 | GCC_C_LANGUAGE_STANDARD = gnu99;
210 | GCC_NO_COMMON_BLOCKS = YES;
211 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
212 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
213 | GCC_WARN_UNDECLARED_SELECTOR = YES;
214 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
215 | GCC_WARN_UNUSED_FUNCTION = YES;
216 | GCC_WARN_UNUSED_VARIABLE = YES;
217 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
218 | MTL_ENABLE_DEBUG_INFO = NO;
219 | SDKROOT = iphoneos;
220 | VALIDATE_PRODUCT = YES;
221 | };
222 | name = Release;
223 | };
224 | 58B511F01A9E6C8500147676 /* Debug */ = {
225 | isa = XCBuildConfiguration;
226 | buildSettings = {
227 | HEADER_SEARCH_PATHS = (
228 | "$(inherited)",
229 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
230 | "$(SRCROOT)/../../../React/**",
231 | "$(SRCROOT)/../../react-native/React/**",
232 | );
233 | LIBRARY_SEARCH_PATHS = "$(inherited)";
234 | OTHER_LDFLAGS = "-ObjC";
235 | PRODUCT_NAME = VideoCacheControl;
236 | SKIP_INSTALL = YES;
237 |
238 | };
239 | name = Debug;
240 | };
241 | 58B511F11A9E6C8500147676 /* Release */ = {
242 | isa = XCBuildConfiguration;
243 | buildSettings = {
244 | HEADER_SEARCH_PATHS = (
245 | "$(inherited)",
246 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
247 | "$(SRCROOT)/../../../React/**",
248 | "$(SRCROOT)/../../react-native/React/**",
249 | );
250 | LIBRARY_SEARCH_PATHS = "$(inherited)";
251 | OTHER_LDFLAGS = "-ObjC";
252 | PRODUCT_NAME = VideoCacheControl;
253 | SKIP_INSTALL = YES;
254 |
255 | };
256 | name = Release;
257 | };
258 | /* End XCBuildConfiguration section */
259 |
260 | /* Begin XCConfigurationList section */
261 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "VideoCacheControl" */ = {
262 | isa = XCConfigurationList;
263 | buildConfigurations = (
264 | 58B511ED1A9E6C8500147676 /* Debug */,
265 | 58B511EE1A9E6C8500147676 /* Release */,
266 | );
267 | defaultConfigurationIsVisible = 0;
268 | defaultConfigurationName = Release;
269 | };
270 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "VideoCacheControl" */ = {
271 | isa = XCConfigurationList;
272 | buildConfigurations = (
273 | 58B511F01A9E6C8500147676 /* Debug */,
274 | 58B511F11A9E6C8500147676 /* Release */,
275 | );
276 | defaultConfigurationIsVisible = 0;
277 | defaultConfigurationName = Release;
278 | };
279 | /* End XCConfigurationList section */
280 | };
281 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
282 | }
283 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-video-cache-control",
3 | "version": "1.2.3",
4 | "description": "react native video cache control",
5 | "main": "lib/commonjs/index",
6 | "module": "lib/module/index",
7 | "types": "lib/typescript/index.d.ts",
8 | "react-native": "src/index",
9 | "source": "src/index",
10 | "files": [
11 | "src",
12 | "lib",
13 | "android",
14 | "ios",
15 | "cpp",
16 | "react-native-video-cache-control.podspec",
17 | "!lib/typescript/example",
18 | "!android/build",
19 | "!ios/build",
20 | "!**/__tests__",
21 | "!**/__fixtures__",
22 | "!**/__mocks__"
23 | ],
24 | "scripts": {
25 | "test": "jest",
26 | "typescript": "tsc --noEmit",
27 | "lint": "eslint \"**/*.{js,ts,tsx}\"",
28 | "prepare": "bob build",
29 | "release": "release-it",
30 | "example": "yarn --cwd example",
31 | "pods": "cd example && pod-install --quiet",
32 | "bootstrap": "yarn example && yarn && yarn pods"
33 | },
34 | "keywords": [
35 | "react-native",
36 | "ios",
37 | "android"
38 | ],
39 | "repository": "https://github.com/FeatherJiang/react-native-video-cache-control",
40 | "author": "江夷杰 (https://github.com/FeatherJiang)",
41 | "license": "MIT",
42 | "bugs": {
43 | "url": "https://github.com/FeatherJiang/react-native-video-cache-control/issues"
44 | },
45 | "homepage": "https://github.com/FeatherJiang/react-native-video-cache-control#readme",
46 | "publishConfig": {
47 | "registry": "https://registry.npmjs.org/"
48 | },
49 | "devDependencies": {
50 | "@commitlint/config-conventional": "^11.0.0",
51 | "@react-native-community/eslint-config": "^2.0.0",
52 | "@release-it/conventional-changelog": "^2.0.0",
53 | "@types/jest": "^26.0.0",
54 | "@types/react": "^16.9.19",
55 | "@types/react-native": "0.62.13",
56 | "commitlint": "^11.0.0",
57 | "eslint": "^7.2.0",
58 | "eslint-config-prettier": "^7.0.0",
59 | "eslint-plugin-prettier": "^3.1.3",
60 | "husky": "^6.0.0",
61 | "jest": "^26.0.1",
62 | "pod-install": "^0.1.0",
63 | "prettier": "^2.0.5",
64 | "react": "16.13.1",
65 | "react-native": "0.63.4",
66 | "react-native-builder-bob": "^0.18.2",
67 | "release-it": "^14.2.2",
68 | "typescript": "^4.1.3"
69 | },
70 | "peerDependencies": {
71 | "react": "*",
72 | "react-native": "*"
73 | },
74 | "jest": {
75 | "preset": "react-native",
76 | "modulePathIgnorePatterns": [
77 | "/example/node_modules",
78 | "/lib/"
79 | ]
80 | },
81 | "commitlint": {
82 | "extends": [
83 | "@commitlint/config-conventional"
84 | ]
85 | },
86 | "release-it": {
87 | "git": {
88 | "commitMessage": "chore: release ${version}",
89 | "tagName": "v${version}"
90 | },
91 | "npm": {
92 | "publish": true
93 | },
94 | "github": {
95 | "release": true
96 | },
97 | "plugins": {
98 | "@release-it/conventional-changelog": {
99 | "preset": "angular"
100 | }
101 | }
102 | },
103 | "eslintConfig": {
104 | "root": true,
105 | "extends": [
106 | "@react-native-community",
107 | "prettier"
108 | ],
109 | "rules": {
110 | "prettier/prettier": [
111 | "error",
112 | {
113 | "quoteProps": "consistent",
114 | "singleQuote": true,
115 | "tabWidth": 2,
116 | "trailingComma": "es5",
117 | "useTabs": false
118 | }
119 | ]
120 | }
121 | },
122 | "eslintIgnore": [
123 | "node_modules/",
124 | "lib/"
125 | ],
126 | "prettier": {
127 | "quoteProps": "consistent",
128 | "singleQuote": true,
129 | "tabWidth": 2,
130 | "trailingComma": "es5",
131 | "useTabs": false
132 | },
133 | "react-native-builder-bob": {
134 | "source": "src",
135 | "output": "lib",
136 | "targets": [
137 | "commonjs",
138 | "module",
139 | [
140 | "typescript",
141 | {
142 | "project": "tsconfig.build.json"
143 | }
144 | ]
145 | ]
146 | }
147 | }
148 |
--------------------------------------------------------------------------------
/react-native-video-cache-control.podspec:
--------------------------------------------------------------------------------
1 | require "json"
2 |
3 | package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4 |
5 | Pod::Spec.new do |s|
6 | s.name = "react-native-video-cache-control"
7 | s.version = package["version"]
8 | s.summary = package["description"]
9 | s.homepage = package["homepage"]
10 | s.license = package["license"]
11 | s.authors = package["author"]
12 |
13 | s.platforms = { :ios => "10.0" }
14 | s.source = { :git => "https://github.com/FeatherJiang/react-native-video-cache-control.git", :tag => "#{s.version}" }
15 |
16 | s.source_files = "ios/**/*.{h,m,mm}"
17 |
18 | s.dependency "React-Core"
19 | s.dependency 'KTVHTTPCache', '~> 2.0.0'
20 | end
21 |
--------------------------------------------------------------------------------
/scripts/bootstrap.js:
--------------------------------------------------------------------------------
1 | const os = require('os');
2 | const path = require('path');
3 | const child_process = require('child_process');
4 |
5 | const root = path.resolve(__dirname, '..');
6 | const args = process.argv.slice(2);
7 | const options = {
8 | cwd: process.cwd(),
9 | env: process.env,
10 | stdio: 'inherit',
11 | encoding: 'utf-8',
12 | };
13 |
14 | if (os.type() === 'Windows_NT') {
15 | options.shell = true
16 | }
17 |
18 | let result;
19 |
20 | if (process.cwd() !== root || args.length) {
21 | // We're not in the root of the project, or additional arguments were passed
22 | // In this case, forward the command to `yarn`
23 | result = child_process.spawnSync('yarn', args, options);
24 | } else {
25 | // If `yarn` is run without arguments, perform bootstrap
26 | result = child_process.spawnSync('yarn', ['bootstrap'], options);
27 | }
28 |
29 | process.exitCode = result.status;
30 |
--------------------------------------------------------------------------------
/src/__tests__/index.test.tsx:
--------------------------------------------------------------------------------
1 | it.todo('write a test');
2 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import { NativeModules, Platform } from 'react-native';
2 |
3 | const LINKING_ERROR =
4 | `The package 'react-native-video-cache-control' doesn't seem to be linked. Make sure: \n\n` +
5 | Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
6 | '- You rebuilt the app after installing the package\n' +
7 | '- You are not using Expo managed workflow\n';
8 |
9 | const VideoCacheControl = NativeModules.VideoCacheControl
10 | ? NativeModules.VideoCacheControl
11 | : new Proxy(
12 | {},
13 | {
14 | get() {
15 | throw new Error(LINKING_ERROR);
16 | },
17 | }
18 | );
19 |
20 | type sourceType = {
21 | url: string;
22 | headers?: object;
23 | };
24 |
25 | export default (source: sourceType) => {
26 | return VideoCacheControl.convert(source);
27 | };
28 |
29 | export const convertAsync = (source: sourceType) => {
30 | return VideoCacheControl.convertAsync(source);
31 | };
32 |
33 | export const isCached = (source: sourceType) => {
34 | return VideoCacheControl.isCached(source);
35 | };
36 |
37 | export const registerCacheListener = (
38 | url: string,
39 | callback: (filePath: string, percent: number) => {}
40 | ) => {
41 | return VideoCacheControl.registerCacheListener(url, callback);
42 | };
43 |
44 | export const unregisterCacheListener = (url: string) => {
45 | return VideoCacheControl.unregisterCacheListener(url);
46 | };
47 |
48 | export const clearCache = (url?: string) => {
49 | return VideoCacheControl.clearCache(url);
50 | };
51 |
--------------------------------------------------------------------------------
/tsconfig.build.json:
--------------------------------------------------------------------------------
1 |
2 | {
3 | "extends": "./tsconfig",
4 | "exclude": ["example"]
5 | }
6 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": "./",
4 | "paths": {
5 | "react-native-video-cache-control": ["./src/index"]
6 | },
7 | "allowUnreachableCode": false,
8 | "allowUnusedLabels": false,
9 | "esModuleInterop": true,
10 | "importsNotUsedAsValues": "error",
11 | "forceConsistentCasingInFileNames": true,
12 | "jsx": "react",
13 | "lib": ["esnext"],
14 | "module": "esnext",
15 | "moduleResolution": "node",
16 | "noFallthroughCasesInSwitch": true,
17 | "noImplicitReturns": true,
18 | "noImplicitUseStrict": false,
19 | "noStrictGenericChecks": false,
20 | "noUnusedLocals": true,
21 | "noUnusedParameters": true,
22 | "resolveJsonModule": true,
23 | "skipLibCheck": true,
24 | "strict": true,
25 | "target": "esnext"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------