Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

高版本Xcode创建的iOS工程,以flutter_module方式引入插件,获取 navigationController 可能为空 #42

Closed
renshaojuncool opened this issue Jun 2, 2020 · 5 comments

Comments

@renshaojuncool
Copy link

高版本Xcode创建的工程,因为SceneDelegate缘故
UIApplication+Thrio.m , topmostNavigationController 方法中,
UIViewController *topmostViewController = self.delegate.window.rootViewController;获取可能为nil

@foxsofter
Copy link
Owner

iOS 13呢。。。我应该可以兼容SceneDelegate,需不需要的问题,你项目上应该没用到吧

@renshaojuncool
Copy link
Author

iOS 13呢。。。我应该可以兼容SceneDelegate,需不需要的问题,你项目上应该没用到吧

demo中,iOS13模拟器跑起来没问题。我们项目是Xcode11.5 创建的,建立后包含 SceneDelegate,这样跑起来,会一直取到nil,就暂时放弃,使用flutter_boost。

@foxsofter
Copy link
Owner

API_AVAILABLE(ios(13.0)) @protocol UIWindowSceneDelegate
你的项目只支持iOS 13.0以上嘛

@renshaojuncool
Copy link
Author

API_AVAILABLE(ios(13.0)) @protocol UIWindowSceneDelegate
你的项目只支持iOS 13.0以上嘛

iOS13以下,window在 Appdelegate里面可以取到的,和iOS13以上,在 SceneDelegate 才可以取到,和我是否只支持iOS13没有关系吧

@foxsofter
Copy link
Owner

SceneDelegate在目前看来大部分App上并不会用到,分屏模式还早,且跟AppDelegate几乎无差别,thrio不打算支持。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants