AppSeedのアプリ開発ブログ

アプリ開発会社AppSeed(アップシード)開発担当のブログです。iOS、Android、Unity、Cocos2d-xなどアプリ開発関連のTipsや備忘録、アプリ開発に役立つ情報を発信します。

【Cocos2d-x】アプリアイコン下のアプリ名を変更する

https://nzigen.com/ysawa/wp-content/uploads/2016/05/800x480_2dx_landscape.png

Cocos2d-xでアプリアイコン下のアプリ名を変更する方法に関するメモ。
Cocos2d-xでアプリ名を変更する場合は、
AndroidiOSそれぞれのプロジェクトファイルでアプリ名を変更する必要があります。


iOS版のアプリ名を変更する場合

iOS版の場合は、プロジェクトファイルのInfo.plistのファイルを編集します。

Info.plistファイルは、以下にあります。
proj.ios_mac>ios>Info.plist

f:id:no-work-no-life-4081:20180910082632p:plain


<?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のアプリ開発ブログ