Cocos2d-xでアプリアイコン下のアプリ名を変更する方法に関するメモ。
Cocos2d-xでアプリ名を変更する場合は、
AndroidとiOSそれぞれのプロジェクトファイルでアプリ名を変更する必要があります。
iOS版のアプリ名を変更する場合
iOS版の場合は、プロジェクトファイルのInfo.plistのファイルを編集します。
Info.plistファイルは、以下にあります。
proj.ios_mac>ios>Info.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDisplayName</key> <string>アプリ名</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> <string>Icon-57.png</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>${PRODUCT_NAME}</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.033</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.033</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIAppFonts</key> <array/> <key>UIPrerenderedIcon</key> <true/> <key>UIRequiresFullScreen</key> <true/> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> </array> </dict> </plist>
Info.plistの「CFBundleName」の項目のstringを編集すればアプリ名が変更できます。
Android版のアプリ名を変更する場合
Androidアプリの場合は、Androidのプロジェクトファイルのstring.xmlを編集します。
string.xmlは以下にあります。
proj.android-studio/app/res/values/string.xml
<resources>
<string name="app_name">アプリ名</string>
</resources>
string.xmlのapp_nameの項目に変更後のアプリ名を記述してビルドすれば変更できます。
関連記事:
【Unity】アイコン下のアプリ名を変更する方法 - AppSeedのアプリ開発ブログ
【Unity】アイコン下のアプリ名をローカライズする方法(Android編) - AppSeedのアプリ開発ブログ
【Unity】アイコン下のアプリ名をローカライズする方法(iOS編) - AppSeedのアプリ開発ブログ