puerts
puerts copied to clipboard
[Unity] Bug: IOS 初始化的时候奔溃
前置阅读 | Pre-reading
Puer的版本 | Puer Version
2.0.4
Unity的版本 | Unity Version
2022.3.20
发生在哪个平台 | Platform
iOS
错误信息 | Error Message
xcode 版本 15.2
奔溃在这个位置。
奔溃信息:
暂时就这些信息。
问题重现 | Bug reproduce
无
和这个issue可能一样:https://github.com/Tencent/puerts/issues/1619 在你的xcode重编译plugin试试呢?如果不行把v8也重编译下试试
项目里还装了: com.tencent.puerts.webgl 2.0.4 排查下来,发现:只要把这个删掉,IOS 就不会奔溃。
哦,应该是com.tencent.puerts.webgl 2.0.4导致的,它下面有个cpp文件,里面有些符号和puerts plugin是一样的 https://github.com/zombieyang/puerts_unity_webgl_demo/blob/master/packages/webgl/upm/Runtime/Plugins/WebGL/puerts.cpp
你试试在 https://github.com/zombieyang/puerts_unity_webgl_demo/blob/master/packages/webgl/upm/Runtime/Plugins/WebGL/puerts.cpp
加宏让这些代码只在webgl生效
#if !defined(__EMSCRIPTEN__)
//原来的代码
#endif
按照上面的方式,修好了