farmako / flutter_restart

MIT License
12 stars 2 forks source link

Crash on iOS #11

Open RawadZogheib opened 1 week ago

RawadZogheib commented 1 week ago

On IOS it's crashing instead of restart, any solution?

alexmercerind commented 1 week ago

Have you modified the code as mentioned in README?

RawadZogheib commented 1 week ago

yes

import UIKit
import Flutter
import restart

@main
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    // --------------------------------------------------
    RestartPlugin.generatedPluginRegistrantRegisterCallback = { [weak self] in
        GeneratedPluginRegistrant.register(with: self!)
    }
    // --------------------------------------------------
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}
RawadZogheib commented 1 week ago

@alexmercerind I user this plugin for a landscape game, on restart (when it doesn't crash) and I rotate my phone the game begin in portrait (Knowing that I have configured in the Info.pilst that it's a landscape app). This bug is only on IOS too.

abdoul-kader1 commented 1 week ago

My ios application remains on a blank page

alexmercerind commented 1 week ago

Can you please share a minimal sample?

RawadZogheib commented 5 days ago

Hello @alexmercerind, any update about these 2 bugs on IOS?