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

iOS release mode 真机调试 黑屏 #137

Closed
badaozhenjun opened this issue Nov 23, 2018 · 9 comments
Closed

iOS release mode 真机调试 黑屏 #137

badaozhenjun opened this issue Nov 23, 2018 · 9 comments

Comments

@badaozhenjun
Copy link

badaozhenjun commented Nov 23, 2018

debug模式下 没问题 但是 release 模式下 会黑屏

@badaozhenjun badaozhenjun changed the title iOS release mode iOS release mode 真机调试 黑屏 Nov 23, 2018
@CarGuo
Copy link
Owner

CarGuo commented Nov 23, 2018

黑屏??怎么个黑屏??我前两天才给我自己的ipx装了个呢,挺正常的

@badaozhenjun
Copy link
Author

badaozhenjun commented Nov 23, 2018

我的 iPhone 8 ios12
确实黑屏 卸载了重装 依旧
这是打印的log

2018-11-23 09:36:00.682026+0800 Runner[15890:2877567] Failed to find snapshot: /var/containers/Bundle/Application/AA570695-F3A0-44C5-ABFC-03E03613FE28/Runner.app/flutter_assets/kernel_blob.bin
2018-11-23 09:36:00.737477+0800 Runner[15890:2877567] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
2018-11-23 09:36:00.737529+0800 Runner[15890:2877567] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2018-11-23 09:36:00.743737+0800 Runner[15890:2877635] [VERBOSE-2:engine.cc(112)] Engine run configuration was invalid.
2018-11-23 09:36:00.743848+0800 Runner[15890:2877635] [VERBOSE-2:FlutterEngine.mm(261)] Could not launch engine with configuration.
2018-11-23 09:36:00.782792+0800 Runner[15890:2877642] flutter: Observatory listening on http://127.0.0.1:63390/

是不是哪里配置 或者 版本不一致的问题?

@CarGuo
Copy link
Owner

CarGuo commented Nov 23, 2018

你先执行了flutter build ios 之后在 archive release 了吗?

@badaozhenjun
Copy link
Author

我直接 用的xcode

@badaozhenjun
Copy link
Author

不能直接用吗? 直接打开workspace 然后 pod一下, 我debug模式 安装真机成功了

@CarGuo
Copy link
Owner

CarGuo commented Nov 23, 2018

release的话,你需要先 flutter build ios 生成 release 的 flutter BIN 文件,之后才能 xcode archive 打包。
debug 是JIT 编译而 relase 是AOT编译来着。

@badaozhenjun
Copy link
Author

这个是打包,还需要上传,我是想 直接用xcode进行真机调试 ,没有开发证啊 买不起。 没有办法直接用xcode进行真机调试吗?

@CarGuo
Copy link
Owner

CarGuo commented Nov 23, 2018

不需要上传啊,archive打出development包就可以了。
如果你是想真机调试的,直接用android studio 或者 idea + flutter 插件直接编译到真机上就可以了。

理清楚一个debug和release的概念。

flutter 的 debug 是 JIT 编译的支持hotload,而 release 模式是 AOT 编译的

所以
如果你是想debug的,直接编译到真机就可以
如果你想release的,首先要执行 flutter build ios 产生必须的flutter 文件之后,在编译到真机

@badaozhenjun
Copy link
Author

明白了, 谢谢啦 已经成功了,太感谢啦。
确实比debug流畅很多

@CarGuo CarGuo closed this as completed Nov 23, 2018
@CarGuo CarGuo mentioned this issue Nov 21, 2019
@byue666 byue666 mentioned this issue Dec 19, 2019
@w497763094 w497763094 mentioned this issue Mar 10, 2020
@JevonShi JevonShi mentioned this issue Mar 10, 2020
@HaobinXu HaobinXu mentioned this issue Mar 20, 2020
@luan823230 luan823230 mentioned this issue Mar 24, 2020
@MrHGJ MrHGJ mentioned this issue May 19, 2020
@hzg1105 hzg1105 mentioned this issue Jun 14, 2020
@wangkr wangkr mentioned this issue Jul 4, 2020
@gss3000 gss3000 mentioned this issue Jul 8, 2020
@Liway Liway mentioned this issue Jun 22, 2022
@jayVRIY jayVRIY mentioned this issue Dec 8, 2022
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