gabrimatic / restart_app

A Flutter plugin that helps you to restart the whole Flutter app with a single function call by using native APIs.
https://pub.dev/packages/restart_app
MIT License
76 stars 71 forks source link

[Feature] Support for restart on iOS #1

Closed yanivshaked closed 1 year ago

yanivshaked commented 3 years ago

Hi,

Do you have any plans to support restart on iOS?

Thanks

gustavo-perini commented 3 years ago

It would be great!!!

swarupbc commented 3 years ago

Yes please add support

gabrimatic commented 3 years ago

I just added web support to the restart app package, so it now supports both Android and Web platforms. But, in terms of iOS, I don't have any real plans since, before Flutter, I was an Android developer and, unfortunately, I have no expertise with iOS programming. So, if you have any ideas, please share them with me or submit a fork request so that the package may have complete platform support.

matekdk commented 3 years ago

There are no methods available in iOS to restart the app. So the best that can be done on IOS is to re-instantiate root UIViewController.

More info: https://stackoverflow.com/questions/66205648/is-there-any-way-to-restart-my-ios-app-programmatically

msxenon commented 2 years ago

I think in iOS you can only crash the app to stop it and you can't start it again

gabrimatic commented 2 years ago

There are no methods available in iOS to restart the app. So the best that can be done on IOS is to re-instantiate root UIViewController.

More info: https://stackoverflow.com/questions/66205648/is-there-any-way-to-restart-my-ios-app-programmatically

I tried this method, and it has a big problem: When I reassign the rootViewController with FlutterViewController, all the Flutter plugins are not available, and they need to register again.

gabrimatic commented 2 years ago

As my research and other developers suggestions, there isn't any working solution for that. I keep this issue open for new ideas

Milimeter commented 2 years ago

Hi. Is it working on iOS now?

khang-dev commented 2 years ago

Any progress on this ?

hosseinkhojany commented 1 year ago

https://stackoverflow.com/a/66206070

isAlmogK commented 1 year ago

Following, need iOS support

zamirszn commented 1 year ago

its 2023 and no solution for iOS , has anyone been able to figure it out

gabrimatic commented 1 year ago

@Milimeter, @khang-dev, @hosseinkhojany, @isAlmogK, @zamirszn I appreciate your support and feedback on this package!

Unfortunately, restarting a Flutter app using native APIs in iOS is not supported by the platform. However, you can look at this StackOverflow answer, or if you have a solution, do not hesitate to add it here.

I keep this issue open for new ideas

zamirszn commented 1 year ago

@Milimeter, @khang-dev, @hosseinkhojany, @isAlmogK, @zamirszn I appreciate your support and feedback on this package!

Unfortunately, restarting a Flutter app using native APIs in iOS is not supported by the platform. However, you can look at this StackOverflow answer, or if you have a solution, do not hesitate to add it here.

I keep this issue open for new ideas

alright , thanks alot

gabrimatic commented 1 year ago

After a very long period, iOS support has now been added to the restart_app package v1.2.0!