简体   繁体   English

添加图标文件时,Titanium Studio tiapp信息未正确传输到info.plist

[英]Titanium Studio tiapp info is not properly transfered into info.plist while adding iconfiles

I'm using Titanium Studio. 我正在使用Titanium Studio。 All I want are some icons in my iphone app. 我想要的只是我的iPhone应用程序中的一些图标。

In my tiapp.xml is this section: 在我的tiapp.xml中是以下部分:

<ios>
<plist>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>appicon.png</string>
<string>appicon@2x.png</string>
<string>appicon76.png</string>
<string>appicon76@2x.png</string>
<string>appicon72@2x.png</string>
<string>appicon72.png</string>
<string>appicon72@2x.png</string>
</array>
</dict>
</plist>
</ios>

Somewhere in the file is also this: appicon.png 文件中的某个位置也是:appicon.png

All necessary files are in a folder called iphone, 72 dpi png, exactly measured. 所有必需的文件都在一个精确测量的名为iphone的文件夹中,为72 dpi png。

Although there are 8 icon entries in my tiapp, after I built the app the info.plist contains only these two icon file entries: 尽管tiapp中有8个图标条目,但是在构建应用程序后,info.plist仅包含这两个图标文件条目:

Item 0 string appicon.png
Item 1 string appicon@2x.png

And Xcode complains about the missing icons: "Missing required icon file. The bundle does not contain an app icon for ipad of exactly 72 x 72 pixels in png format." Xcode抱怨缺少图标:“缺少必需的图标文件。该捆绑软件不包含png格式的ipad应用程序图标,大小恰好为72 x 72像素。”

Obviously it does contain that file, together with all the other ones mentioned in the tiapp. 显然,它确实包含该文件以及tiapp中提到的所有其他文件。

I tried to edit info.plist by hand, to no effect. 我尝试手动编辑info.plist,但没有任何效果。 I checked and checked upper and lower case, I even mad this icon files again but still no luck. 我检查了大小写,我什至再次生气了这个图标文件,但还是没有运气。 How do I do this? 我该怎么做呢?

Last week I had a similar excercise, and after renaming everything to lowercase ("appicon...") it was accepted by Xcode 5.1. 上周,我有一个类似的练习,将所有内容重命名为小写(“ appicon ...”)后,Xcode 5.1接受了它。 The only thing I changed are the icons, everything else is the same and xcode keeps me awake for days. 我唯一更改的是图标,其他所有内容都相同,并且xcode使我数日无法入睡。

appicon.png file has to be located in /Resources/iphone/ project directory. appicon.png文件必须位于/ Resources / iphone /项目目录中。

Also try using clean project option before building it. 在构建之前,也请尝试使用清理项目选项。

It turned out it had something to do with image or name caching by Xcode. 事实证明,这与Xcode的图像或名称缓存有关。 After I renamed all icon files into something that has not been used yet (app-icon72.png etc) Xcode validated without any problem. 将所有图标文件重命名为尚未使用的东西(app-icon72.png等)后,Xcode进行了验证,没有任何问题。

Add following icon files to tiapp.xml : 将以下图标文件添加到tiapp.xml

 <icon>appicon.png</icon>

 <icon>appicon-72.png</icon>

 <icon>appicon-120.png</icon>

Its working fine for me. 它对我来说很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM