farmako / flutter_restart

MIT License
12 stars 2 forks source link

Crash on iOS #11

Open RawadZogheib opened 3 weeks ago

RawadZogheib commented 3 weeks ago

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

alexmercerind commented 3 weeks ago

Have you modified the code as mentioned in README?

RawadZogheib commented 3 weeks 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 3 weeks 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 3 weeks ago

My ios application remains on a blank page

alexmercerind commented 3 weeks ago

Can you please share a minimal sample?

RawadZogheib commented 2 weeks ago

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