{"id":13702296,"url":"https://github.com/react-native-component/react-native-smart-splash-screen","last_synced_at":"2025-05-16T14:07:52.394Z","repository":{"id":43057332,"uuid":"65708984","full_name":"react-native-component/react-native-smart-splash-screen","owner":"react-native-component","description":"A smart splash screen for React Native apps","archived":false,"fork":false,"pushed_at":"2023-10-04T16:19:32.000Z","size":1689,"stargazers_count":488,"open_issues_count":59,"forks_count":109,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-13T02:06:55.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-component.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-15T06:13:12.000Z","updated_at":"2025-04-26T02:25:05.000Z","dependencies_parsed_at":"2024-01-08T08:01:31.700Z","dependency_job_id":"853249f0-9a84-4941-b82b-a99dcc4851a0","html_url":"https://github.com/react-native-component/react-native-smart-splash-screen","commit_stats":{"total_commits":81,"total_committers":8,"mean_commits":10.125,"dds":"0.18518518518518523","last_synced_commit":"08293d1ec269af912db1410daa2cec697ab49ee7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-component%2Freact-native-smart-splash-screen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-component%2Freact-native-smart-splash-screen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-component%2Freact-native-smart-splash-screen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-component%2Freact-native-smart-splash-screen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-component","download_url":"https://codeload.github.com/react-native-component/react-native-smart-splash-screen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:00:33.422Z","updated_at":"2025-05-16T14:07:47.385Z","avatar_url":"https://github.com/react-native-component.png","language":"Java","funding_links":[],"categories":["Java","Others"],"sub_categories":[],"readme":"# react-native-smart-splash-screen\n\n[![npm](https://img.shields.io/npm/v/react-native-smart-splash-screen.svg)](https://www.npmjs.com/package/react-native-smart-splash-screen)\n[![npm](https://img.shields.io/npm/dm/react-native-smart-splash-screen.svg)](https://www.npmjs.com/package/react-native-smart-splash-screen)\n[![npm](https://img.shields.io/npm/dt/react-native-smart-splash-screen.svg)](https://www.npmjs.com/package/react-native-smart-splash-screen)\n[![npm](https://img.shields.io/npm/l/react-native-smart-splash-screen.svg)](https://github.com/react-native-component/react-native-smart-splash-screen/blob/master/LICENSE)\n\nA smart splash screen for React Native apps, written in JS, oc and java for cross-platform support.\nIt works on iOS and Android.\n\n## Preview\n\n![react-native-smart-splash-screen-ios-preview][1]\n![react-native-smart-splash-screen-android-preview][2]\n\n## Installation\n\n```\nnpm install react-native-smart-splash-screen --save\n```\n\n## Notice\n\nIt can only be used greater-than-equal react-native 0.4.0 for ios, if you want to use the package less-than react-native 0.4.0, use `npm install react-native-smart-splash-screen@untilRN0.40 --save`\n\n## Installation (iOS)\n\n* Drag RCTSplashScreen.xcodeproj to your project on Xcode.\n\n* Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTSplashScreen.a from the Products folder inside the RCTSplashScreen.xcodeproj.\n\n* Look for Header Search Paths and make sure it contains $(SRCROOT)/../../../react-native/React as recursive.\n\n* In your project, Look for Header Search Paths and make sure it contains $(SRCROOT)/../node_modules/react-native-smart-splash-screen/ios/RCTSplashScreen/RCTSplashScreen\n\n* delete your project's LaunchScreen.xib\n\n* Drag SplashScreenResource folder to your project *if you want change image, replace splash.png or add a image with your custom name*\n\n* In AppDelegate.m\n\n```\n\n...\n#import \"RCTSplashScreen.h\" //import interface\n...\nRCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation\n                                                  moduleName:@\"ReactNativeComponents\"\n                                           initialProperties:nil\n                                               launchOptions:launchOptions];\n\n//[RCTSplashScreen open:rootView];\n[RCTSplashScreen open:rootView withImageNamed:@\"splash\"]; // activate splashscreen, imagename from LaunchScreen.xib\n\nrootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];\n\nself.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];\nUIViewController *rootViewController = [UIViewController new];\nrootViewController.view = rootView;\nself.window.rootViewController = rootViewController;\n[self.window makeKeyAndVisible];\nreturn YES;\n\n```\n\n\n## Installation (Android)\n\n* In `android/settings.gradle`\n\n```\n...\ninclude ':react-native-smart-splashscreen'\nproject(':react-native-smart-splashscreen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-splash-screen/android')\n```\n\n* In `android/app/build.gradle`\n\n```\n...\ndependencies {\n    ...\n    // From node_modules\n    compile project(':react-native-smart-splashscreen')\n}\n```\n\n* Add your own `drawable/splash.png` to `android/app/src/main/res/`, it is recommended to add `drawable-?dpi` folders that you need.\n\n* in MainApplication.java\n\n```\n...\nimport com.reactnativecomponent.splashscreen.RCTSplashScreenPackage;    //import package\n...\n/**\n * A list of packages used by the app. If the app uses additional views\n * or modules besides the default ones, add more packages here.\n */\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n    return Arrays.\u003cReactPackage\u003easList(\n        new MainReactPackage(),\n        new RCTSplashScreenPackage()    //register Module\n    );\n}\n...\n\n```\n\n* in MainActivity.java\n```\n...\nimport com.reactnativecomponent.splashscreen.RCTSplashScreen;    //import RCTSplashScreen\n...\n@Override\nprotected void onCreate(Bundle savedInstanceState) {\n    RCTSplashScreen.openSplashScreen(this);   //open splashscreen\n    //RCTSplashScreen.openSplashScreen(this, true, ImageView.ScaleType.FIT_XY);   //open splashscreen fullscreen\n    super.onCreate(savedInstanceState);\n}\n```\n\n* In `android/app/**/styles.xml`\n\n```\n...\n\u003c!-- Base application theme. --\u003e\n\u003cstyle name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\"\u003e\n    \u003c!-- Customize your theme here. --\u003e\n    \u003citem name=\"android:windowIsTranslucent\"\u003etrue\u003c/item\u003e\n\u003c/style\u003e\n...\n```\n\n## Full Demo\n\nsee [ReactNativeComponentDemos][0]\n\n\n## Usage\n\n```js\n...\nimport SplashScreen from 'react-native-smart-splash-screen'\n...\ncomponentDidMount () {\n     //SplashScreen.close(SplashScreen.animationType.scale, 850, 500)\n     SplashScreen.close({\n        animationType: SplashScreen.animationType.scale,\n        duration: 850,\n        delay: 500,\n     })\n}\n...\n\n```\n\n## Method\n\n* close(animationType, duration, delay)\n  close splash screen with custom animation\n\n  * animationType: determine the type of animation. enum(animationType.none, animationType.fade, animationType.scale)\n  * duration: determine the duration of animation\n  * delay: determine the delay of animation\n\n\n[0]: https://github.com/cyqresig/ReactNativeComponentDemos\n[1]: http://cyqresig.github.io/img/react-native-smart-splash-screen-preview-ios-v2.3.0.gif\n[2]: http://cyqresig.github.io/img/react-native-smart-splash-screen-preview-android-v2.3.0.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-component%2Freact-native-smart-splash-screen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-component%2Freact-native-smart-splash-screen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-component%2Freact-native-smart-splash-screen/lists"}