`|Children content layout|
190 |
191 | ### ShimmerLayoutItemType
192 |
193 | |Name|Type|Description|
194 | |-|-|-|
195 | |width|`number`|Item `width` in DPI|
196 | |height|`number`|Item `height` in DPI|
197 |
198 | ## Contribute
199 |
200 | New features, bug fixes and improvements are welcome! For questions and suggestions use the [issues](https://github.com/douglasjunior/react-native-gradient-shimmer/issues).
201 |
202 |
203 | [](https://paypal.me/douglasnassif)
204 |
205 | ## Star History
206 |
207 | [](https://star-history.com/#douglasjunior/react-native-gradient-shimmer)
208 |
209 | ## License
210 |
211 | ```
212 | The MIT License (MIT)
213 |
214 | Copyright (c) 2023 Douglas Nassif Roma Junior
215 | ```
216 |
217 | See the full [license file](https://github.com/douglasjunior/react-native-gradient-shimmer/blob/master/LICENSE).
218 |
--------------------------------------------------------------------------------
/Sample/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: '@react-native-community',
4 | };
5 |
--------------------------------------------------------------------------------
/Sample/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | ios/.xcode.env.local
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 | *.hprof
33 | .cxx/
34 | *.keystore
35 | !debug.keystore
36 |
37 | # node.js
38 | #
39 | node_modules/
40 | npm-debug.log
41 | yarn-error.log
42 |
43 | # fastlane
44 | #
45 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46 | # screenshots whenever they are needed.
47 | # For more information about the recommended setup visit:
48 | # https://docs.fastlane.tools/best-practices/source-control/
49 |
50 | **/fastlane/report.xml
51 | **/fastlane/Preview.html
52 | **/fastlane/screenshots
53 | **/fastlane/test_output
54 |
55 | # Bundle artifact
56 | *.jsbundle
57 |
58 | # Ruby / CocoaPods
59 | /ios/Pods/
60 | /vendor/bundle/
61 |
62 | # Temporary files created by Metro to check the health of the file watcher
63 | .metro-health-check*
64 |
--------------------------------------------------------------------------------
/Sample/.node-version:
--------------------------------------------------------------------------------
1 | 18
2 |
--------------------------------------------------------------------------------
/Sample/.prettierrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | arrowParens: 'avoid',
3 | bracketSameLine: true,
4 | bracketSpacing: false,
5 | singleQuote: true,
6 | trailingComma: 'all',
7 | };
8 |
--------------------------------------------------------------------------------
/Sample/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/Sample/App.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import {StatusBar} from 'expo-status-bar';
3 | import {
4 | SafeAreaView,
5 | useWindowDimensions,
6 | StyleSheet,
7 | View,
8 | ScrollView,
9 | Text,
10 | } from 'react-native';
11 |
12 | // import LinearGradient from 'react-native-linear-gradient';
13 | import {LinearGradient} from 'expo-linear-gradient';
14 |
15 | import GradientShimmer, {
16 | ShimmerLayout,
17 | ShimmerLayoutContainerType,
18 | createGradientShimmer,
19 | GradientShimmerPropsType,
20 | } from 'react-native-gradient-shimmer';
21 |
22 | const styles = StyleSheet.create({
23 | safeArea: {
24 | flex: 1,
25 | backgroundColor: '#ddd',
26 | },
27 | label: {
28 | fontSize: 18,
29 | fontWeight: 'bold',
30 | marginBottom: 8,
31 | marginTop: 16,
32 | },
33 | scrollViewContainer: {
34 | paddingBottom: 16,
35 | },
36 | });
37 |
38 | /**
39 | * https://easings.net/#easeInOutCirc
40 | */
41 | function easeInOutCirc(value: number): number {
42 | return value < 0.5
43 | ? (1 - Math.sqrt(1 - Math.pow(2 * value, 2))) / 2
44 | : (Math.sqrt(1 - Math.pow(-2 * value + 2, 2)) + 1) / 2;
45 | }
46 |
47 | const CreatedGradientShimmer = createGradientShimmer({
48 | LinearGradientComponent: LinearGradient,
49 | easing: easeInOutCirc,
50 | });
51 |
52 | const AvatarShimmer = () => {
53 | const {width} = useWindowDimensions();
54 | const avatarWidth = 114;
55 | const horizontalMargin = 16;
56 | const distanceBetween = 8;
57 | return (
58 |
62 | Avatar
63 |
64 |
72 |
73 |
78 |
83 |
88 |
89 |
90 |
91 | );
92 | };
93 |
94 | const CardShimmer = ({
95 | label,
96 | width,
97 | ...others
98 | }: {
99 | label: string;
100 | width?: GradientShimmerPropsType['width'];
101 | highlightWidth?: GradientShimmerPropsType['highlightWidth'];
102 | duration?: GradientShimmerPropsType['duration'];
103 | backgroundColor?: GradientShimmerPropsType['backgroundColor'];
104 | highlightColor?: GradientShimmerPropsType['highlightColor'];
105 | }) => {
106 | const {width: windowWidth} = useWindowDimensions();
107 | const horizontalMargin = 16;
108 | const shimmerWidth = width ?? windowWidth - horizontalMargin * 2;
109 | return (
110 |
114 | {label}
115 |
123 |
124 | );
125 | };
126 |
127 | const CardHorizontalShimmer = () => {
128 | const horizontalMargin = 16;
129 |
130 | return (
131 |
135 | Horizontal cards
136 |
140 | {Array.from(new Array(5))
141 | .fill(null)
142 | .map((_, index) => (
143 |
152 | ))}
153 |
154 |
155 | );
156 | };
157 |
158 | const layoutExample: ShimmerLayoutContainerType = {
159 | content: [
160 | {
161 | flexDirection: 'row',
162 | content: [
163 | {
164 | height: 150,
165 | width: 100,
166 | marginRight: 16,
167 | },
168 | {
169 | justifyContent: 'space-between',
170 | content: [
171 | {
172 | height: 40,
173 | width: 250,
174 | },
175 | {
176 | height: 40,
177 | width: 250,
178 | },
179 | {
180 | height: 40,
181 | width: 120,
182 | },
183 | ],
184 | },
185 | ],
186 | },
187 | {
188 | marginTop: 16,
189 | flexDirection: 'row',
190 | columnGap: 16,
191 | content: [
192 | {
193 | width: 100,
194 | height: 100,
195 | },
196 | {
197 | width: 100,
198 | height: 100,
199 | },
200 | {
201 | width: 100,
202 | height: 100,
203 | },
204 | {
205 | width: 100,
206 | height: 100,
207 | },
208 | {
209 | width: 100,
210 | height: 100,
211 | },
212 | ],
213 | },
214 | ],
215 | };
216 |
217 | const ShimmerLayoutExample = () => {
218 | const horizontalMargin = 16;
219 |
220 | return (
221 |
225 | Shimmer layout
226 |
235 |
236 | );
237 | };
238 |
239 | export default function App() {
240 | return (
241 |
242 |
243 |
244 |
245 |
246 | Basic
247 |
252 |
253 |
254 |
255 |
256 |
257 |
258 |
259 |
260 |
261 |
262 |
263 |
264 |
269 |
270 |
271 |
272 |
273 |
274 |
275 | );
276 | }
277 |
--------------------------------------------------------------------------------
/Sample/__tests__/App-test.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import 'react-native';
6 | import React from 'react';
7 | import App from '../App';
8 |
9 | // Note: test renderer must be required after react-native.
10 | import renderer from 'react-test-renderer';
11 |
12 | it('renders correctly', () => {
13 | renderer.create();
14 | });
15 |
--------------------------------------------------------------------------------
/Sample/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 | apply plugin: "com.facebook.react"
3 |
4 | import com.android.build.OutputFile
5 |
6 | /**
7 | * This is the configuration block to customize your React Native Android app.
8 | * By default you don't need to apply any configuration, just uncomment the lines you need.
9 | */
10 | react {
11 | /* Folders */
12 | // The root of your project, i.e. where "package.json" lives. Default is '..'
13 | // root = file("../")
14 | // The folder where the react-native NPM package is. Default is ../node_modules/react-native
15 | // reactNativeDir = file("../node_modules/react-native")
16 | // The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
17 | // codegenDir = file("../node_modules/react-native-codegen")
18 | // The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
19 | // cliFile = file("../node_modules/react-native/cli.js")
20 |
21 | /* Variants */
22 | // The list of variants to that are debuggable. For those we're going to
23 | // skip the bundling of the JS bundle and the assets. By default is just 'debug'.
24 | // If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
25 | // debuggableVariants = ["liteDebug", "prodDebug"]
26 |
27 | /* Bundling */
28 | // A list containing the node command and its flags. Default is just 'node'.
29 | // nodeExecutableAndArgs = ["node"]
30 | //
31 | // The command to run when bundling. By default is 'bundle'
32 | // bundleCommand = "ram-bundle"
33 | //
34 | // The path to the CLI configuration file. Default is empty.
35 | // bundleConfig = file(../rn-cli.config.js)
36 | //
37 | // The name of the generated asset file containing your JS bundle
38 | // bundleAssetName = "MyApplication.android.bundle"
39 | //
40 | // The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
41 | // entryFile = file("../js/MyApplication.android.js")
42 | //
43 | // A list of extra flags to pass to the 'bundle' commands.
44 | // See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
45 | // extraPackagerArgs = []
46 |
47 | /* Hermes Commands */
48 | // The hermes compiler command to run. By default it is 'hermesc'
49 | // hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
50 | //
51 | // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
52 | // hermesFlags = ["-O", "-output-source-map"]
53 | }
54 |
55 | /**
56 | * Set this to true to create four separate APKs instead of one,
57 | * one for each native architecture. This is useful if you don't
58 | * use App Bundles (https://developer.android.com/guide/app-bundle/)
59 | * and want to have separate APKs to upload to the Play Store.
60 | */
61 | def enableSeparateBuildPerCPUArchitecture = false
62 |
63 | /**
64 | * Set this to true to Run Proguard on Release builds to minify the Java bytecode.
65 | */
66 | def enableProguardInReleaseBuilds = false
67 |
68 | /**
69 | * The preferred build flavor of JavaScriptCore (JSC)
70 | *
71 | * For example, to use the international variant, you can use:
72 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
73 | *
74 | * The international variant includes ICU i18n library and necessary data
75 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
76 | * give correct results when using with locales other than en-US. Note that
77 | * this variant is about 6MiB larger per architecture than default.
78 | */
79 | def jscFlavor = 'org.webkit:android-jsc:+'
80 |
81 | /**
82 | * Private function to get the list of Native Architectures you want to build.
83 | * This reads the value from reactNativeArchitectures in your gradle.properties
84 | * file and works together with the --active-arch-only flag of react-native run-android.
85 | */
86 | def reactNativeArchitectures() {
87 | def value = project.getProperties().get("reactNativeArchitectures")
88 | return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
89 | }
90 |
91 | android {
92 | ndkVersion rootProject.ext.ndkVersion
93 |
94 | compileSdkVersion rootProject.ext.compileSdkVersion
95 |
96 | namespace "com.sample"
97 | defaultConfig {
98 | applicationId "com.sample"
99 | minSdkVersion rootProject.ext.minSdkVersion
100 | targetSdkVersion rootProject.ext.targetSdkVersion
101 | versionCode 1
102 | versionName "1.0"
103 | }
104 |
105 | splits {
106 | abi {
107 | reset()
108 | enable enableSeparateBuildPerCPUArchitecture
109 | universalApk false // If true, also generate a universal APK
110 | include (*reactNativeArchitectures())
111 | }
112 | }
113 | signingConfigs {
114 | debug {
115 | storeFile file('debug.keystore')
116 | storePassword 'android'
117 | keyAlias 'androiddebugkey'
118 | keyPassword 'android'
119 | }
120 | }
121 | buildTypes {
122 | debug {
123 | signingConfig signingConfigs.debug
124 | }
125 | release {
126 | // Caution! In production, you need to generate your own keystore file.
127 | // see https://reactnative.dev/docs/signed-apk-android.
128 | signingConfig signingConfigs.debug
129 | minifyEnabled enableProguardInReleaseBuilds
130 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
131 | }
132 | }
133 |
134 | // applicationVariants are e.g. debug, release
135 | applicationVariants.all { variant ->
136 | variant.outputs.each { output ->
137 | // For each separate APK per architecture, set a unique version code as described here:
138 | // https://developer.android.com/studio/build/configure-apk-splits.html
139 | // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
140 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
141 | def abi = output.getFilter(OutputFile.ABI)
142 | if (abi != null) { // null for the universal-debug, universal-release variants
143 | output.versionCodeOverride =
144 | defaultConfig.versionCode * 1000 + versionCodes.get(abi)
145 | }
146 |
147 | }
148 | }
149 | }
150 |
151 | dependencies {
152 | // The version of react-native is set by the React Native Gradle Plugin
153 | implementation("com.facebook.react:react-android")
154 |
155 | implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
156 |
157 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
158 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
159 | exclude group:'com.squareup.okhttp3', module:'okhttp'
160 | }
161 |
162 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
163 | if (hermesEnabled.toBoolean()) {
164 | implementation("com.facebook.react:hermes-android")
165 | } else {
166 | implementation jscFlavor
167 | }
168 | }
169 |
170 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
171 |
--------------------------------------------------------------------------------
/Sample/android/app/debug.keystore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/debug.keystore
--------------------------------------------------------------------------------
/Sample/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 |
--------------------------------------------------------------------------------
/Sample/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sample/android/app/src/debug/java/com/sample/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and 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.sample;
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.sharedpreferences.SharedPreferencesFlipperPlugin;
21 | import com.facebook.react.ReactInstanceEventListener;
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 | /**
28 | * Class responsible of loading Flipper inside your React Native application. This is the debug
29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup.
30 | */
31 | public class ReactNativeFlipper {
32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
33 | if (FlipperUtils.shouldEnableFlipper(context)) {
34 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
35 |
36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
37 | client.addPlugin(new DatabasesFlipperPlugin(context));
38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
39 | client.addPlugin(CrashReporterPlugin.getInstance());
40 |
41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
42 | NetworkingModule.setCustomClientBuilder(
43 | new NetworkingModule.CustomClientBuilder() {
44 | @Override
45 | public void apply(OkHttpClient.Builder builder) {
46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
47 | }
48 | });
49 | client.addPlugin(networkFlipperPlugin);
50 | client.start();
51 |
52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
53 | // Hence we run if after all native modules have been initialized
54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
55 | if (reactContext == null) {
56 | reactInstanceManager.addReactInstanceEventListener(
57 | new ReactInstanceEventListener() {
58 | @Override
59 | public void onReactContextInitialized(ReactContext reactContext) {
60 | reactInstanceManager.removeReactInstanceEventListener(this);
61 | reactContext.runOnNativeModulesQueueThread(
62 | new Runnable() {
63 | @Override
64 | public void run() {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | });
68 | }
69 | });
70 | } else {
71 | client.addPlugin(new FrescoFlipperPlugin());
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/java/com/sample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.sample;
2 | import expo.modules.ReactActivityDelegateWrapper;
3 |
4 | import com.facebook.react.ReactActivity;
5 | import com.facebook.react.ReactActivityDelegate;
6 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
7 | import com.facebook.react.defaults.DefaultReactActivityDelegate;
8 |
9 | public class MainActivity extends ReactActivity {
10 |
11 | /**
12 | * Returns the name of the main component registered from JavaScript. This is used to schedule
13 | * rendering of the component.
14 | */
15 | @Override
16 | protected String getMainComponentName() {
17 | return "Sample";
18 | }
19 |
20 | /**
21 | * Returns the instance of the {@link ReactActivityDelegate}. Here we use a util class {@link
22 | * DefaultReactActivityDelegate} which allows you to easily enable Fabric and Concurrent React
23 | * (aka React 18) with two boolean flags.
24 | */
25 | @Override
26 | protected ReactActivityDelegate createReactActivityDelegate() {
27 | return new ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, new DefaultReactActivityDelegate(
28 | this,
29 | getMainComponentName(),
30 | // If you opted-in for the New Architecture, we enable the Fabric Renderer.
31 | DefaultNewArchitectureEntryPoint.getFabricEnabled(), // fabricEnabled
32 | // If you opted-in for the New Architecture, we enable Concurrent React (i.e. React 18).
33 | DefaultNewArchitectureEntryPoint.getConcurrentReactEnabled() // concurrentRootEnabled
34 | ));
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/java/com/sample/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.sample;
2 | import android.content.res.Configuration;
3 | import expo.modules.ApplicationLifecycleDispatcher;
4 | import expo.modules.ReactNativeHostWrapper;
5 |
6 | import android.app.Application;
7 | import com.facebook.react.PackageList;
8 | import com.facebook.react.ReactApplication;
9 | import com.facebook.react.ReactNativeHost;
10 | import com.facebook.react.ReactPackage;
11 | import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
12 | import com.facebook.react.defaults.DefaultReactNativeHost;
13 | import com.facebook.soloader.SoLoader;
14 | import java.util.List;
15 |
16 | public class MainApplication extends Application implements ReactApplication {
17 |
18 | private final ReactNativeHost mReactNativeHost =
19 | new ReactNativeHostWrapper(this, new DefaultReactNativeHost(this) {
20 | @Override
21 | public boolean getUseDeveloperSupport() {
22 | return BuildConfig.DEBUG;
23 | }
24 |
25 | @Override
26 | protected List getPackages() {
27 | @SuppressWarnings("UnnecessaryLocalVariable")
28 | List packages = new PackageList(this).getPackages();
29 | // Packages that cannot be autolinked yet can be added manually here, for example:
30 | // packages.add(new MyReactNativePackage());
31 | return packages;
32 | }
33 |
34 | @Override
35 | protected String getJSMainModuleName() {
36 | return "index";
37 | }
38 |
39 | @Override
40 | protected boolean isNewArchEnabled() {
41 | return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
42 | }
43 |
44 | @Override
45 | protected Boolean isHermesEnabled() {
46 | return BuildConfig.IS_HERMES_ENABLED;
47 | }
48 | });
49 |
50 | @Override
51 | public ReactNativeHost getReactNativeHost() {
52 | return mReactNativeHost;
53 | }
54 |
55 | @Override
56 | public void onCreate() {
57 | super.onCreate();
58 | SoLoader.init(this, /* native exopackage */ false);
59 | if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
60 | // If you opted-in for the New Architecture, we load the native entry point for this app.
61 | DefaultNewArchitectureEntryPoint.load();
62 | }
63 | ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
64 | ApplicationLifecycleDispatcher.onApplicationCreate(this);
65 | }
66 |
67 | @Override
68 | public void onConfigurationChanged(Configuration newConfig) {
69 | super.onConfigurationChanged(newConfig);
70 | ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig);
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/drawable/rn_edit_text_material.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
21 |
22 |
23 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Sample
3 |
4 |
--------------------------------------------------------------------------------
/Sample/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Sample/android/app/src/release/java/com/sample/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Meta Platforms, Inc. and 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.sample;
8 |
9 | import android.content.Context;
10 | import com.facebook.react.ReactInstanceManager;
11 |
12 | /**
13 | * Class responsible of loading Flipper inside your React Native application. This is the release
14 | * flavor of it so it's empty as we don't want to load Flipper.
15 | */
16 | public class ReactNativeFlipper {
17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18 | // Do nothing as we don't want to initialize Flipper on Release.
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Sample/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 | buildToolsVersion = "33.0.0"
6 | minSdkVersion = 21
7 | compileSdkVersion = 33
8 | targetSdkVersion = 33
9 |
10 | // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
11 | ndkVersion = "23.1.7779620"
12 | }
13 | repositories {
14 | google()
15 | mavenCentral()
16 | }
17 | dependencies {
18 | classpath("com.android.tools.build:gradle:7.3.1")
19 | classpath("com.facebook.react:react-native-gradle-plugin")
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Sample/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: -Xmx512m -XX:MaxMetaspaceSize=256m
13 | org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m
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 | # AndroidX package structure to make it clearer which packages are bundled with the
21 | # Android operating system, and which are packaged with your app's APK
22 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
23 | android.useAndroidX=true
24 | # Automatically convert third-party libraries to use AndroidX
25 | android.enableJetifier=true
26 |
27 | # Version of flipper SDK to use with React Native
28 | FLIPPER_VERSION=0.125.0
29 |
30 | # Use this property to specify which architecture you want to build.
31 | # You can also override it from the CLI using
32 | # ./gradlew -PreactNativeArchitectures=x86_64
33 | reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
34 |
35 | # Use this property to enable support to the new architecture.
36 | # This will allow you to use TurboModules and the Fabric render in
37 | # your application. You should enable this flag either if you want
38 | # to write custom TurboModules/Fabric components OR use libraries that
39 | # are providing them.
40 | newArchEnabled=false
41 |
42 | # Use this property to enable or disable the Hermes JS engine.
43 | # If set to false, you will be using JSC instead.
44 | hermesEnabled=true
45 |
--------------------------------------------------------------------------------
/Sample/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/Sample/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Sample/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/Sample/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Copyright © 2015-2021 the original 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 POSIX generated by Gradle.
22 | #
23 | # Important for running:
24 | #
25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26 | # noncompliant, but you have some other compliant shell such as ksh or
27 | # bash, then to run this script, type that shell name before the whole
28 | # command line, like:
29 | #
30 | # ksh Gradle
31 | #
32 | # Busybox and similar reduced shells will NOT work, because this script
33 | # requires all of these POSIX shell features:
34 | # * functions;
35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37 | # * compound commands having a testable exit status, especially «case»;
38 | # * various built-in commands including «command», «set», and «ulimit».
39 | #
40 | # Important for patching:
41 | #
42 | # (2) This script targets any POSIX shell, so it avoids extensions provided
43 | # by Bash, Ksh, etc; in particular arrays are avoided.
44 | #
45 | # The "traditional" practice of packing multiple parameters into a
46 | # space-separated string is a well documented source of bugs and security
47 | # problems, so this is (mostly) avoided, by progressively accumulating
48 | # options in "$@", and eventually passing that to Java.
49 | #
50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52 | # see the in-line comments for details.
53 | #
54 | # There are tweaks for specific operating systems such as AIX, CygWin,
55 | # Darwin, MinGW, and NonStop.
56 | #
57 | # (3) This script is generated from the Groovy template
58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59 | # within the Gradle project.
60 | #
61 | # You can find Gradle at https://github.com/gradle/gradle/.
62 | #
63 | ##############################################################################
64 |
65 | # Attempt to set APP_HOME
66 |
67 | # Resolve links: $0 may be a link
68 | app_path=$0
69 |
70 | # Need this for daisy-chained symlinks.
71 | while
72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73 | [ -h "$app_path" ]
74 | do
75 | ls=$( ls -ld "$app_path" )
76 | link=${ls#*' -> '}
77 | case $link in #(
78 | /*) app_path=$link ;; #(
79 | *) app_path=$APP_HOME$link ;;
80 | esac
81 | done
82 |
83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84 |
85 | APP_NAME="Gradle"
86 | APP_BASE_NAME=${0##*/}
87 |
88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90 |
91 | # Use the maximum available, or set MAX_FD != -1 to use that value.
92 | MAX_FD=maximum
93 |
94 | warn () {
95 | echo "$*"
96 | } >&2
97 |
98 | die () {
99 | echo
100 | echo "$*"
101 | echo
102 | exit 1
103 | } >&2
104 |
105 | # OS specific support (must be 'true' or 'false').
106 | cygwin=false
107 | msys=false
108 | darwin=false
109 | nonstop=false
110 | case "$( uname )" in #(
111 | CYGWIN* ) cygwin=true ;; #(
112 | Darwin* ) darwin=true ;; #(
113 | MSYS* | MINGW* ) msys=true ;; #(
114 | NONSTOP* ) nonstop=true ;;
115 | esac
116 |
117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118 |
119 |
120 | # Determine the Java command to use to start the JVM.
121 | if [ -n "$JAVA_HOME" ] ; then
122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123 | # IBM's JDK on AIX uses strange locations for the executables
124 | JAVACMD=$JAVA_HOME/jre/sh/java
125 | else
126 | JAVACMD=$JAVA_HOME/bin/java
127 | fi
128 | if [ ! -x "$JAVACMD" ] ; then
129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130 |
131 | Please set the JAVA_HOME variable in your environment to match the
132 | location of your Java installation."
133 | fi
134 | else
135 | JAVACMD=java
136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137 |
138 | Please set the JAVA_HOME variable in your environment to match the
139 | location of your Java installation."
140 | fi
141 |
142 | # Increase the maximum file descriptors if we can.
143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144 | case $MAX_FD in #(
145 | max*)
146 | MAX_FD=$( ulimit -H -n ) ||
147 | warn "Could not query maximum file descriptor limit"
148 | esac
149 | case $MAX_FD in #(
150 | '' | soft) :;; #(
151 | *)
152 | ulimit -n "$MAX_FD" ||
153 | warn "Could not set maximum file descriptor limit to $MAX_FD"
154 | esac
155 | fi
156 |
157 | # Collect all arguments for the java command, stacking in reverse order:
158 | # * args from the command line
159 | # * the main class name
160 | # * -classpath
161 | # * -D...appname settings
162 | # * --module-path (only if needed)
163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164 |
165 | # For Cygwin or MSYS, switch paths to Windows format before running java
166 | if "$cygwin" || "$msys" ; then
167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169 |
170 | JAVACMD=$( cygpath --unix "$JAVACMD" )
171 |
172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
173 | for arg do
174 | if
175 | case $arg in #(
176 | -*) false ;; # don't mess with options #(
177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178 | [ -e "$t" ] ;; #(
179 | *) false ;;
180 | esac
181 | then
182 | arg=$( cygpath --path --ignore --mixed "$arg" )
183 | fi
184 | # Roll the args list around exactly as many times as the number of
185 | # args, so each arg winds up back in the position where it started, but
186 | # possibly modified.
187 | #
188 | # NB: a `for` loop captures its iteration list before it begins, so
189 | # changing the positional parameters here affects neither the number of
190 | # iterations, nor the values presented in `arg`.
191 | shift # remove old arg
192 | set -- "$@" "$arg" # push replacement arg
193 | done
194 | fi
195 |
196 | # Collect all arguments for the java command;
197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198 | # shell script including quotes and variable substitutions, so put them in
199 | # double quotes to make sure that they get re-expanded; and
200 | # * put everything else in single quotes, so that it's not re-expanded.
201 |
202 | set -- \
203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \
204 | -classpath "$CLASSPATH" \
205 | org.gradle.wrapper.GradleWrapperMain \
206 | "$@"
207 |
208 | # Use "xargs" to parse quoted args.
209 | #
210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211 | #
212 | # In Bash we could simply go:
213 | #
214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215 | # set -- "${ARGS[@]}" "$@"
216 | #
217 | # but POSIX shell has neither arrays nor command substitution, so instead we
218 | # post-process each arg (as a line of input to sed) to backslash-escape any
219 | # character that might be a shell metacharacter, then use eval to reverse
220 | # that process (while maintaining the separation between arguments), and wrap
221 | # the whole thing up as a single "set" statement.
222 | #
223 | # This will of course break if any of these variables contains a newline or
224 | # an unmatched quote.
225 | #
226 |
227 | eval "set -- $(
228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229 | xargs -n1 |
230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231 | tr '\n' ' '
232 | )" '"$@"'
233 |
234 | exec "$JAVACMD" "$@"
235 |
--------------------------------------------------------------------------------
/Sample/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 https://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 execute
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 execute
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 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/Sample/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'Sample'
2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 | include ':app'
4 | includeBuild('../node_modules/react-native-gradle-plugin')
5 |
6 | apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
7 | useExpoModules()
--------------------------------------------------------------------------------
/Sample/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Sample",
3 | "displayName": "Sample"
4 | }
--------------------------------------------------------------------------------
/Sample/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/Sample/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @format
3 | */
4 |
5 | import {AppRegistry} from 'react-native';
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
9 | AppRegistry.registerComponent(appName, () => App);
10 |
--------------------------------------------------------------------------------
/Sample/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | unameOut="$(uname -s)"
4 |
5 | echo "$unameOut";
6 |
7 | rm -rf ../node_modules/
8 | rm -rf node_modules/
9 | yarn install
10 | rm -rf node_modules/react-native-gradient-shimmer/Sample/
11 | rm -rf node_modules/react-native-gradient-shimmer/.git/
12 |
13 | if [ "$unameOut" == "Darwin" ]; then
14 | cd ios
15 | pod install
16 | fi
17 |
--------------------------------------------------------------------------------
/Sample/ios/.xcode.env:
--------------------------------------------------------------------------------
1 | # This `.xcode.env` file is versioned and is used to source the environment
2 | # used when running script phases inside Xcode.
3 | # To customize your local environment, you can create an `.xcode.env.local`
4 | # file that is not versioned.
5 |
6 | # NODE_BINARY variable contains the PATH to the node executable.
7 | #
8 | # Customize the NODE_BINARY variable here.
9 | # For example, to use nvm with brew, add the following line
10 | # . "$(brew --prefix nvm)/nvm.sh" --no-use
11 | export NODE_BINARY=$(command -v node)
12 |
--------------------------------------------------------------------------------
/Sample/ios/Podfile:
--------------------------------------------------------------------------------
1 | require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
2 | require_relative '../node_modules/react-native/scripts/react_native_pods'
3 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
4 |
5 | platform :ios, '13.0'
6 | prepare_react_native_project!
7 |
8 | # If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
9 | # because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
10 | #
11 | # To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
12 | # ```js
13 | # module.exports = {
14 | # dependencies: {
15 | # ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
16 | # ```
17 | flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
18 |
19 | linkage = ENV['USE_FRAMEWORKS']
20 | if linkage != nil
21 | Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
22 | use_frameworks! :linkage => linkage.to_sym
23 | end
24 |
25 | target 'Sample' do
26 | use_expo_modules!
27 | post_integrate do |installer|
28 | begin
29 | expo_patch_react_imports!(installer)
30 | rescue => e
31 | Pod::UI.warn e
32 | end
33 | end
34 | config = use_native_modules!
35 |
36 | # Flags change depending on the env values.
37 | flags = get_default_flags()
38 |
39 | use_react_native!(
40 | :path => config[:reactNativePath],
41 | # Hermes is now enabled by default. Disable by setting this flag to false.
42 | # Upcoming versions of React Native may rely on get_default_flags(), but
43 | # we make it explicit here to aid in the React Native upgrade process.
44 | :hermes_enabled => flags[:hermes_enabled],
45 | :fabric_enabled => flags[:fabric_enabled],
46 | # Enables Flipper.
47 | #
48 | # Note that if you have use_frameworks! enabled, Flipper will not work and
49 | # you should disable the next line.
50 | :flipper_configuration => flipper_config,
51 | # An absolute path to your application root.
52 | :app_path => "#{Pod::Config.instance.installation_root}/.."
53 | )
54 |
55 | target 'SampleTests' do
56 | inherit! :complete
57 | # Pods for testing
58 | end
59 |
60 | post_install do |installer|
61 | react_native_post_install(
62 | installer,
63 | # Set `mac_catalyst_enabled` to `true` in order to apply patches
64 | # necessary for Mac Catalyst builds
65 | :mac_catalyst_enabled => false
66 | )
67 | __apply_Xcode_12_5_M1_post_install_workaround(installer)
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/Sample/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost (1.76.0)
3 | - BVLinearGradient (2.6.2):
4 | - React-Core
5 | - CocoaAsyncSocket (7.6.5)
6 | - DoubleConversion (1.1.6)
7 | - EXApplication (5.1.1):
8 | - ExpoModulesCore
9 | - EXConstants (14.2.1):
10 | - ExpoModulesCore
11 | - EXFileSystem (15.2.2):
12 | - ExpoModulesCore
13 | - EXFont (11.1.1):
14 | - ExpoModulesCore
15 | - Expo (48.0.9):
16 | - ExpoModulesCore
17 | - ExpoKeepAwake (12.0.1):
18 | - ExpoModulesCore
19 | - ExpoLinearGradient (12.1.2):
20 | - ExpoModulesCore
21 | - ExpoModulesCore (1.2.6):
22 | - React-Core
23 | - React-RCTAppDelegate
24 | - ReactCommon/turbomodule/core
25 | - FBLazyVector (0.71.6)
26 | - FBReactNativeSpec (0.71.6):
27 | - RCT-Folly (= 2021.07.22.00)
28 | - RCTRequired (= 0.71.6)
29 | - RCTTypeSafety (= 0.71.6)
30 | - React-Core (= 0.71.6)
31 | - React-jsi (= 0.71.6)
32 | - ReactCommon/turbomodule/core (= 0.71.6)
33 | - Flipper (0.125.0):
34 | - Flipper-Folly (~> 2.6)
35 | - Flipper-RSocket (~> 1.4)
36 | - Flipper-Boost-iOSX (1.76.0.1.11)
37 | - Flipper-DoubleConversion (3.2.0.1)
38 | - Flipper-Fmt (7.1.7)
39 | - Flipper-Folly (2.6.10):
40 | - Flipper-Boost-iOSX
41 | - Flipper-DoubleConversion
42 | - Flipper-Fmt (= 7.1.7)
43 | - Flipper-Glog
44 | - libevent (~> 2.1.12)
45 | - OpenSSL-Universal (= 1.1.1100)
46 | - Flipper-Glog (0.5.0.5)
47 | - Flipper-PeerTalk (0.0.4)
48 | - Flipper-RSocket (1.4.3):
49 | - Flipper-Folly (~> 2.6)
50 | - FlipperKit (0.125.0):
51 | - FlipperKit/Core (= 0.125.0)
52 | - FlipperKit/Core (0.125.0):
53 | - Flipper (~> 0.125.0)
54 | - FlipperKit/CppBridge
55 | - FlipperKit/FBCxxFollyDynamicConvert
56 | - FlipperKit/FBDefines
57 | - FlipperKit/FKPortForwarding
58 | - SocketRocket (~> 0.6.0)
59 | - FlipperKit/CppBridge (0.125.0):
60 | - Flipper (~> 0.125.0)
61 | - FlipperKit/FBCxxFollyDynamicConvert (0.125.0):
62 | - Flipper-Folly (~> 2.6)
63 | - FlipperKit/FBDefines (0.125.0)
64 | - FlipperKit/FKPortForwarding (0.125.0):
65 | - CocoaAsyncSocket (~> 7.6)
66 | - Flipper-PeerTalk (~> 0.0.4)
67 | - FlipperKit/FlipperKitHighlightOverlay (0.125.0)
68 | - FlipperKit/FlipperKitLayoutHelpers (0.125.0):
69 | - FlipperKit/Core
70 | - FlipperKit/FlipperKitHighlightOverlay
71 | - FlipperKit/FlipperKitLayoutTextSearchable
72 | - FlipperKit/FlipperKitLayoutIOSDescriptors (0.125.0):
73 | - FlipperKit/Core
74 | - FlipperKit/FlipperKitHighlightOverlay
75 | - FlipperKit/FlipperKitLayoutHelpers
76 | - YogaKit (~> 1.18)
77 | - FlipperKit/FlipperKitLayoutPlugin (0.125.0):
78 | - FlipperKit/Core
79 | - FlipperKit/FlipperKitHighlightOverlay
80 | - FlipperKit/FlipperKitLayoutHelpers
81 | - FlipperKit/FlipperKitLayoutIOSDescriptors
82 | - FlipperKit/FlipperKitLayoutTextSearchable
83 | - YogaKit (~> 1.18)
84 | - FlipperKit/FlipperKitLayoutTextSearchable (0.125.0)
85 | - FlipperKit/FlipperKitNetworkPlugin (0.125.0):
86 | - FlipperKit/Core
87 | - FlipperKit/FlipperKitReactPlugin (0.125.0):
88 | - FlipperKit/Core
89 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.125.0):
90 | - FlipperKit/Core
91 | - FlipperKit/SKIOSNetworkPlugin (0.125.0):
92 | - FlipperKit/Core
93 | - FlipperKit/FlipperKitNetworkPlugin
94 | - fmt (6.2.1)
95 | - glog (0.3.5)
96 | - hermes-engine (0.71.6):
97 | - hermes-engine/Pre-built (= 0.71.6)
98 | - hermes-engine/Pre-built (0.71.6)
99 | - libevent (2.1.12)
100 | - OpenSSL-Universal (1.1.1100)
101 | - RCT-Folly (2021.07.22.00):
102 | - boost
103 | - DoubleConversion
104 | - fmt (~> 6.2.1)
105 | - glog
106 | - RCT-Folly/Default (= 2021.07.22.00)
107 | - RCT-Folly/Default (2021.07.22.00):
108 | - boost
109 | - DoubleConversion
110 | - fmt (~> 6.2.1)
111 | - glog
112 | - RCT-Folly/Futures (2021.07.22.00):
113 | - boost
114 | - DoubleConversion
115 | - fmt (~> 6.2.1)
116 | - glog
117 | - libevent
118 | - RCTRequired (0.71.6)
119 | - RCTTypeSafety (0.71.6):
120 | - FBLazyVector (= 0.71.6)
121 | - RCTRequired (= 0.71.6)
122 | - React-Core (= 0.71.6)
123 | - React (0.71.6):
124 | - React-Core (= 0.71.6)
125 | - React-Core/DevSupport (= 0.71.6)
126 | - React-Core/RCTWebSocket (= 0.71.6)
127 | - React-RCTActionSheet (= 0.71.6)
128 | - React-RCTAnimation (= 0.71.6)
129 | - React-RCTBlob (= 0.71.6)
130 | - React-RCTImage (= 0.71.6)
131 | - React-RCTLinking (= 0.71.6)
132 | - React-RCTNetwork (= 0.71.6)
133 | - React-RCTSettings (= 0.71.6)
134 | - React-RCTText (= 0.71.6)
135 | - React-RCTVibration (= 0.71.6)
136 | - React-callinvoker (0.71.6)
137 | - React-Codegen (0.71.6):
138 | - FBReactNativeSpec
139 | - hermes-engine
140 | - RCT-Folly
141 | - RCTRequired
142 | - RCTTypeSafety
143 | - React-Core
144 | - React-jsi
145 | - React-jsiexecutor
146 | - ReactCommon/turbomodule/bridging
147 | - ReactCommon/turbomodule/core
148 | - React-Core (0.71.6):
149 | - glog
150 | - hermes-engine
151 | - RCT-Folly (= 2021.07.22.00)
152 | - React-Core/Default (= 0.71.6)
153 | - React-cxxreact (= 0.71.6)
154 | - React-hermes
155 | - React-jsi (= 0.71.6)
156 | - React-jsiexecutor (= 0.71.6)
157 | - React-perflogger (= 0.71.6)
158 | - Yoga
159 | - React-Core/CoreModulesHeaders (0.71.6):
160 | - glog
161 | - hermes-engine
162 | - RCT-Folly (= 2021.07.22.00)
163 | - React-Core/Default
164 | - React-cxxreact (= 0.71.6)
165 | - React-hermes
166 | - React-jsi (= 0.71.6)
167 | - React-jsiexecutor (= 0.71.6)
168 | - React-perflogger (= 0.71.6)
169 | - Yoga
170 | - React-Core/Default (0.71.6):
171 | - glog
172 | - hermes-engine
173 | - RCT-Folly (= 2021.07.22.00)
174 | - React-cxxreact (= 0.71.6)
175 | - React-hermes
176 | - React-jsi (= 0.71.6)
177 | - React-jsiexecutor (= 0.71.6)
178 | - React-perflogger (= 0.71.6)
179 | - Yoga
180 | - React-Core/DevSupport (0.71.6):
181 | - glog
182 | - hermes-engine
183 | - RCT-Folly (= 2021.07.22.00)
184 | - React-Core/Default (= 0.71.6)
185 | - React-Core/RCTWebSocket (= 0.71.6)
186 | - React-cxxreact (= 0.71.6)
187 | - React-hermes
188 | - React-jsi (= 0.71.6)
189 | - React-jsiexecutor (= 0.71.6)
190 | - React-jsinspector (= 0.71.6)
191 | - React-perflogger (= 0.71.6)
192 | - Yoga
193 | - React-Core/RCTActionSheetHeaders (0.71.6):
194 | - glog
195 | - hermes-engine
196 | - RCT-Folly (= 2021.07.22.00)
197 | - React-Core/Default
198 | - React-cxxreact (= 0.71.6)
199 | - React-hermes
200 | - React-jsi (= 0.71.6)
201 | - React-jsiexecutor (= 0.71.6)
202 | - React-perflogger (= 0.71.6)
203 | - Yoga
204 | - React-Core/RCTAnimationHeaders (0.71.6):
205 | - glog
206 | - hermes-engine
207 | - RCT-Folly (= 2021.07.22.00)
208 | - React-Core/Default
209 | - React-cxxreact (= 0.71.6)
210 | - React-hermes
211 | - React-jsi (= 0.71.6)
212 | - React-jsiexecutor (= 0.71.6)
213 | - React-perflogger (= 0.71.6)
214 | - Yoga
215 | - React-Core/RCTBlobHeaders (0.71.6):
216 | - glog
217 | - hermes-engine
218 | - RCT-Folly (= 2021.07.22.00)
219 | - React-Core/Default
220 | - React-cxxreact (= 0.71.6)
221 | - React-hermes
222 | - React-jsi (= 0.71.6)
223 | - React-jsiexecutor (= 0.71.6)
224 | - React-perflogger (= 0.71.6)
225 | - Yoga
226 | - React-Core/RCTImageHeaders (0.71.6):
227 | - glog
228 | - hermes-engine
229 | - RCT-Folly (= 2021.07.22.00)
230 | - React-Core/Default
231 | - React-cxxreact (= 0.71.6)
232 | - React-hermes
233 | - React-jsi (= 0.71.6)
234 | - React-jsiexecutor (= 0.71.6)
235 | - React-perflogger (= 0.71.6)
236 | - Yoga
237 | - React-Core/RCTLinkingHeaders (0.71.6):
238 | - glog
239 | - hermes-engine
240 | - RCT-Folly (= 2021.07.22.00)
241 | - React-Core/Default
242 | - React-cxxreact (= 0.71.6)
243 | - React-hermes
244 | - React-jsi (= 0.71.6)
245 | - React-jsiexecutor (= 0.71.6)
246 | - React-perflogger (= 0.71.6)
247 | - Yoga
248 | - React-Core/RCTNetworkHeaders (0.71.6):
249 | - glog
250 | - hermes-engine
251 | - RCT-Folly (= 2021.07.22.00)
252 | - React-Core/Default
253 | - React-cxxreact (= 0.71.6)
254 | - React-hermes
255 | - React-jsi (= 0.71.6)
256 | - React-jsiexecutor (= 0.71.6)
257 | - React-perflogger (= 0.71.6)
258 | - Yoga
259 | - React-Core/RCTSettingsHeaders (0.71.6):
260 | - glog
261 | - hermes-engine
262 | - RCT-Folly (= 2021.07.22.00)
263 | - React-Core/Default
264 | - React-cxxreact (= 0.71.6)
265 | - React-hermes
266 | - React-jsi (= 0.71.6)
267 | - React-jsiexecutor (= 0.71.6)
268 | - React-perflogger (= 0.71.6)
269 | - Yoga
270 | - React-Core/RCTTextHeaders (0.71.6):
271 | - glog
272 | - hermes-engine
273 | - RCT-Folly (= 2021.07.22.00)
274 | - React-Core/Default
275 | - React-cxxreact (= 0.71.6)
276 | - React-hermes
277 | - React-jsi (= 0.71.6)
278 | - React-jsiexecutor (= 0.71.6)
279 | - React-perflogger (= 0.71.6)
280 | - Yoga
281 | - React-Core/RCTVibrationHeaders (0.71.6):
282 | - glog
283 | - hermes-engine
284 | - RCT-Folly (= 2021.07.22.00)
285 | - React-Core/Default
286 | - React-cxxreact (= 0.71.6)
287 | - React-hermes
288 | - React-jsi (= 0.71.6)
289 | - React-jsiexecutor (= 0.71.6)
290 | - React-perflogger (= 0.71.6)
291 | - Yoga
292 | - React-Core/RCTWebSocket (0.71.6):
293 | - glog
294 | - hermes-engine
295 | - RCT-Folly (= 2021.07.22.00)
296 | - React-Core/Default (= 0.71.6)
297 | - React-cxxreact (= 0.71.6)
298 | - React-hermes
299 | - React-jsi (= 0.71.6)
300 | - React-jsiexecutor (= 0.71.6)
301 | - React-perflogger (= 0.71.6)
302 | - Yoga
303 | - React-CoreModules (0.71.6):
304 | - RCT-Folly (= 2021.07.22.00)
305 | - RCTTypeSafety (= 0.71.6)
306 | - React-Codegen (= 0.71.6)
307 | - React-Core/CoreModulesHeaders (= 0.71.6)
308 | - React-jsi (= 0.71.6)
309 | - React-RCTBlob
310 | - React-RCTImage (= 0.71.6)
311 | - ReactCommon/turbomodule/core (= 0.71.6)
312 | - React-cxxreact (0.71.6):
313 | - boost (= 1.76.0)
314 | - DoubleConversion
315 | - glog
316 | - hermes-engine
317 | - RCT-Folly (= 2021.07.22.00)
318 | - React-callinvoker (= 0.71.6)
319 | - React-jsi (= 0.71.6)
320 | - React-jsinspector (= 0.71.6)
321 | - React-logger (= 0.71.6)
322 | - React-perflogger (= 0.71.6)
323 | - React-runtimeexecutor (= 0.71.6)
324 | - React-hermes (0.71.6):
325 | - DoubleConversion
326 | - glog
327 | - hermes-engine
328 | - RCT-Folly (= 2021.07.22.00)
329 | - RCT-Folly/Futures (= 2021.07.22.00)
330 | - React-cxxreact (= 0.71.6)
331 | - React-jsi
332 | - React-jsiexecutor (= 0.71.6)
333 | - React-jsinspector (= 0.71.6)
334 | - React-perflogger (= 0.71.6)
335 | - React-jsi (0.71.6):
336 | - boost (= 1.76.0)
337 | - DoubleConversion
338 | - glog
339 | - hermes-engine
340 | - RCT-Folly (= 2021.07.22.00)
341 | - React-jsiexecutor (0.71.6):
342 | - DoubleConversion
343 | - glog
344 | - hermes-engine
345 | - RCT-Folly (= 2021.07.22.00)
346 | - React-cxxreact (= 0.71.6)
347 | - React-jsi (= 0.71.6)
348 | - React-perflogger (= 0.71.6)
349 | - React-jsinspector (0.71.6)
350 | - React-logger (0.71.6):
351 | - glog
352 | - React-perflogger (0.71.6)
353 | - React-RCTActionSheet (0.71.6):
354 | - React-Core/RCTActionSheetHeaders (= 0.71.6)
355 | - React-RCTAnimation (0.71.6):
356 | - RCT-Folly (= 2021.07.22.00)
357 | - RCTTypeSafety (= 0.71.6)
358 | - React-Codegen (= 0.71.6)
359 | - React-Core/RCTAnimationHeaders (= 0.71.6)
360 | - React-jsi (= 0.71.6)
361 | - ReactCommon/turbomodule/core (= 0.71.6)
362 | - React-RCTAppDelegate (0.71.6):
363 | - RCT-Folly
364 | - RCTRequired
365 | - RCTTypeSafety
366 | - React-Core
367 | - ReactCommon/turbomodule/core
368 | - React-RCTBlob (0.71.6):
369 | - hermes-engine
370 | - RCT-Folly (= 2021.07.22.00)
371 | - React-Codegen (= 0.71.6)
372 | - React-Core/RCTBlobHeaders (= 0.71.6)
373 | - React-Core/RCTWebSocket (= 0.71.6)
374 | - React-jsi (= 0.71.6)
375 | - React-RCTNetwork (= 0.71.6)
376 | - ReactCommon/turbomodule/core (= 0.71.6)
377 | - React-RCTImage (0.71.6):
378 | - RCT-Folly (= 2021.07.22.00)
379 | - RCTTypeSafety (= 0.71.6)
380 | - React-Codegen (= 0.71.6)
381 | - React-Core/RCTImageHeaders (= 0.71.6)
382 | - React-jsi (= 0.71.6)
383 | - React-RCTNetwork (= 0.71.6)
384 | - ReactCommon/turbomodule/core (= 0.71.6)
385 | - React-RCTLinking (0.71.6):
386 | - React-Codegen (= 0.71.6)
387 | - React-Core/RCTLinkingHeaders (= 0.71.6)
388 | - React-jsi (= 0.71.6)
389 | - ReactCommon/turbomodule/core (= 0.71.6)
390 | - React-RCTNetwork (0.71.6):
391 | - RCT-Folly (= 2021.07.22.00)
392 | - RCTTypeSafety (= 0.71.6)
393 | - React-Codegen (= 0.71.6)
394 | - React-Core/RCTNetworkHeaders (= 0.71.6)
395 | - React-jsi (= 0.71.6)
396 | - ReactCommon/turbomodule/core (= 0.71.6)
397 | - React-RCTSettings (0.71.6):
398 | - RCT-Folly (= 2021.07.22.00)
399 | - RCTTypeSafety (= 0.71.6)
400 | - React-Codegen (= 0.71.6)
401 | - React-Core/RCTSettingsHeaders (= 0.71.6)
402 | - React-jsi (= 0.71.6)
403 | - ReactCommon/turbomodule/core (= 0.71.6)
404 | - React-RCTText (0.71.6):
405 | - React-Core/RCTTextHeaders (= 0.71.6)
406 | - React-RCTVibration (0.71.6):
407 | - RCT-Folly (= 2021.07.22.00)
408 | - React-Codegen (= 0.71.6)
409 | - React-Core/RCTVibrationHeaders (= 0.71.6)
410 | - React-jsi (= 0.71.6)
411 | - ReactCommon/turbomodule/core (= 0.71.6)
412 | - React-runtimeexecutor (0.71.6):
413 | - React-jsi (= 0.71.6)
414 | - ReactCommon/turbomodule/bridging (0.71.6):
415 | - DoubleConversion
416 | - glog
417 | - hermes-engine
418 | - RCT-Folly (= 2021.07.22.00)
419 | - React-callinvoker (= 0.71.6)
420 | - React-Core (= 0.71.6)
421 | - React-cxxreact (= 0.71.6)
422 | - React-jsi (= 0.71.6)
423 | - React-logger (= 0.71.6)
424 | - React-perflogger (= 0.71.6)
425 | - ReactCommon/turbomodule/core (0.71.6):
426 | - DoubleConversion
427 | - glog
428 | - hermes-engine
429 | - RCT-Folly (= 2021.07.22.00)
430 | - React-callinvoker (= 0.71.6)
431 | - React-Core (= 0.71.6)
432 | - React-cxxreact (= 0.71.6)
433 | - React-jsi (= 0.71.6)
434 | - React-logger (= 0.71.6)
435 | - React-perflogger (= 0.71.6)
436 | - SocketRocket (0.6.0)
437 | - Yoga (1.14.0)
438 | - YogaKit (1.18.1):
439 | - Yoga (~> 1.14)
440 |
441 | DEPENDENCIES:
442 | - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
443 | - BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
444 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
445 | - EXApplication (from `../node_modules/expo-application/ios`)
446 | - EXConstants (from `../node_modules/expo-constants/ios`)
447 | - EXFileSystem (from `../node_modules/expo-file-system/ios`)
448 | - EXFont (from `../node_modules/expo-font/ios`)
449 | - Expo (from `../node_modules/expo`)
450 | - ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
451 | - ExpoLinearGradient (from `../node_modules/expo-linear-gradient/ios`)
452 | - ExpoModulesCore (from `../node_modules/expo-modules-core`)
453 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
454 | - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
455 | - Flipper (= 0.125.0)
456 | - Flipper-Boost-iOSX (= 1.76.0.1.11)
457 | - Flipper-DoubleConversion (= 3.2.0.1)
458 | - Flipper-Fmt (= 7.1.7)
459 | - Flipper-Folly (= 2.6.10)
460 | - Flipper-Glog (= 0.5.0.5)
461 | - Flipper-PeerTalk (= 0.0.4)
462 | - Flipper-RSocket (= 1.4.3)
463 | - FlipperKit (= 0.125.0)
464 | - FlipperKit/Core (= 0.125.0)
465 | - FlipperKit/CppBridge (= 0.125.0)
466 | - FlipperKit/FBCxxFollyDynamicConvert (= 0.125.0)
467 | - FlipperKit/FBDefines (= 0.125.0)
468 | - FlipperKit/FKPortForwarding (= 0.125.0)
469 | - FlipperKit/FlipperKitHighlightOverlay (= 0.125.0)
470 | - FlipperKit/FlipperKitLayoutPlugin (= 0.125.0)
471 | - FlipperKit/FlipperKitLayoutTextSearchable (= 0.125.0)
472 | - FlipperKit/FlipperKitNetworkPlugin (= 0.125.0)
473 | - FlipperKit/FlipperKitReactPlugin (= 0.125.0)
474 | - FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
475 | - FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
476 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
477 | - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
478 | - libevent (~> 2.1.12)
479 | - OpenSSL-Universal (= 1.1.1100)
480 | - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
481 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
482 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
483 | - React (from `../node_modules/react-native/`)
484 | - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
485 | - React-Codegen (from `build/generated/ios`)
486 | - React-Core (from `../node_modules/react-native/`)
487 | - React-Core/DevSupport (from `../node_modules/react-native/`)
488 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
489 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
490 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
491 | - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
492 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
493 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
494 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
495 | - React-logger (from `../node_modules/react-native/ReactCommon/logger`)
496 | - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
497 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
498 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
499 | - React-RCTAppDelegate (from `../node_modules/react-native/Libraries/AppDelegate`)
500 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
501 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
502 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
503 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
504 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
505 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
506 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
507 | - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
508 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
509 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
510 |
511 | SPEC REPOS:
512 | trunk:
513 | - CocoaAsyncSocket
514 | - Flipper
515 | - Flipper-Boost-iOSX
516 | - Flipper-DoubleConversion
517 | - Flipper-Fmt
518 | - Flipper-Folly
519 | - Flipper-Glog
520 | - Flipper-PeerTalk
521 | - Flipper-RSocket
522 | - FlipperKit
523 | - fmt
524 | - libevent
525 | - OpenSSL-Universal
526 | - SocketRocket
527 | - YogaKit
528 |
529 | EXTERNAL SOURCES:
530 | boost:
531 | :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
532 | BVLinearGradient:
533 | :path: "../node_modules/react-native-linear-gradient"
534 | DoubleConversion:
535 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
536 | EXApplication:
537 | :path: "../node_modules/expo-application/ios"
538 | EXConstants:
539 | :path: "../node_modules/expo-constants/ios"
540 | EXFileSystem:
541 | :path: "../node_modules/expo-file-system/ios"
542 | EXFont:
543 | :path: "../node_modules/expo-font/ios"
544 | Expo:
545 | :path: "../node_modules/expo"
546 | ExpoKeepAwake:
547 | :path: "../node_modules/expo-keep-awake/ios"
548 | ExpoLinearGradient:
549 | :path: "../node_modules/expo-linear-gradient/ios"
550 | ExpoModulesCore:
551 | :path: "../node_modules/expo-modules-core"
552 | FBLazyVector:
553 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
554 | FBReactNativeSpec:
555 | :path: "../node_modules/react-native/React/FBReactNativeSpec"
556 | glog:
557 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
558 | hermes-engine:
559 | :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec"
560 | RCT-Folly:
561 | :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
562 | RCTRequired:
563 | :path: "../node_modules/react-native/Libraries/RCTRequired"
564 | RCTTypeSafety:
565 | :path: "../node_modules/react-native/Libraries/TypeSafety"
566 | React:
567 | :path: "../node_modules/react-native/"
568 | React-callinvoker:
569 | :path: "../node_modules/react-native/ReactCommon/callinvoker"
570 | React-Codegen:
571 | :path: build/generated/ios
572 | React-Core:
573 | :path: "../node_modules/react-native/"
574 | React-CoreModules:
575 | :path: "../node_modules/react-native/React/CoreModules"
576 | React-cxxreact:
577 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
578 | React-hermes:
579 | :path: "../node_modules/react-native/ReactCommon/hermes"
580 | React-jsi:
581 | :path: "../node_modules/react-native/ReactCommon/jsi"
582 | React-jsiexecutor:
583 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
584 | React-jsinspector:
585 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
586 | React-logger:
587 | :path: "../node_modules/react-native/ReactCommon/logger"
588 | React-perflogger:
589 | :path: "../node_modules/react-native/ReactCommon/reactperflogger"
590 | React-RCTActionSheet:
591 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
592 | React-RCTAnimation:
593 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
594 | React-RCTAppDelegate:
595 | :path: "../node_modules/react-native/Libraries/AppDelegate"
596 | React-RCTBlob:
597 | :path: "../node_modules/react-native/Libraries/Blob"
598 | React-RCTImage:
599 | :path: "../node_modules/react-native/Libraries/Image"
600 | React-RCTLinking:
601 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
602 | React-RCTNetwork:
603 | :path: "../node_modules/react-native/Libraries/Network"
604 | React-RCTSettings:
605 | :path: "../node_modules/react-native/Libraries/Settings"
606 | React-RCTText:
607 | :path: "../node_modules/react-native/Libraries/Text"
608 | React-RCTVibration:
609 | :path: "../node_modules/react-native/Libraries/Vibration"
610 | React-runtimeexecutor:
611 | :path: "../node_modules/react-native/ReactCommon/runtimeexecutor"
612 | ReactCommon:
613 | :path: "../node_modules/react-native/ReactCommon"
614 | Yoga:
615 | :path: "../node_modules/react-native/ReactCommon/yoga"
616 |
617 | SPEC CHECKSUMS:
618 | boost: 57d2868c099736d80fcd648bf211b4431e51a558
619 | BVLinearGradient: 34a999fda29036898a09c6a6b728b0b4189e1a44
620 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
621 | DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
622 | EXApplication: d8f53a7eee90a870a75656280e8d4b85726ea903
623 | EXConstants: f348da07e21b23d2b085e270d7b74f282df1a7d9
624 | EXFileSystem: 844e86ca9b5375486ecc4ef06d3838d5597d895d
625 | EXFont: 6ea3800df746be7233208d80fe379b8ed74f4272
626 | Expo: 863488a600a4565698a79577117c70b170054d08
627 | ExpoKeepAwake: 69f5f627670d62318410392d03e0b5db0f85759a
628 | ExpoLinearGradient: 8eaab76b7f55c612ed8348c8be8c2a18a9b4529f
629 | ExpoModulesCore: 6e0259511f4c4341b6b8357db393624df2280828
630 | FBLazyVector: a83ceaa8a8581003a623facdb3c44f6d4f342ac5
631 | FBReactNativeSpec: 85eee79837cb797ab6176f0243a2b40511c09158
632 | Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
633 | Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
634 | Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
635 | Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
636 | Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
637 | Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
638 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
639 | Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
640 | FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
641 | fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
642 | glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
643 | hermes-engine: b434cea529ad0152c56c7cb6486b0c4c0b23b5de
644 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
645 | OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
646 | RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
647 | RCTRequired: 5c6fd63b03abb06947d348dadac51c93e3485bd8
648 | RCTTypeSafety: 1c66daedd66f674e39ce9f40782f0d490c78b175
649 | React: e11ca7cdc7aa4ddd7e6a59278b808cfe17ebbd9f
650 | React-callinvoker: 77a82869505c96945c074b80bbdc8df919646d51
651 | React-Codegen: 9ee33090c38ab3da3c4dc029924d50fb649f0dfc
652 | React-Core: 44903e47b428a491f48fd0eae54caddb2ea05ebf
653 | React-CoreModules: 83d989defdfc82be1f7386f84a56b6509f54ac74
654 | React-cxxreact: 058e7e6349649eae9cfcdec5854e702b26298932
655 | React-hermes: ba19a405804b833c9b832c1f2061ad5038bb97f2
656 | React-jsi: 3fe6f589c9cafbef85ed5a4be7c6dc8edfb4ab54
657 | React-jsiexecutor: 7894956638ff3e00819dd3f9f6f4a84da38f2409
658 | React-jsinspector: d5ce2ef3eb8fd30c28389d0bc577918c70821bd6
659 | React-logger: 9332c3e7b4ef007a0211c0a9868253aac3e1da82
660 | React-perflogger: 43392072a5b867a504e2b4857606f8fc5a403d7f
661 | React-RCTActionSheet: c7b67c125bebeda9fb19fc7b200d85cb9d6899c4
662 | React-RCTAnimation: c2de79906f607986633a7114bee44854e4c7e2f5
663 | React-RCTAppDelegate: 96bc933c3228a549718a6475c4d3f9dd4bbae98d
664 | React-RCTBlob: cf72446957310e7da6627a4bdaadf970d3a8f232
665 | React-RCTImage: c6093f1bf3d67c0428d779b00390617d5bd90699
666 | React-RCTLinking: 5de47e37937889d22599af4b99d0552bad1b1c3c
667 | React-RCTNetwork: e7d7077e073b08e5dd486fba3fe87ccad90a9bc4
668 | React-RCTSettings: 72a04921b2e8fb832da7201a60ffffff2a7c62f7
669 | React-RCTText: 7123c70fef5367e2121fea37e65b9ad6d3747e54
670 | React-RCTVibration: 73d201599a64ea14b4e0b8f91b64970979fd92e6
671 | React-runtimeexecutor: 8692ac548bec648fa121980ccb4304afd136d584
672 | ReactCommon: 0c43eaeaaee231d7d8dc24fc5a6e4cf2b75bf196
673 | SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
674 | Yoga: ba09b6b11e6139e3df8229238aa794205ca6a02a
675 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
676 |
677 | PODFILE CHECKSUM: ce35c4af6caaba3c4a2d86d66de97bf56a7970b1
678 |
679 | COCOAPODS: 1.12.0
680 |
--------------------------------------------------------------------------------
/Sample/ios/Sample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 54;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 00E356F31AD99517003FC87E /* SampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* SampleTests.m */; };
11 | 0C80B921A6F3F58F76C31292 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-Sample.a */; };
12 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 6BC23BCB58CE0342B3EC3F7C /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93B37D19A0282CD13D04A558 /* ExpoModulesProvider.swift */; };
16 | 7699B88040F8A987B510C191 /* libPods-Sample-SampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Sample-SampleTests.a */; };
17 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
18 | DC9B1C96433FB25EB9FDAA59 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F68B9C37683926ACF46C2ECE /* ExpoModulesProvider.swift */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = 13B07F861A680F5B00A75B9A;
27 | remoteInfo = Sample;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXFileReference section */
32 | 00E356EE1AD99517003FC87E /* SampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
33 | 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
34 | 00E356F21AD99517003FC87E /* SampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SampleTests.m; sourceTree = ""; };
35 | 13B07F961A680F5B00A75B9A /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
36 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Sample/AppDelegate.h; sourceTree = ""; };
37 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Sample/AppDelegate.mm; sourceTree = ""; };
38 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = Sample/Images.xcassets; sourceTree = ""; };
39 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Sample/Info.plist; sourceTree = ""; };
40 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Sample/main.m; sourceTree = ""; };
41 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Sample-SampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample-SampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 3B4392A12AC88292D35C810B /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; };
43 | 5709B34CF0A7D63546082F79 /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; };
44 | 5B7EB9410499542E8C5724F5 /* Pods-Sample-SampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample-SampleTests.debug.xcconfig"; path = "Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests.debug.xcconfig"; sourceTree = ""; };
45 | 5DCACB8F33CDC322A6C60F78 /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
46 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Sample/LaunchScreen.storyboard; sourceTree = ""; };
47 | 89C6BE57DB24E9ADA2F236DE /* Pods-Sample-SampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample-SampleTests.release.xcconfig"; path = "Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests.release.xcconfig"; sourceTree = ""; };
48 | 93B37D19A0282CD13D04A558 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Sample/ExpoModulesProvider.swift"; sourceTree = ""; };
49 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
50 | F68B9C37683926ACF46C2ECE /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Sample-SampleTests/ExpoModulesProvider.swift"; sourceTree = ""; };
51 | /* End PBXFileReference section */
52 |
53 | /* Begin PBXFrameworksBuildPhase section */
54 | 00E356EB1AD99517003FC87E /* Frameworks */ = {
55 | isa = PBXFrameworksBuildPhase;
56 | buildActionMask = 2147483647;
57 | files = (
58 | 7699B88040F8A987B510C191 /* libPods-Sample-SampleTests.a in Frameworks */,
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
63 | isa = PBXFrameworksBuildPhase;
64 | buildActionMask = 2147483647;
65 | files = (
66 | 0C80B921A6F3F58F76C31292 /* libPods-Sample.a in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 00E356EF1AD99517003FC87E /* SampleTests */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 00E356F21AD99517003FC87E /* SampleTests.m */,
77 | 00E356F01AD99517003FC87E /* Supporting Files */,
78 | );
79 | path = SampleTests;
80 | sourceTree = "";
81 | };
82 | 00E356F01AD99517003FC87E /* Supporting Files */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 00E356F11AD99517003FC87E /* Info.plist */,
86 | );
87 | name = "Supporting Files";
88 | sourceTree = "";
89 | };
90 | 13B07FAE1A68108700A75B9A /* Sample */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
94 | 13B07FB01A68108700A75B9A /* AppDelegate.mm */,
95 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
96 | 13B07FB61A68108700A75B9A /* Info.plist */,
97 | 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
98 | 13B07FB71A68108700A75B9A /* main.m */,
99 | );
100 | name = Sample;
101 | sourceTree = "";
102 | };
103 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
104 | isa = PBXGroup;
105 | children = (
106 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
107 | 5DCACB8F33CDC322A6C60F78 /* libPods-Sample.a */,
108 | 19F6CBCC0A4E27FBF8BF4A61 /* libPods-Sample-SampleTests.a */,
109 | );
110 | name = Frameworks;
111 | sourceTree = "";
112 | };
113 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
114 | isa = PBXGroup;
115 | children = (
116 | );
117 | name = Libraries;
118 | sourceTree = "";
119 | };
120 | 83CBB9F61A601CBA00E9B192 = {
121 | isa = PBXGroup;
122 | children = (
123 | 13B07FAE1A68108700A75B9A /* Sample */,
124 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
125 | 00E356EF1AD99517003FC87E /* SampleTests */,
126 | 83CBBA001A601CBA00E9B192 /* Products */,
127 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
128 | BBD78D7AC51CEA395F1C20DB /* Pods */,
129 | A73C37D5E91BC1337C1DC5B6 /* ExpoModulesProviders */,
130 | );
131 | indentWidth = 2;
132 | sourceTree = "";
133 | tabWidth = 2;
134 | usesTabs = 0;
135 | };
136 | 83CBBA001A601CBA00E9B192 /* Products */ = {
137 | isa = PBXGroup;
138 | children = (
139 | 13B07F961A680F5B00A75B9A /* Sample.app */,
140 | 00E356EE1AD99517003FC87E /* SampleTests.xctest */,
141 | );
142 | name = Products;
143 | sourceTree = "";
144 | };
145 | A73C37D5E91BC1337C1DC5B6 /* ExpoModulesProviders */ = {
146 | isa = PBXGroup;
147 | children = (
148 | C9D71F4FFA99ACBFD703A010 /* Sample */,
149 | B0BECBDCB033D020623469BA /* SampleTests */,
150 | );
151 | name = ExpoModulesProviders;
152 | sourceTree = "";
153 | };
154 | B0BECBDCB033D020623469BA /* SampleTests */ = {
155 | isa = PBXGroup;
156 | children = (
157 | F68B9C37683926ACF46C2ECE /* ExpoModulesProvider.swift */,
158 | );
159 | name = SampleTests;
160 | sourceTree = "";
161 | };
162 | BBD78D7AC51CEA395F1C20DB /* Pods */ = {
163 | isa = PBXGroup;
164 | children = (
165 | 3B4392A12AC88292D35C810B /* Pods-Sample.debug.xcconfig */,
166 | 5709B34CF0A7D63546082F79 /* Pods-Sample.release.xcconfig */,
167 | 5B7EB9410499542E8C5724F5 /* Pods-Sample-SampleTests.debug.xcconfig */,
168 | 89C6BE57DB24E9ADA2F236DE /* Pods-Sample-SampleTests.release.xcconfig */,
169 | );
170 | path = Pods;
171 | sourceTree = "";
172 | };
173 | C9D71F4FFA99ACBFD703A010 /* Sample */ = {
174 | isa = PBXGroup;
175 | children = (
176 | 93B37D19A0282CD13D04A558 /* ExpoModulesProvider.swift */,
177 | );
178 | name = Sample;
179 | sourceTree = "";
180 | };
181 | /* End PBXGroup section */
182 |
183 | /* Begin PBXNativeTarget section */
184 | 00E356ED1AD99517003FC87E /* SampleTests */ = {
185 | isa = PBXNativeTarget;
186 | buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "SampleTests" */;
187 | buildPhases = (
188 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */,
189 | 00E356EA1AD99517003FC87E /* Sources */,
190 | 00E356EB1AD99517003FC87E /* Frameworks */,
191 | 00E356EC1AD99517003FC87E /* Resources */,
192 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */,
193 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */,
194 | );
195 | buildRules = (
196 | );
197 | dependencies = (
198 | 00E356F51AD99517003FC87E /* PBXTargetDependency */,
199 | );
200 | name = SampleTests;
201 | productName = SampleTests;
202 | productReference = 00E356EE1AD99517003FC87E /* SampleTests.xctest */;
203 | productType = "com.apple.product-type.bundle.unit-test";
204 | };
205 | 13B07F861A680F5B00A75B9A /* Sample */ = {
206 | isa = PBXNativeTarget;
207 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Sample" */;
208 | buildPhases = (
209 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
210 | FD10A7F022414F080027D42C /* Start Packager */,
211 | 13B07F871A680F5B00A75B9A /* Sources */,
212 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
213 | 13B07F8E1A680F5B00A75B9A /* Resources */,
214 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
215 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */,
216 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */,
217 | );
218 | buildRules = (
219 | );
220 | dependencies = (
221 | );
222 | name = Sample;
223 | productName = Sample;
224 | productReference = 13B07F961A680F5B00A75B9A /* Sample.app */;
225 | productType = "com.apple.product-type.application";
226 | };
227 | /* End PBXNativeTarget section */
228 |
229 | /* Begin PBXProject section */
230 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
231 | isa = PBXProject;
232 | attributes = {
233 | LastUpgradeCheck = 1210;
234 | TargetAttributes = {
235 | 00E356ED1AD99517003FC87E = {
236 | CreatedOnToolsVersion = 6.2;
237 | TestTargetID = 13B07F861A680F5B00A75B9A;
238 | };
239 | 13B07F861A680F5B00A75B9A = {
240 | LastSwiftMigration = 1120;
241 | };
242 | };
243 | };
244 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Sample" */;
245 | compatibilityVersion = "Xcode 12.0";
246 | developmentRegion = en;
247 | hasScannedForEncodings = 0;
248 | knownRegions = (
249 | en,
250 | Base,
251 | );
252 | mainGroup = 83CBB9F61A601CBA00E9B192;
253 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
254 | projectDirPath = "";
255 | projectRoot = "";
256 | targets = (
257 | 13B07F861A680F5B00A75B9A /* Sample */,
258 | 00E356ED1AD99517003FC87E /* SampleTests */,
259 | );
260 | };
261 | /* End PBXProject section */
262 |
263 | /* Begin PBXResourcesBuildPhase section */
264 | 00E356EC1AD99517003FC87E /* Resources */ = {
265 | isa = PBXResourcesBuildPhase;
266 | buildActionMask = 2147483647;
267 | files = (
268 | );
269 | runOnlyForDeploymentPostprocessing = 0;
270 | };
271 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
272 | isa = PBXResourcesBuildPhase;
273 | buildActionMask = 2147483647;
274 | files = (
275 | 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
276 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
277 | );
278 | runOnlyForDeploymentPostprocessing = 0;
279 | };
280 | /* End PBXResourcesBuildPhase section */
281 |
282 | /* Begin PBXShellScriptBuildPhase section */
283 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
284 | isa = PBXShellScriptBuildPhase;
285 | buildActionMask = 2147483647;
286 | files = (
287 | );
288 | inputPaths = (
289 | "$(SRCROOT)/.xcode.env.local",
290 | "$(SRCROOT)/.xcode.env",
291 | );
292 | name = "Bundle React Native code and images";
293 | outputPaths = (
294 | );
295 | runOnlyForDeploymentPostprocessing = 0;
296 | shellPath = /bin/sh;
297 | shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n";
298 | };
299 | 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
300 | isa = PBXShellScriptBuildPhase;
301 | buildActionMask = 2147483647;
302 | files = (
303 | );
304 | inputFileListPaths = (
305 | "${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
306 | );
307 | name = "[CP] Embed Pods Frameworks";
308 | outputFileListPaths = (
309 | "${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
310 | );
311 | runOnlyForDeploymentPostprocessing = 0;
312 | shellPath = /bin/sh;
313 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n";
314 | showEnvVarsInLog = 0;
315 | };
316 | A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = {
317 | isa = PBXShellScriptBuildPhase;
318 | buildActionMask = 2147483647;
319 | files = (
320 | );
321 | inputFileListPaths = (
322 | );
323 | inputPaths = (
324 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
325 | "${PODS_ROOT}/Manifest.lock",
326 | );
327 | name = "[CP] Check Pods Manifest.lock";
328 | outputFileListPaths = (
329 | );
330 | outputPaths = (
331 | "$(DERIVED_FILE_DIR)/Pods-Sample-SampleTests-checkManifestLockResult.txt",
332 | );
333 | runOnlyForDeploymentPostprocessing = 0;
334 | shellPath = /bin/sh;
335 | 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";
336 | showEnvVarsInLog = 0;
337 | };
338 | C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = {
339 | isa = PBXShellScriptBuildPhase;
340 | buildActionMask = 2147483647;
341 | files = (
342 | );
343 | inputFileListPaths = (
344 | );
345 | inputPaths = (
346 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
347 | "${PODS_ROOT}/Manifest.lock",
348 | );
349 | name = "[CP] Check Pods Manifest.lock";
350 | outputFileListPaths = (
351 | );
352 | outputPaths = (
353 | "$(DERIVED_FILE_DIR)/Pods-Sample-checkManifestLockResult.txt",
354 | );
355 | runOnlyForDeploymentPostprocessing = 0;
356 | shellPath = /bin/sh;
357 | 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";
358 | showEnvVarsInLog = 0;
359 | };
360 | C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = {
361 | isa = PBXShellScriptBuildPhase;
362 | buildActionMask = 2147483647;
363 | files = (
364 | );
365 | inputFileListPaths = (
366 | "${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
367 | );
368 | name = "[CP] Embed Pods Frameworks";
369 | outputFileListPaths = (
370 | "${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
371 | );
372 | runOnlyForDeploymentPostprocessing = 0;
373 | shellPath = /bin/sh;
374 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-frameworks.sh\"\n";
375 | showEnvVarsInLog = 0;
376 | };
377 | E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = {
378 | isa = PBXShellScriptBuildPhase;
379 | buildActionMask = 2147483647;
380 | files = (
381 | );
382 | inputFileListPaths = (
383 | "${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-resources-${CONFIGURATION}-input-files.xcfilelist",
384 | );
385 | name = "[CP] Copy Pods Resources";
386 | outputFileListPaths = (
387 | "${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-resources-${CONFIGURATION}-output-files.xcfilelist",
388 | );
389 | runOnlyForDeploymentPostprocessing = 0;
390 | shellPath = /bin/sh;
391 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n";
392 | showEnvVarsInLog = 0;
393 | };
394 | F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = {
395 | isa = PBXShellScriptBuildPhase;
396 | buildActionMask = 2147483647;
397 | files = (
398 | );
399 | inputFileListPaths = (
400 | "${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-resources-${CONFIGURATION}-input-files.xcfilelist",
401 | );
402 | name = "[CP] Copy Pods Resources";
403 | outputFileListPaths = (
404 | "${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-resources-${CONFIGURATION}-output-files.xcfilelist",
405 | );
406 | runOnlyForDeploymentPostprocessing = 0;
407 | shellPath = /bin/sh;
408 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Sample-SampleTests/Pods-Sample-SampleTests-resources.sh\"\n";
409 | showEnvVarsInLog = 0;
410 | };
411 | FD10A7F022414F080027D42C /* Start Packager */ = {
412 | isa = PBXShellScriptBuildPhase;
413 | buildActionMask = 2147483647;
414 | files = (
415 | );
416 | inputFileListPaths = (
417 | );
418 | inputPaths = (
419 | );
420 | name = "Start Packager";
421 | outputFileListPaths = (
422 | );
423 | outputPaths = (
424 | );
425 | runOnlyForDeploymentPostprocessing = 0;
426 | shellPath = /bin/sh;
427 | 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";
428 | showEnvVarsInLog = 0;
429 | };
430 | /* End PBXShellScriptBuildPhase section */
431 |
432 | /* Begin PBXSourcesBuildPhase section */
433 | 00E356EA1AD99517003FC87E /* Sources */ = {
434 | isa = PBXSourcesBuildPhase;
435 | buildActionMask = 2147483647;
436 | files = (
437 | 00E356F31AD99517003FC87E /* SampleTests.m in Sources */,
438 | DC9B1C96433FB25EB9FDAA59 /* ExpoModulesProvider.swift in Sources */,
439 | );
440 | runOnlyForDeploymentPostprocessing = 0;
441 | };
442 | 13B07F871A680F5B00A75B9A /* Sources */ = {
443 | isa = PBXSourcesBuildPhase;
444 | buildActionMask = 2147483647;
445 | files = (
446 | 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
447 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
448 | 6BC23BCB58CE0342B3EC3F7C /* ExpoModulesProvider.swift in Sources */,
449 | );
450 | runOnlyForDeploymentPostprocessing = 0;
451 | };
452 | /* End PBXSourcesBuildPhase section */
453 |
454 | /* Begin PBXTargetDependency section */
455 | 00E356F51AD99517003FC87E /* PBXTargetDependency */ = {
456 | isa = PBXTargetDependency;
457 | target = 13B07F861A680F5B00A75B9A /* Sample */;
458 | targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */;
459 | };
460 | /* End PBXTargetDependency section */
461 |
462 | /* Begin XCBuildConfiguration section */
463 | 00E356F61AD99517003FC87E /* Debug */ = {
464 | isa = XCBuildConfiguration;
465 | baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-Sample-SampleTests.debug.xcconfig */;
466 | buildSettings = {
467 | BUNDLE_LOADER = "$(TEST_HOST)";
468 | GCC_PREPROCESSOR_DEFINITIONS = (
469 | "DEBUG=1",
470 | "$(inherited)",
471 | );
472 | INFOPLIST_FILE = SampleTests/Info.plist;
473 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
474 | LD_RUNPATH_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "@executable_path/Frameworks",
477 | "@loader_path/Frameworks",
478 | );
479 | OTHER_LDFLAGS = (
480 | "-ObjC",
481 | "-lc++",
482 | "$(inherited)",
483 | );
484 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
485 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
486 | PRODUCT_NAME = "$(TARGET_NAME)";
487 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
488 | };
489 | name = Debug;
490 | };
491 | 00E356F71AD99517003FC87E /* Release */ = {
492 | isa = XCBuildConfiguration;
493 | baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-Sample-SampleTests.release.xcconfig */;
494 | buildSettings = {
495 | BUNDLE_LOADER = "$(TEST_HOST)";
496 | COPY_PHASE_STRIP = NO;
497 | INFOPLIST_FILE = SampleTests/Info.plist;
498 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
499 | LD_RUNPATH_SEARCH_PATHS = (
500 | "$(inherited)",
501 | "@executable_path/Frameworks",
502 | "@loader_path/Frameworks",
503 | );
504 | OTHER_LDFLAGS = (
505 | "-ObjC",
506 | "-lc++",
507 | "$(inherited)",
508 | );
509 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
510 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
511 | PRODUCT_NAME = "$(TARGET_NAME)";
512 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample";
513 | };
514 | name = Release;
515 | };
516 | 13B07F941A680F5B00A75B9A /* Debug */ = {
517 | isa = XCBuildConfiguration;
518 | baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-Sample.debug.xcconfig */;
519 | buildSettings = {
520 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
521 | CLANG_ENABLE_MODULES = YES;
522 | CURRENT_PROJECT_VERSION = 1;
523 | ENABLE_BITCODE = NO;
524 | INFOPLIST_FILE = Sample/Info.plist;
525 | LD_RUNPATH_SEARCH_PATHS = (
526 | "$(inherited)",
527 | "@executable_path/Frameworks",
528 | );
529 | MARKETING_VERSION = 1.0;
530 | OTHER_LDFLAGS = (
531 | "$(inherited)",
532 | "-ObjC",
533 | "-lc++",
534 | );
535 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
536 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
537 | PRODUCT_NAME = Sample;
538 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
539 | SWIFT_VERSION = 5.0;
540 | VERSIONING_SYSTEM = "apple-generic";
541 | };
542 | name = Debug;
543 | };
544 | 13B07F951A680F5B00A75B9A /* Release */ = {
545 | isa = XCBuildConfiguration;
546 | baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-Sample.release.xcconfig */;
547 | buildSettings = {
548 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
549 | CLANG_ENABLE_MODULES = YES;
550 | CURRENT_PROJECT_VERSION = 1;
551 | INFOPLIST_FILE = Sample/Info.plist;
552 | LD_RUNPATH_SEARCH_PATHS = (
553 | "$(inherited)",
554 | "@executable_path/Frameworks",
555 | );
556 | MARKETING_VERSION = 1.0;
557 | OTHER_LDFLAGS = (
558 | "$(inherited)",
559 | "-ObjC",
560 | "-lc++",
561 | );
562 | OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
563 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
564 | PRODUCT_NAME = Sample;
565 | SWIFT_VERSION = 5.0;
566 | VERSIONING_SYSTEM = "apple-generic";
567 | };
568 | name = Release;
569 | };
570 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
571 | isa = XCBuildConfiguration;
572 | buildSettings = {
573 | ALWAYS_SEARCH_USER_PATHS = NO;
574 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
575 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
576 | CLANG_CXX_LIBRARY = "libc++";
577 | CLANG_ENABLE_MODULES = YES;
578 | CLANG_ENABLE_OBJC_ARC = YES;
579 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
580 | CLANG_WARN_BOOL_CONVERSION = YES;
581 | CLANG_WARN_COMMA = YES;
582 | CLANG_WARN_CONSTANT_CONVERSION = YES;
583 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
584 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
585 | CLANG_WARN_EMPTY_BODY = YES;
586 | CLANG_WARN_ENUM_CONVERSION = YES;
587 | CLANG_WARN_INFINITE_RECURSION = YES;
588 | CLANG_WARN_INT_CONVERSION = YES;
589 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
590 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
591 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
592 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
593 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
594 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
595 | CLANG_WARN_STRICT_PROTOTYPES = YES;
596 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
597 | CLANG_WARN_UNREACHABLE_CODE = YES;
598 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
599 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
600 | COPY_PHASE_STRIP = NO;
601 | ENABLE_STRICT_OBJC_MSGSEND = YES;
602 | ENABLE_TESTABILITY = YES;
603 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
604 | GCC_C_LANGUAGE_STANDARD = gnu99;
605 | GCC_DYNAMIC_NO_PIC = NO;
606 | GCC_NO_COMMON_BLOCKS = YES;
607 | GCC_OPTIMIZATION_LEVEL = 0;
608 | GCC_PREPROCESSOR_DEFINITIONS = (
609 | "DEBUG=1",
610 | "$(inherited)",
611 | );
612 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
613 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
614 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
615 | GCC_WARN_UNDECLARED_SELECTOR = YES;
616 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
617 | GCC_WARN_UNUSED_FUNCTION = YES;
618 | GCC_WARN_UNUSED_VARIABLE = YES;
619 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
620 | LD_RUNPATH_SEARCH_PATHS = (
621 | /usr/lib/swift,
622 | "$(inherited)",
623 | );
624 | LIBRARY_SEARCH_PATHS = (
625 | "\"$(SDKROOT)/usr/lib/swift\"",
626 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
627 | "\"$(inherited)\"",
628 | );
629 | MTL_ENABLE_DEBUG_INFO = YES;
630 | ONLY_ACTIVE_ARCH = YES;
631 | OTHER_CPLUSPLUSFLAGS = (
632 | "$(OTHER_CFLAGS)",
633 | "-DFOLLY_NO_CONFIG",
634 | "-DFOLLY_MOBILE=1",
635 | "-DFOLLY_USE_LIBCPP=1",
636 | );
637 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
638 | SDKROOT = iphoneos;
639 | };
640 | name = Debug;
641 | };
642 | 83CBBA211A601CBA00E9B192 /* Release */ = {
643 | isa = XCBuildConfiguration;
644 | buildSettings = {
645 | ALWAYS_SEARCH_USER_PATHS = NO;
646 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
647 | CLANG_CXX_LANGUAGE_STANDARD = "c++17";
648 | CLANG_CXX_LIBRARY = "libc++";
649 | CLANG_ENABLE_MODULES = YES;
650 | CLANG_ENABLE_OBJC_ARC = YES;
651 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
652 | CLANG_WARN_BOOL_CONVERSION = YES;
653 | CLANG_WARN_COMMA = YES;
654 | CLANG_WARN_CONSTANT_CONVERSION = YES;
655 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
656 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
657 | CLANG_WARN_EMPTY_BODY = YES;
658 | CLANG_WARN_ENUM_CONVERSION = YES;
659 | CLANG_WARN_INFINITE_RECURSION = YES;
660 | CLANG_WARN_INT_CONVERSION = YES;
661 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
662 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
663 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
664 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
665 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
666 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
667 | CLANG_WARN_STRICT_PROTOTYPES = YES;
668 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
669 | CLANG_WARN_UNREACHABLE_CODE = YES;
670 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
671 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
672 | COPY_PHASE_STRIP = YES;
673 | ENABLE_NS_ASSERTIONS = NO;
674 | ENABLE_STRICT_OBJC_MSGSEND = YES;
675 | "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
676 | GCC_C_LANGUAGE_STANDARD = gnu99;
677 | GCC_NO_COMMON_BLOCKS = YES;
678 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
679 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
680 | GCC_WARN_UNDECLARED_SELECTOR = YES;
681 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
682 | GCC_WARN_UNUSED_FUNCTION = YES;
683 | GCC_WARN_UNUSED_VARIABLE = YES;
684 | IPHONEOS_DEPLOYMENT_TARGET = 13.0;
685 | LD_RUNPATH_SEARCH_PATHS = (
686 | /usr/lib/swift,
687 | "$(inherited)",
688 | );
689 | LIBRARY_SEARCH_PATHS = (
690 | "\"$(SDKROOT)/usr/lib/swift\"",
691 | "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
692 | "\"$(inherited)\"",
693 | );
694 | MTL_ENABLE_DEBUG_INFO = NO;
695 | OTHER_CPLUSPLUSFLAGS = (
696 | "$(OTHER_CFLAGS)",
697 | "-DFOLLY_NO_CONFIG",
698 | "-DFOLLY_MOBILE=1",
699 | "-DFOLLY_USE_LIBCPP=1",
700 | );
701 | REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
702 | SDKROOT = iphoneos;
703 | VALIDATE_PRODUCT = YES;
704 | };
705 | name = Release;
706 | };
707 | /* End XCBuildConfiguration section */
708 |
709 | /* Begin XCConfigurationList section */
710 | 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "SampleTests" */ = {
711 | isa = XCConfigurationList;
712 | buildConfigurations = (
713 | 00E356F61AD99517003FC87E /* Debug */,
714 | 00E356F71AD99517003FC87E /* Release */,
715 | );
716 | defaultConfigurationIsVisible = 0;
717 | defaultConfigurationName = Release;
718 | };
719 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Sample" */ = {
720 | isa = XCConfigurationList;
721 | buildConfigurations = (
722 | 13B07F941A680F5B00A75B9A /* Debug */,
723 | 13B07F951A680F5B00A75B9A /* Release */,
724 | );
725 | defaultConfigurationIsVisible = 0;
726 | defaultConfigurationName = Release;
727 | };
728 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "Sample" */ = {
729 | isa = XCConfigurationList;
730 | buildConfigurations = (
731 | 83CBBA201A601CBA00E9B192 /* Debug */,
732 | 83CBBA211A601CBA00E9B192 /* Release */,
733 | );
734 | defaultConfigurationIsVisible = 0;
735 | defaultConfigurationName = Release;
736 | };
737 | /* End XCConfigurationList section */
738 | };
739 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
740 | }
741 |
--------------------------------------------------------------------------------
/Sample/ios/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
53 |
55 |
61 |
62 |
63 |
64 |
70 |
72 |
78 |
79 |
80 |
81 |
83 |
84 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/Sample/ios/Sample.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 | @interface AppDelegate : EXAppDelegateWrapper
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/AppDelegate.mm:
--------------------------------------------------------------------------------
1 | #import "AppDelegate.h"
2 |
3 | #import
4 |
5 | @implementation AppDelegate
6 |
7 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
8 | {
9 | self.moduleName = @"Sample";
10 | // You can add your custom initial props in the dictionary below.
11 | // They will be passed down to the ViewController used by React Native.
12 | self.initialProps = @{};
13 |
14 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
15 | }
16 |
17 | - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
18 | {
19 | #if DEBUG
20 | return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
21 | #else
22 | return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
23 | #endif
24 | }
25 |
26 | /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
27 | ///
28 | /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
29 | /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
30 | /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
31 | - (BOOL)concurrentRootEnabled
32 | {
33 | return true;
34 | }
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "scale" : "1x",
46 | "size" : "1024x1024"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/Images.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | Sample
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 | $(MARKETING_VERSION)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(CURRENT_PROJECT_VERSION)
25 | LSRequiresIPhoneOS
26 |
27 | NSAppTransportSecurity
28 |
29 | NSExceptionDomains
30 |
31 | localhost
32 |
33 | NSExceptionAllowsInsecureHTTPLoads
34 |
35 |
36 |
37 |
38 | NSLocationWhenInUseUsageDescription
39 |
40 | UILaunchStoryboardName
41 | LaunchScreen
42 | UIRequiredDeviceCapabilities
43 |
44 | armv7
45 |
46 | UISupportedInterfaceOrientations
47 |
48 | UIInterfaceOrientationPortrait
49 | UIInterfaceOrientationLandscapeLeft
50 | UIInterfaceOrientationLandscapeRight
51 |
52 | UIViewControllerBasedStatusBarAppearance
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Sample/ios/Sample/main.m:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | @autoreleasepool {
8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Sample/ios/SampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Sample/ios/SampleTests/SampleTests.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import
5 | #import
6 |
7 | #define TIMEOUT_SECONDS 600
8 | #define TEXT_TO_LOOK_FOR @"Welcome to React"
9 |
10 | @interface SampleTests : XCTestCase
11 |
12 | @end
13 |
14 | @implementation SampleTests
15 |
16 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
17 | {
18 | if (test(view)) {
19 | return YES;
20 | }
21 | for (UIView *subview in [view subviews]) {
22 | if ([self findSubviewInView:subview matching:test]) {
23 | return YES;
24 | }
25 | }
26 | return NO;
27 | }
28 |
29 | - (void)testRendersWelcomeScreen
30 | {
31 | UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
32 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
33 | BOOL foundElement = NO;
34 |
35 | __block NSString *redboxError = nil;
36 | #ifdef DEBUG
37 | RCTSetLogFunction(
38 | ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
39 | if (level >= RCTLogLevelError) {
40 | redboxError = message;
41 | }
42 | });
43 | #endif
44 |
45 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
46 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
47 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
48 |
49 | foundElement = [self findSubviewInView:vc.view
50 | matching:^BOOL(UIView *view) {
51 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
52 | return YES;
53 | }
54 | return NO;
55 | }];
56 | }
57 |
58 | #ifdef DEBUG
59 | RCTSetLogFunction(RCTDefaultLogFunction);
60 | #endif
61 |
62 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
63 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/Sample/metro.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Metro configuration for React Native
3 | * https://github.com/facebook/react-native
4 | *
5 | * @format
6 | */
7 |
8 | module.exports = {
9 | transformer: {
10 | getTransformOptions: async () => ({
11 | transform: {
12 | experimentalImportSupport: false,
13 | inlineRequires: true,
14 | },
15 | }),
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/Sample/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Sample",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "android": "react-native run-android",
7 | "ios": "react-native run-ios",
8 | "lint": "eslint .",
9 | "start": "react-native start",
10 | "test": "jest"
11 | },
12 | "dependencies": {
13 | "expo": "^48.0.0",
14 | "expo-linear-gradient": "^12.1.2",
15 | "expo-status-bar": "^1.4.4",
16 | "react": "18.2.0",
17 | "react-native": "0.71.6",
18 | "react-native-gradient-shimmer": "file:../",
19 | "react-native-linear-gradient": "^2.6.2"
20 | },
21 | "devDependencies": {
22 | "@babel/core": "^7.20.0",
23 | "@babel/preset-env": "^7.20.0",
24 | "@babel/runtime": "^7.20.0",
25 | "@react-native-community/eslint-config": "^3.2.0",
26 | "@tsconfig/react-native": "^2.0.2",
27 | "@types/jest": "^29.2.1",
28 | "@types/react": "^18.0.24",
29 | "@types/react-test-renderer": "^18.0.0",
30 | "babel-jest": "^29.2.1",
31 | "eslint": "^8.19.0",
32 | "jest": "^29.2.1",
33 | "metro-react-native-babel-preset": "0.73.9",
34 | "prettier": "^2.4.1",
35 | "react-test-renderer": "18.2.0",
36 | "typescript": "4.8.4"
37 | },
38 | "jest": {
39 | "preset": "react-native"
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Sample/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@tsconfig/react-native/tsconfig.json"
3 | }
4 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: ['module:metro-react-native-babel-preset'],
3 | };
4 |
--------------------------------------------------------------------------------
/dist/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/dist/.gitkeep
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-gradient-shimmer",
3 | "displayName": "React-Native Gradient Renderer",
4 | "version": "2.0.1",
5 | "description": "⚛ A pure JavaScript, performant, typed shimmer component for Android and iOS.",
6 | "main": "src",
7 | "license": "MIT",
8 | "private": false,
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/douglasjunior/react-native-gradient-shimmer.git"
12 | },
13 | "keywords": [
14 | "react-native",
15 | "android",
16 | "ios",
17 | "web",
18 | "shimmer",
19 | "skeleton",
20 | "animated",
21 | "linear-gradient"
22 | ],
23 | "author": {
24 | "name": "Douglas Nassif Roma Junior",
25 | "email": "nassifrroma@gmail.com",
26 | "url": "https://github.com/douglasjunior"
27 | },
28 | "bugs": {
29 | "url": "https://github.com/douglasjunior/react-native-gradient-shimmer/issues"
30 | },
31 | "homepage": "https://github.com/douglasjunior/react-native-gradient-shimmer",
32 | "scripts": {
33 | "build": "tsc",
34 | "publish-script": "node scripts/publish.js"
35 | },
36 | "peerDependencies": {
37 | "react-native": ">=0.60"
38 | },
39 | "devDependencies": {
40 | "@babel/core": "^7.20.0",
41 | "@babel/preset-env": "^7.20.0",
42 | "@babel/runtime": "^7.20.0",
43 | "@react-native-community/eslint-config": "^3.2.0",
44 | "@tsconfig/react-native": "^2.0.2",
45 | "@types/jest": "^29.2.1",
46 | "@types/react": "^18.0.24",
47 | "@types/react-test-renderer": "^18.0.0",
48 | "babel-jest": "^29.2.1",
49 | "eslint": "^8.19.0",
50 | "jest": "^29.2.1",
51 | "metro-react-native-babel-preset": "0.73.8",
52 | "prettier": "^2.4.1",
53 | "react": "18.2.0",
54 | "react-native": "0.71.4",
55 | "react-test-renderer": "18.2.0",
56 | "typescript": "4.8.4"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/screenshots/android.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/screenshots/android.gif
--------------------------------------------------------------------------------
/screenshots/ios.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/screenshots/ios.gif
--------------------------------------------------------------------------------
/screenshots/web.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/douglasjunior/react-native-gradient-shimmer/5b6b0f08641908cd87c931fcbc6d7ef9979696bb/screenshots/web.gif
--------------------------------------------------------------------------------
/scripts/publish.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const fs = require('fs');
3 | const child_process = require('child_process');
4 |
5 | const packageJson = require('../package.json');
6 |
7 | packageJson.main = 'dist';
8 | packageJson.types = 'dist';
9 |
10 | const packageJsonPath = path.resolve(__dirname, '..', 'package.json');
11 |
12 | const content = JSON.stringify(packageJson, null, 2) + '\n';
13 |
14 | child_process.execSync('npm run build');
15 |
16 | fs.writeFileSync(packageJsonPath, content, {
17 | encoding: 'utf-8',
18 | });
19 |
20 | try {
21 | child_process.execSync('npm publish');
22 | } catch (err) {
23 | console.error(err);
24 | }
25 |
26 | child_process.execSync('git checkout -- "' + packageJsonPath + '"');
27 |
--------------------------------------------------------------------------------
/src/AnimationProvider.tsx:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import React, {
24 | PropsWithChildren,
25 | useCallback,
26 | useEffect,
27 | useMemo,
28 | useState,
29 | } from 'react';
30 | import {Animated} from 'react-native';
31 |
32 | type AnimationContextType = {
33 | registerAnimation: (
34 | animationId: string,
35 | animation?: Animated.CompositeAnimation,
36 | ) => void;
37 | };
38 |
39 | export const AnimationContext = React.createContext<
40 | AnimationContextType | undefined
41 | >(undefined);
42 |
43 | type AnimationProviderPropsType = PropsWithChildren<{
44 | animating?: boolean;
45 | }>;
46 |
47 | const AnimationProvider = ({
48 | children,
49 | animating = true,
50 | }: AnimationProviderPropsType) => {
51 | const [animations, setAnimations] = useState<
52 | Record
53 | >({});
54 |
55 | const registerAnimation = useCallback(
56 | (animationId: string, animation?: Animated.CompositeAnimation) => {
57 | setAnimations(prev => {
58 | const copy = {...prev};
59 | if (animation) {
60 | copy[animationId] = animation;
61 | } else {
62 | delete copy[animationId];
63 | }
64 | return copy;
65 | });
66 | },
67 | [],
68 | );
69 |
70 | useEffect(() => {
71 | if (!animating) {
72 | return undefined;
73 | }
74 |
75 | const animationValues = Object.values(animations);
76 |
77 | if (!animationValues.length) {
78 | return undefined;
79 | }
80 |
81 | const animation = Animated.loop(
82 | Animated.parallel(animationValues, {
83 | stopTogether: true,
84 | }),
85 | );
86 |
87 | animation.start();
88 |
89 | return () => {
90 | animation.stop();
91 | };
92 | }, [animations, animating]);
93 |
94 | const animatedValue = useMemo(
95 | () => ({
96 | registerAnimation,
97 | }),
98 | [registerAnimation],
99 | );
100 |
101 | return (
102 |
103 | {children}
104 |
105 | );
106 | };
107 |
108 | export default AnimationProvider;
109 |
--------------------------------------------------------------------------------
/src/BaseLinearGradient.tsx:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import React, {ComponentType, PureComponent} from 'react';
24 | import {Animated, StyleProp, ViewStyle} from 'react-native';
25 |
26 | import {LinearGradientPropsType} from './types';
27 |
28 | export type BaseLinearGradientPropsType = {
29 | LinearGradient: ComponentType;
30 | style: Animated.AnimatedProps> | StyleProp;
31 | backgroundColor: string;
32 | highlightColor: string;
33 | };
34 |
35 | class BaseLinearGradient extends PureComponent {
36 | private readonly start = {
37 | x: 0,
38 | y: 0,
39 | };
40 |
41 | private readonly end = {
42 | x: 1,
43 | y: 0,
44 | };
45 |
46 | render() {
47 | const {style, LinearGradient, backgroundColor, highlightColor} = this.props;
48 |
49 | return (
50 |
61 | );
62 | }
63 | }
64 |
65 | export default Animated.createAnimatedComponent(BaseLinearGradient);
66 |
--------------------------------------------------------------------------------
/src/GradientShimmer.tsx:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import React, {
24 | ComponentType,
25 | memo,
26 | useContext,
27 | useEffect,
28 | useId,
29 | useMemo,
30 | useRef,
31 | } from 'react';
32 | import {
33 | Animated,
34 | Easing,
35 | EasingFunction,
36 | StyleProp,
37 | StyleSheet,
38 | View,
39 | ViewStyle,
40 | } from 'react-native';
41 |
42 | import {AnimationContext} from './AnimationProvider';
43 | import BaseLinearGradient from './BaseLinearGradient';
44 | import {LinearGradientPropsType} from './types';
45 |
46 | export type GradientShimmerPropsType = {
47 | testID?: string;
48 | /**
49 | * Linear gradient component from `expo-linear-gradient` or `react-native-linear-gradient`
50 | */
51 | LinearGradientComponent: ComponentType;
52 | /**
53 | * Component `width` in DPI
54 | */
55 | width: number;
56 | /**
57 | * Component `height` in DPI
58 | */
59 | height: number;
60 | /**
61 | * Styles passed to the LinearGradient component
62 | */
63 | style?: StyleProp;
64 | /**
65 | * Background color in HEX or RGB
66 | */
67 | backgroundColor?: string;
68 | /**
69 | * Highlight color in HEX or RGB
70 | */
71 | highlightColor?: string;
72 | /**
73 | * The size of the highlight effect in DPI
74 | */
75 | highlightWidth?: number;
76 | /**
77 | * Duration of the animation in milliseconds
78 | */
79 | duration?: number;
80 | /**
81 | * Start or stop de animation
82 | */
83 | animating?: boolean;
84 | /**
85 | * Easing function used by `Animated.timing()` to convey physically believable motion in animations. Read more at https://reactnative.dev/docs/easing
86 | */
87 | easing?: EasingFunction;
88 | };
89 |
90 | const isRealPositiveNumber = (value: unknown): value is number => {
91 | return Boolean(
92 | typeof value === 'number' && Number.isFinite(value) && value > 0,
93 | );
94 | };
95 |
96 | export const gradientShimmerDefaultProps = {
97 | duration: 1500,
98 | highlightWidth: 200,
99 | highlightColor: 'rgb(210,210,210)',
100 | backgroundColor: 'rgb(200,200,200)',
101 | animating: true,
102 | easing: Easing.linear,
103 | };
104 |
105 | const GradientShimmer = ({
106 | duration = gradientShimmerDefaultProps.duration,
107 | highlightWidth = gradientShimmerDefaultProps.highlightWidth,
108 | highlightColor = gradientShimmerDefaultProps.highlightColor,
109 | backgroundColor = gradientShimmerDefaultProps.backgroundColor,
110 | animating = gradientShimmerDefaultProps.animating,
111 | easing = gradientShimmerDefaultProps.easing,
112 | testID = undefined,
113 | style = undefined,
114 | height,
115 | width,
116 | LinearGradientComponent,
117 | }: GradientShimmerPropsType): JSX.Element => {
118 | const {registerAnimation} = useContext(AnimationContext) || {};
119 | const componentId = useId();
120 |
121 | const startPosition = 0 - highlightWidth;
122 |
123 | const position = useRef(new Animated.Value(startPosition));
124 |
125 | const containerStyles = useMemo(() => {
126 | const styles: StyleProp[] = [
127 | style,
128 | {
129 | overflow: 'hidden',
130 | backgroundColor,
131 | height,
132 | width,
133 | },
134 | ];
135 | return StyleSheet.flatten(styles);
136 | }, [height, style, width, backgroundColor]);
137 |
138 | const linearLayoutStyles: Animated.AnimatedProps> =
139 | useMemo(
140 | () => ({
141 | position: 'absolute',
142 | top: 0,
143 | bottom: 0,
144 | left: 0,
145 | width: highlightWidth,
146 | transform: [
147 | {
148 | translateX: position.current,
149 | },
150 | ],
151 | }),
152 | [highlightWidth],
153 | );
154 |
155 | const calculatedWidth = useMemo(() => {
156 | const {width: flatWidth} = containerStyles;
157 |
158 | if (!isRealPositiveNumber(flatWidth)) {
159 | console.error(
160 | 'GradientShimmer requires `width` to be real positive numbers.',
161 | );
162 | return 100;
163 | }
164 |
165 | return flatWidth;
166 | }, [containerStyles]);
167 |
168 | const endPosition = calculatedWidth + highlightWidth;
169 |
170 | useEffect(() => {
171 | position.current.setValue(startPosition);
172 |
173 | if (!animating) {
174 | return undefined;
175 | }
176 |
177 | const animation = Animated.sequence([
178 | Animated.timing(position.current, {
179 | toValue: endPosition,
180 | duration: duration,
181 | easing,
182 | useNativeDriver: true,
183 | }),
184 | Animated.timing(position.current, {
185 | toValue: startPosition,
186 | duration: 0,
187 | useNativeDriver: true,
188 | }),
189 | ]);
190 |
191 | if (registerAnimation) {
192 | registerAnimation?.(componentId, animation);
193 |
194 | return () => {
195 | registerAnimation?.(componentId, undefined);
196 | };
197 | }
198 |
199 | const loop = Animated.loop(animation);
200 |
201 | loop.start();
202 |
203 | return () => {
204 | loop.stop();
205 | };
206 | }, [
207 | animating,
208 | duration,
209 | startPosition,
210 | endPosition,
211 | easing,
212 | registerAnimation,
213 | componentId,
214 | ]);
215 |
216 | return (
217 |
218 |
224 |
225 | );
226 | };
227 |
228 | export default memo(GradientShimmer);
229 |
--------------------------------------------------------------------------------
/src/ShimmerLayout.tsx:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import React, {memo, useMemo} from 'react';
24 | import {StyleProp, View, ViewStyle} from 'react-native';
25 |
26 | import AnimationProvider from './AnimationProvider';
27 | import GradientShimmer, {GradientShimmerPropsType} from './GradientShimmer';
28 |
29 | type CommonLayoutType = {
30 | /**
31 | * Styles passed to the internal component
32 | */
33 | style?: StyleProp;
34 | /**
35 | * Margin left applied to style
36 | */
37 | marginLeft?: ViewStyle['marginLeft'];
38 | /**
39 | * Margin right applied to style
40 | */
41 | marginRight?: ViewStyle['marginRight'];
42 | /**
43 | * Margin top applied to style
44 | */
45 | marginTop?: ViewStyle['marginTop'];
46 | /**
47 | * Margin bottom applied to style
48 | */
49 | marginBottom?: ViewStyle['marginBottom'];
50 | };
51 |
52 | export type ShimmerLayoutItemType = CommonLayoutType & {
53 | /**
54 | * Component `width` in DPI
55 | */
56 | width: number;
57 | /**
58 | * Component `height` in DPI
59 | */
60 | height: number;
61 | };
62 |
63 | export type ShimmerLayoutContainerType = CommonLayoutType & {
64 | /**
65 | * FlexBox flexDirection
66 | */
67 | flexDirection?: ViewStyle['flexDirection'];
68 | /**
69 | * FlexBox alignItems
70 | */
71 | alignItems?: ViewStyle['alignItems'];
72 | /**
73 | * FlexBox justifyContent
74 | */
75 | justifyContent?: ViewStyle['justifyContent'];
76 | /**
77 | * Set the gaps (gutters) between rows and columns
78 | */
79 | gap?: ViewStyle['gap'];
80 | /**
81 | * Set the size of the gap (gutter) between an element's rows
82 | */
83 | rowGap?: ViewStyle['rowGap'];
84 | /**
85 | * Set the size of the gap (gutter) between an element's columns.
86 | */
87 | columnGap?: ViewStyle['columnGap'];
88 | /**
89 | * Children content layout
90 | */
91 | content: Array;
92 | };
93 |
94 | export type ShimmerLayoutPropsType = Omit<
95 | GradientShimmerPropsType,
96 | 'width' | 'height' | 'style'
97 | > & {
98 | /**
99 | * Layout config tree
100 | */
101 | layout: ShimmerLayoutContainerType;
102 | defaultShimmerProps?: Omit<
103 | Partial,
104 | 'LinearGradientComponent'
105 | >;
106 | };
107 |
108 | const isShimmerContainer = (
109 | item: ShimmerLayoutItemType | ShimmerLayoutContainerType,
110 | ): item is ShimmerLayoutContainerType => {
111 | return 'content' in item;
112 | };
113 |
114 | type LayoutItemPropsType = Omit & {
115 | item: ShimmerLayoutItemType | ShimmerLayoutContainerType;
116 | };
117 |
118 | const LayoutItem = ({
119 | item,
120 | defaultShimmerProps,
121 | ...shimmerProps
122 | }: LayoutItemPropsType) => {
123 | const itemStyles = useMemo(
124 | () => [
125 | defaultShimmerProps?.style,
126 | typeof item.marginTop === 'number' ? {marginTop: item.marginTop} : null,
127 | typeof item.marginLeft === 'number'
128 | ? {marginLeft: item.marginLeft}
129 | : null,
130 | typeof item.marginRight === 'number'
131 | ? {marginRight: item.marginRight}
132 | : null,
133 | typeof item.marginBottom === 'number'
134 | ? {marginBottom: item.marginBottom}
135 | : null,
136 | item.style,
137 | ],
138 | [
139 | defaultShimmerProps?.style,
140 | item.marginBottom,
141 | item.marginLeft,
142 | item.marginRight,
143 | item.marginTop,
144 | item.style,
145 | ],
146 | );
147 |
148 | if (isShimmerContainer(item)) {
149 | return (
150 |
155 | );
156 | }
157 |
158 | return (
159 |
166 | );
167 | };
168 |
169 | const ShimmerLayout = ({
170 | testID,
171 | layout,
172 | ...shimmerProps
173 | }: ShimmerLayoutPropsType) => {
174 | const renderShimmerItem = (
175 | item: ShimmerLayoutItemType | ShimmerLayoutContainerType,
176 | index: number,
177 | ) => {
178 | return ;
179 | };
180 |
181 | return (
182 |
199 | {layout.content.map(renderShimmerItem)}
200 |
201 | );
202 | };
203 |
204 | const ShimmerLayoutWithProvider = (props: ShimmerLayoutPropsType) => {
205 | return (
206 |
207 |
208 |
209 | );
210 | };
211 |
212 | export default memo(ShimmerLayoutWithProvider);
213 |
--------------------------------------------------------------------------------
/src/createGradientShimmer.tsx:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | import React, {FunctionComponent, memo} from 'react';
24 |
25 | import GradientShimmer, {
26 | GradientShimmerPropsType,
27 | gradientShimmerDefaultProps,
28 | } from './GradientShimmer';
29 |
30 | /**
31 | * Create your own GradientShimmer instance with default props
32 | */
33 | function createGradientShimmer<
34 | FixedProps extends Partial,
35 | >(fixedProps: FixedProps) {
36 | type NonFixedProps = Partial &
37 | Omit;
38 |
39 | const GradientShimmerWrapper = (
40 | props: GradientShimmerPropsType,
41 | ): JSX.Element => {
42 | return (
43 |
48 | );
49 | };
50 |
51 | return memo(
52 | GradientShimmerWrapper,
53 | ) as unknown as FunctionComponent;
54 | }
55 |
56 | export default createGradientShimmer;
57 |
--------------------------------------------------------------------------------
/src/index.ts:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | export {default} from './GradientShimmer';
24 | export type {GradientShimmerPropsType} from './GradientShimmer';
25 |
26 | export {default as ShimmerLayout} from './ShimmerLayout';
27 | export type {
28 | ShimmerLayoutPropsType,
29 | ShimmerLayoutContainerType,
30 | ShimmerLayoutItemType,
31 | } from './ShimmerLayout';
32 |
33 | export {default as createGradientShimmer} from './createGradientShimmer';
34 | export {default as AnimationProvider} from './AnimationProvider';
35 |
--------------------------------------------------------------------------------
/src/types.ts:
--------------------------------------------------------------------------------
1 | // MIT License
2 | //
3 | // Copyright (c) 2023 Douglas Nassif Roma Junior
4 | //
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy
6 | // of this software and associated documentation files (the "Software"), to deal
7 | // in the Software without restriction, including without limitation the rights
8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | // copies of the Software, and to permit persons to whom the Software is
10 | // furnished to do so, subject to the following conditions:
11 | //
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 | //
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | export type LinearGradientPropsType = {
24 | colors: any;
25 | style?: any;
26 | start?: any;
27 | end?: any;
28 | };
29 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "@tsconfig/react-native/tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "./dist",
5 | "noEmit": false,
6 | "declaration": true,
7 | "jsx": "react",
8 | "sourceMap": true,
9 | "removeComments": false
10 | },
11 | "include": ["src"],
12 | "exclude": ["node_modules", "**/__tests__/*"]
13 | }
14 |
--------------------------------------------------------------------------------