mac发布修改productName为中文debug运行会崩溃

  • Creator 版本:2.4.9

  • 目标平台: mac ,Apple Silicon 芯片

  • 重现方式:空项目构建mac工程,导入xcode14.3 ,项目桌面应用Target修改productName为中文名,运行会crash。

  • 首个报错:
    Thread 1 Queue : com.apple.main-thread (serial)
    #0 0x00007ff8094e7326 in CFStringGetLength ()
    #1 0x00007ff8094e9c71 in CFStringFindWithOptionsAndLocale ()
    #2 0x00007ff8094e9c1d in CFStringHasPrefix ()
    #3 0x00007ff8095f4730 in __CFBundleCopyFrameworkURLForExecutablePath ()
    #4 0x00007ff809547823 in _CFBundleEnsureBundleExistsForImagePath ()
    #5 0x00007ff80960412f in _CFBundleGetBundleWithIdentifier ()
    #6 0x00000001058333ff in _glfwPlatformInit ()
    #7 0x0000000105830ffe in glfwInit ()
    #8 0x00000001047f7e0d in cocos2d::GLView::GLView(cocos2d::Application*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int, int, int, cocos2d::Application::PixelFormat, cocos2d::Application::DepthFormat, int) at /Applications/Cocos/Creator/2.4.9/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/desktop/CCGLView-desktop.cpp:127
    #9 0x00000001047f8727 in cocos2d::GLView::GLView(cocos2d::Application*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int, int, int, cocos2d::Application::PixelFormat, cocos2d::Application::DepthFormat, int) at /Applications/Cocos/Creator/2.4.9/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/desktop/CCGLView-desktop.cpp:124
    #10 0x00000001045821ec in cocos2d::Application::createView(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int) at /Applications/Cocos/Creator/2.4.9/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac/CCApplication-mac.mm:323
    #11 0x0000000104582075 in cocos2d::Application::Application(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, int, int) at /Applications/Cocos/Creator/2.4.9/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/platform/mac/CCApplication-mac.mm:71
    #12 0x0000000104431781 in AppDelegate::AppDelegate(int, int) at /Users/st/Desktop/zhaoxu/NewProject_1/build/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp:38
    #13 0x0000000104431821 in AppDelegate::AppDelegate(int, int) at /Users/st/Desktop/zhaoxu/NewProject_1/build/jsb-link/frameworks/runtime-src/Classes/AppDelegate.cpp:39
    #14 0x0000000104434ccd in main at /Users/st/Desktop/zhaoxu/NewProject_1/build/jsb-link/frameworks/runtime-src/proj.ios_mac/mac/main.cpp:32
    #15 0x00000002085b241f in start ()
    Thread 2

  • 之前哪个版本是正常的:

  • 手机型号:

  • 手机浏览器:

  • 编辑器操作系统:

  • 重现概率:100%

那就别用中文,中文本身就有兼容问题

公司要求上appstore的应用名要中文名啊

那就不清楚了,我用的xcode 15没遇到这个问题

你用的cocos是什么版本,我xcode升级到最新15.4,配置纯中文productName运行一样crash。

3.8.2

你搞错了,如果你解包文件名变成了中文名那就是你设置错了