restart_app 1.9.1
restart_app: ^1.9.1 copied to clipboard
A Flutter plugin to restart or relaunch Flutter apps with platform-specific native behavior.
1.9.1 #
- Fixed the Android build failing on AGP 9 with
Could not find method kotlin(), which hit every project generated by Flutter 3.44 and later (#56) - Changed how the plugin decides to apply the Kotlin Gradle Plugin: it now checks whether Kotlin has already been provided instead of reading the AGP major version, so AGP 9 with
android.builtInKotlin=falsegets a Kotlin toolchain like every other combination - Kept the Android
namespaceunconditional now that every supported AGP requires it - Added a CI job that builds a fresh app against AGP 9.0 and AGP 9.1 on their matching Gradle versions
1.9.0 #
Upgrade notes: Android minSdk rises from 16 to 21 and the Android toolchain moves to Java 17, AGP 8.1.4 and Kotlin 2.0.21; the iOS CocoaPods minimum rises from 11.0 to 12.0. Apps on older toolchains must update their build setup before upgrading. On web, the default restart now reloads the current page instead of navigating to the site origin root; pass webOrigin to keep the previous behavior.
- Changed the web default restart to reload the current page, keeping the active route instead of jumping to the origin root;
webOriginstill overrides the target - Fixed Windows so a failed relaunch (for example MSIX/Store-packaged apps) returns a
RESTART_FAILEDerror instead of a false success; the new instance now starts suspended and only resumes after the result is delivered - Made unknown platform response modes fall back to the requested mode instead of silently reporting
platformDefault - Hardened result parsing so non-string
code,message, andreasonvalues can never throw - Added web plugin tests that cover the full method-channel contract, plus a Chrome test step in CI
- Added CI restart proofs that build, run, and verify a real process restart on Linux, Windows, and macOS runners
- Added explicit engine restart, force-kill restart, and
webOriginbuttons to the example app - Fixed the example Android manifest so
url_launcherlink checks pass on Android 11+ (package visibility<queries>) - Removed the redundant Android
finishAffinity()after the relaunch intent, which made ActivityTaskManager log a "Duplicate finish request" on every default restart - Prepared the Android build for Flutter's Built-in Kotlin: the Kotlin Gradle Plugin is now applied only on AGP versions below 9, with modernized Kotlin 2.0 tooling
- Aligned the iOS CocoaPods minimum with Swift Package Manager at iOS 12
- Made the macOS handler hop to the main thread explicitly before touching AppKit
1.8.3 #
- Made
Restart.restartApp(...)the single Dart restart entry point - Changed
Restart.restartApp(...)to returnRestartResult, giving one call withsuccess, resolvedmode,code, andmessage - Kept all restart customization on
Restart.restartApp(...):mode,webOrigin,forceKill,notificationTitle, andnotificationBody - Refined the example so
main.dartshows the restart calls directly, while package survival checks live in focused helper files - Updated README and example docs so the quick start is platform-neutral and iOS details stay in the iOS section
1.8.2 #
- Tightened iOS default behavior:
platformDefaultnow fails cleanly when engine restart is not configured instead of quietly using notification +exit(0) - Kept notification restart as an explicit
RestartMode.notificationFallbackpath for apps that accept the permission prompt, exit, and user-tap tradeoff - Removed the internal implicit-fallback flag from the Dart API and iOS platform-channel payload
- Expanded the example with package checks that exercise common plugin paths after restart
- Clarified README language around iOS engine restart versus unsupported full process restart
1.8.1 #
- Fixed mode handling so unsupported restart modes fail with a clear platform error instead of silently falling back
- Returned the resolved restart mode from Android, web, Linux, macOS, and Windows
- Made Android
RestartMode.processuse the fullforceKillpath automatically - Updated the example Android Gradle project for current Java and Flutter toolchains
- Moved the iOS
beforeRestarthook before replacement engine creation so apps can clean up native resources first
1.8.0 #
- Added structured restart types with
RestartResult,RestartMode, andRestart.restartCapability() - Added opt-in iOS Flutter engine restart: fresh
FlutterEngine, Dart entrypoint rerun, host plugin registration, rootFlutterViewControllerreplacement, and old engine teardown - Kept the existing iOS notification +
exit(0)behavior as an explicit legacy fallback - Documented the important iOS boundary: Flutter engine restart is supported, automatic full process restart is not available through public iOS APIs
1.7.3 #
- Fixed Xcode build failure caused by SPM target path resolving outside the package root (#52)
1.7.2 #
- Fixed Swift Package Manager file locations for iOS and macOS
1.7.1 #
- Added Swift Package Manager support for iOS and macOS
1.7.0 #
- Added native Linux support. Restarts via
execv, replacing the current process in-place - Added native Windows support. Launches a new instance via
CreateProcessand exits - Added Android TV and Fire TV support via leanback launcher fallback
restartApp()now returnsfalseon native errors instead of throwingPlatformException- Added CI with code quality checks, formatting, and native linting (Kotlin, Swift, C++)
- Added unit tests
1.6.0 #
- Added native macOS support via a Swift plugin. Restarts the app by launching a new instance using
NSWorkspaceand terminating the current process
1.5.2 #
- Fixed Android FlutterJNI detached error: all destructive restart operations are now deferred via a short delay so the platform channel result can be delivered to the Dart side before the Flutter engine is torn down
- Lowered minimum Dart SDK requirement from 3.5.1 to 3.4.0 (Flutter 3.22+)
- Improved README: corrected iOS provisioning profile guidance, removed inaccurate CFBundleURLTypes instructions, and added documentation for calling from background isolates
1.5.1 #
- Added
forceKilloption for Android. Fully terminates the process after restart for a clean cold start - Fixed iOS restart not working due to incorrect AppDelegate cast
- Implemented proper iOS restart using local notifications with permission handling
- Breaking (iOS): Returns a
PlatformExceptionwith codeNOTIFICATION_DENIEDif notification permission is denied. Handle this in your code - Removed unused
plugin_platform_interfacedependency - Fixed iOS podspec placeholder metadata
- Fixed nested MaterialApp in example app
- Improved web error handling for unrecognized method calls
- Cleaned up unused imports
1.3.3 #
1.3.2 #
- Updated web package to the stable version
1.3.1 #
- Updated JVM and Kotlin versions
- Upgraded Flutter web dependency to more compatible version
- Resolved dependency conflicts with firebase packages and restart_app
1.3.0 #
- Custom notification support added for iOS:
notificationTitleandnotificationBodycan now be customized
- Android improvements:
- Added namespace configuration
- Replaced
.exitmethod with new, safeActivityAwaremethod - Updated Kotlin version
- Web support enhanced:
- Added Wasm support
- General updates:
- Updated dependencies
1.2.1 #
- In-code documentation added to the source
1.2.0 #
- iOS support added
1.1.3 #
- Updated to Flutter 3.10
- Example files updated
1.1.2 #
- Updated to Flutter 3.7.0
1.1.1+1 #
- iOS support description added to README
1.1.1 #
- Gradle version updated
1.1.0+1 #
- Updated to Flutter 3.0.0
1.1.0 #
- Web support added
1.0.3 #
- Plugin version updated in README
1.0.2 #
- Package name updated in example files
1.0.1 #
- Package name updated
1.0.0 #
- Null-Safety support added