{"id":13472737,"url":"https://github.com/avishayil/react-native-restart","last_synced_at":"2025-05-14T15:09:20.634Z","repository":{"id":9842316,"uuid":"63517556","full_name":"avishayil/react-native-restart","owner":"avishayil","description":"React Native Package With One Purpose: To Restart Your React Native Project","archived":false,"fork":false,"pushed_at":"2024-07-21T11:50:06.000Z","size":2084,"stargazers_count":953,"open_issues_count":16,"forks_count":153,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-10T18:56:16.029Z","etag":null,"topics":["android","bundle","ios","react-native","reload","restart"],"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/avishayil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-17T06:11:54.000Z","updated_at":"2025-03-28T18:40:25.000Z","dependencies_parsed_at":"2024-06-18T12:18:39.934Z","dependency_job_id":"93af5adf-201a-41b9-8ff5-51ed690c2c37","html_url":"https://github.com/avishayil/react-native-restart","commit_stats":{"total_commits":135,"total_committers":34,"mean_commits":"3.9705882352941178","dds":0.4666666666666667,"last_synced_commit":"da00733f7525f7b9801d203f3fa602bc7578cd7d"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Freact-native-restart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Freact-native-restart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Freact-native-restart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avishayil%2Freact-native-restart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avishayil","download_url":"https://codeload.github.com/avishayil/react-native-restart/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647222,"owners_count":21139086,"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":["android","bundle","ios","react-native","reload","restart"],"created_at":"2024-07-31T16:00:57.531Z","updated_at":"2025-04-13T18:25:26.469Z","avatar_url":"https://github.com/avishayil.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"\u003cimg src=\"./images/standwithisrael.png\" title=\"Israel\" width=\"780\"\u003e\n\n**On October 7th, 2023 Hamas terrorists launched a unilateral attack on Israel, brutally killing thousands of civilians, including infants and children, taking 240 hostages, and injuring thousands more.**\n\n**MORE THAN 110 HOSTAGES REMAIN IN CAPTIVITY. BRING THEM HOME NOW!**\n**[#BringThemHomeNow](https://stories.bringthemhomenow.net/)**\n\n# React Native Restart\n\n[![npm version](https://img.shields.io/npm/v/react-native-restart.svg?style=flat-square)](https://www.npmjs.com/package/react-native-restart)\n[![npm downloads](https://img.shields.io/npm/dm/react-native-restart.svg?style=flat-square)](https://www.npmjs.com/package/react-native-restart)\n[![Build status](https://github.com/avishayil/react-native-restart/actions/workflows/main.yml/badge.svg)](https://github.com/avishayil/react-native-restart/actions/workflows/main.yml)\n\nSometimes you want to reload your app bundle during app runtime. This package will allow you to do it.\n\niOS GIF             | Android GIF\n:-------------------------:|:-------------------------:\n\u003cimg src=\"./images/ios.gif\" title=\"iOS GIF\" width=\"250\"\u003e | \u003cimg src=\"./images/android.gif\" title=\"Android GIF\" width=\"250\"\u003e\n\n## Installation\n\n- Using `react-native \u003c 0.62`? install `react-native-restart@0.0.17`\n- Using `0.71 \u003e react-native \u003e= 0.62`? install `react-native-restart@0.0.24`\n- Using `react-native \u003e= 0.71`? install `react-native-restart@0.0.27` and above\n\n### With `yarn`\n\n```bash\n$ yarn add react-native-restart\n```\n\n### With `npm`\n```bash\n$ npm install --save react-native-restart\n```\n\n## Auto-Linking Setup (react-native \u003e= 0.60)\n\n### iOS\n\n```bash\n$ cd ios\n$ pod install\n```\n\n### Android\n\nNo further steps should be taken\n\n## Automatic Installation (Without Auto-Linking)\n\n`react-native link react-native-restart` or `npm install -g rnpm \u0026\u0026 rnpm link react-native-restart`\n\n## Manual Android Installation\n\nIn `android/settings.gradle`\n```gradle\n...\n\ninclude ':react-native-restart'\nproject(':react-native-restart').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-restart/android')\n```\n\nIn `android/app/build.gradle`\n\n```gradle\n...\n\ndependencies {\n    ...\n\n    implementation project(':react-native-restart')\n}\n```\n\nRegister module (in `MainApplication.java`)\n\n```java\nimport com.reactnativerestart.RestartPackage;  // \u003c--- Import\n\npublic class MainApplication extends Application implements ReactApplication {\n\n\tprivate final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n  \t\t......\n\n\t      /**\n\t     * A list of packages used by the app. If the app uses additional views\n\t     * or modules besides the default ones, add more packages here.\n\t     */\n\t    @Override\n\t    protected List\u003cReactPackage\u003e getPackages() {\n\t        ...\n\t        return Arrays.\u003cReactPackage\u003easList(\n\t                new MainReactPackage(),\n\t                new RestartPackage() // Add this line\n\t        );\n\t    }\n\t};\n\t......\n};\n\n```\n\n## Manual iOS Installation\n\n### Importing The Library\n\n * Drag the file `Restart.xcodeproj` from `/node_modules/react-native-restart/ios` into the `Libraries` group in the Project navigator. Ensure that `Copy items if needed` is UNCHECKED!\n\n  ![Add Files To...](http://i.imgur.com/puxHiIg.png)\n\n  ![Library Imported Successfully](http://i.imgur.com/toZUWg5.png)\n\n * Ensure that `libRestart.a` is linked through `Link Binary With Libraries` on `Build Phases`:\n\n  ![Library Linked](http://i.imgur.com/Sm1birt.png)\n\n * Ensure that `Header Search Paths` on `Build Settings` has the path `$(SRCROOT)/../node_modules/react-native-restart` set to `recursive`:\n\n * You're All Set!\n\n## CocoaPod iOS Installation\n\nIn your `ios/Podfile` make sure to use `react-native-restart` from the local\n`node_modules/`. With that, only your project Pod needs to be linked and\nno extra configuration is required:\n\n```ruby\ntarget 'MyReactApp' do\n  # Make sure you're also using React-Native from ../node_modules\n  pod 'React', :path =\u003e '../node_modules/react-native', :subspecs =\u003e [\n    'Core',\n    'RCTActionSheet',\n\t# ... whatever else you use\n  ]\n  # React-Native dependencies such as yoga:\n  pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga'\n\n  # The following line uses react-native-restart, linking with\n  # the library and setting the Header Search Paths for you\n  pod 'react-native-restart', :path =\u003e '../node_modules/react-native-restart'\nend\n```\n\nRemember to run `cd ios \u0026\u0026 pod install` to update files used by Xcode.\n\n## Usage\n\n```javascript\nimport RNRestart from 'react-native-restart'; // Import package from node modules\n\n// Immediately reload the React Native Bundle\nRNRestart.Restart(); // Deprecated\nRNRestart.restart();\n```\n\n## Contributing\n\nContributions are welcome. Please see [CONTRIBUTING.md](CONTRIBUTING.md) if you like to contribute to this library.\n\n## Credits\n\nThanks to Microsoft CodePush library. I simply extracted the code from their library's logic to reload the React Native Bundle.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favishayil%2Freact-native-restart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favishayil%2Freact-native-restart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favishayil%2Freact-native-restart/lists"}