2014-10-31 13 views
13

我有一个XCode项目(在Xcode 6.1中),有4个不同的应用程序共享很多相同的源代码的4个目标。在XCode中,如何为每个目标iOS应用程序使用不同的AppIcon?

我试图让他们每个人都显示一个不同的应用程序图标。

走进项目>通用> [选择目标]>应用程序图标和启动图片,我看到:

Different AppIcons

但点击每个APPICON,我得到完全相同的应用程序图标 - 不每个项目我想要的。

这只是XCode中的一个错误?我如何为不同的目标使用不同的应用程序图标?

+0

刚刚发现这一点,我自己 - 解决方案s转到每个目标的Images.xcassets文件并在那里定义应用程序图标。 – gabor 2014-10-31 06:20:13

+0

我在xcode 7中只有1个images.xcassets – 2016-03-13 17:06:23

回答

1

CLick on the right right,which will take you to Xc-assets screen,you can set images。

同样点击其他目标并设置图像。如果您在查找器窗口中打开项目,您可以注意到ProjectName.xcassets,您可以在其中看到不同的应用程序图标集。你可以直接复制到这个文件夹以及

4

我有一个类似的问题,当使用多个目标。试图更改使用的资产集不起作用,它总是会自动选择列表中的第一个。我解决这个问题的方法是重命名每个资产集中的AppIcon,例如AppIconMobileAppIconTablet

12
  • 点击您已有xcassets文件,其中定义了Appicons你的第一个目标,并添加新APPICON:

enter image description here

  • 你可以给新APPICON一个meaningfull名称(在我的情况APPICON-调试):

enter image description here

  • 转到您的目标,并选择新的目标:

enter image description here

  • 选择一般根据新APPICON - > “应用程序图标和启动图像” - >“应用图标来源“:

enter image description here

  • 清理项目并重建它。
9
  1. 通过点击+按钮目标的部分
  2. 将它命名为APPICON检验或调试或任何名义西服的左下角转到您应用的Assets.xcassets并创建一个新的iOS应用程序图标您。
  3. 转到xcassets文件夹,并在实用程序面板中允许目标成员资格都在文件检查器视图中。确保为两个AppIcon集都启用了所有目标成员资格。
  4. 在项目设置中选择要更改图标的目标。在“常规”中向下滚动到应用程序图标和启动图像。选择您的APPICON在应用程序图标源设置为各自的目标

Go to your app's Assets.xcassets and create a new iOS App Icon by clicking on the + button in the bottom left corner of target's section

Name it AppIcon-Test or Debug or whatever name suits you.

Go to xcassets folder and in the utilities panel allow target membership to both in the File Inspector View. Make sure the all target membership's are enabled for both AppIcon sets.

Select the target for which you want to change icon in the project settings. In "General" Scroll down to App Icons and Launch Images. Select your appicon set for the respective target in App Icons source

编码愉快:)

相关问题