MacOS 15 Beta does not support apps that contain Chinese characters in the path
When developing on macOS 15 Beta system, if the path of the App and the App name contain non-English characters (for example, Chinese, Japanese, Korean, or others), the compiled Metal shader library
may not contain any methods, causing the App to fail to run normally.
Cause of the problem
This issue is cause by a system bug.
Solution
This section takes the Chinese environment as an example to introduce how to create an InfoPlist
file that supports multiple languages and define the name text displayed by the App. The specific steps are as follows:
-
Create files for multi-language support:
-
Open your project in Xcode and select the Info tab.
-
In the Localizations section, click the + button and select Chinese, Simplified to localize your project to support Chinese characters.
-
-
Create the
InfoPlist
file:-
Add a new file:
- Right-click your project folder in the project navigator and select New File....
- In the pop-up dialog box, select String Catalog.
-
Name the file
InfoPlist
and click Create. -
Set the language
- Select the
InfoPlist
file you just created in the project navigator, select the Chinese, Simplified language you have added, and click the + button. - Add
Key
asCFBundleDisplayName
and add the display name for it in the Chinese environment.
NoteIf the original Info in your project is in Chinese, you need to set the display name in English at the same time to ensure that the names displayed in the Default Localization (zh-Hans) and English (en) fields are as expected.
- Select the
-
-
Define the localized display name of the App:
-
Select the target file in TARGETS and open the Info tab.
-
Click the + button and add
Key
asApplication has localized display name
. SetValue
toYES
so that the display name of the App can be displayed as different text in different language environments.
-
-
Verify the results:
- Make sure that no file names and App build paths in the project contain Chinese characters.
- Compile the project and build the App.
- Switch the language in System Preferences on the macOS system to ensure that the App name is displayed correctly in different languages.