Releases: tconns/react-native-nitro-restart
Releases · tconns/react-native-nitro-restart
Release v0.1.1
Release v0.1.0
Release Notes v0.1.0
🎉 Initial Release - App Restart & Process Management
Release Date: September 5, 2025
Version: 0.1.0
Package: react-native-nitro-restart
📋 Overview
This is the initial release of react-native-nitro-restart - a powerful React Native module built with Nitro Modules for native app restart and process management functionality. The module provides cross-platform support for iOS and Android with TypeScript definitions.
✨ New Features
🔄 Core Functionality
App Restart
restartApp(moduleName: string)- Restart the entire React Native application- Creates new React context on iOS
- Handles activity lifecycle on Android
- Preserves app state where possible
- Full cross-platform support
App Exit
exitApp()- Safely exit the application- Moves app to background instead of force termination (App Store compliant)
- Graceful shutdown with proper cleanup
- Animated exit transition on iOS
- Activity management on Android
Process Information
getPid(): number- Get current process identifier- Returns native process ID
- Useful for debugging and monitoring
- Consistent across both platforms
🏗️ Architecture & Performance
- Built with Nitro Modules - Latest React Native architecture for optimal performance
- Native Implementation - Swift for iOS, Kotlin for Android
- TypeScript Support - Full type definitions included
- Zero-config Setup - Automatic autolinking support
- Memory Efficient - Minimal memory footprint
- Thread Safe - Proper main thread handling
📱 Platform Support
| Feature | iOS | Android | Notes |
|---|---|---|---|
| restartApp() | ✅ | ✅ | Creates new React context |
| exitApp() | ✅ | ✅ | Moves to background (safe) |
| getPid() | ✅ | ✅ | Returns process identifier |
🔧 Technical Specifications
- Minimum React Native: 0.76+
- Node.js: 18+
- iOS: 12.0+
- Android: API 21+ (Android 5.0)
- Dependencies:
react-native-nitro-modules
🛠️ Implementation Details
iOS Implementation
- Language: Swift
- Framework: React Native, UIKit
- Key Features:
- Uses
RCTRootViewfor app restart - Safe casting with proper error handling
- Animated transitions for better UX
- Background suspension instead of termination
- Uses
Android Implementation
- Language: Kotlin
- Framework: React Native Android
- Key Features:
- Intent-based app restart
- Activity lifecycle management
- Background task handling
- Proper context management
Error Handling
- Comprehensive logging for debugging
- Graceful fallbacks when operations fail
- Safe type casting to prevent crashes
- Production-ready error recovery
📦 Installation & Setup
npm install react-native-nitro-restart react-native-nitro-modules
# or
yarn add react-native-nitro-restart react-native-nitro-modulesQuick Start
import { NitroRestartModule } from 'react-native-nitro-restart'
// Restart app
NitroRestartModule.restartApp('YourAppName')
// Get process ID
const pid = NitroRestartModule.getPid()
// Exit app (use with caution)
NitroRestartModule.exitApp()⚠️ Important Considerations
App Store Compliance
- iOS: Follows Apple's guidelines by using background suspension
- Android: Complies with Google Play policies
- Recommendation: Use
exitApp()sparingly and with user confirmation
Best Practices
- Always save important state before restart/exit operations
- Provide user confirmation dialogs for disruptive actions
- Test thoroughly on both platforms and various devices
- Handle errors gracefully in production builds
🔄 Migration & Upgrades
This is an initial release, so no migration is required. Future versions will include detailed migration guides.
TypeScript Interface
export interface NitroRestart
extends HybridObject<{ ios: 'swift'; android: 'kotlin' }> {
restartApp(moduleName: string): void
exitApp(): void
getPid(): number
}🐛 Known Issues
- None reported for initial release
- Please report issues on GitHub Issues
🔮 Upcoming Features
Future versions may include:
- Restart with custom initial properties
- Restart hooks and callbacks
- Advanced process monitoring
- Background restart scheduling
- Configuration persistence
📝 Documentation
- README.md - Complete setup and usage guide
- TypeScript definitions - Full IntelliSense support
- Example implementation - React component demo
- API Reference - Detailed method documentation
🤝 Contributing
We welcome contributions! Please see:
- CONTRIBUTING.md - Development guidelines
- GitHub Issues - Bug reports and feature requests
- Pull Requests - Code contributions
📄 License
MIT License - See LICENSE file for details
👏 Acknowledgments
Special thanks to:
- mrousavy/nitro - Nitro Modules architecture
- React Native team - Core platform support
- Community contributors and testers
📊 Release Statistics
- Total commits: Initial release
- Files changed: Core implementation files
- Lines of code: ~500+ (Swift + Kotlin + TypeScript)
- Test coverage: Basic functionality testing
- Platform testing: iOS 15+, Android 8+
🔗 Links
- NPM Package: react-native-nitro-restart
- GitHub Repository: tconns/react-native-nitro-restart
- Documentation: README.md in repository
- Issues: GitHub Issues
Happy coding! 🚀
For questions or support, please open an issue on GitHub or contact the maintainer.