与Gradle的Libgdx Robovm iOS图标

Fro*_*zer 5 icons ios libgdx robovm

我无法在互联网上找到如何使用Gradle libgdx为iOS添加图标的方法我将如何操作?

Tam*_*seh 7

跟着这些步骤:

  • resources在RoboVM项目的根目录下创建一个文件夹(例如)(通常your-project-ios)
  • 将您的图标放在该文件夹中(确保您的图标根据指南具有有效名称,但您可以使用许多在线工具生成它们,例如:http://makeappicon.com)
  • 编辑robovm.xml文件并将这些行添加到资源中:
<resource>
    <directory>resources</directory>
</resource>
Run Code Online (Sandbox Code Playgroud)

你会得到类似的东西:

<resources>
    <resource>
        <directory>../android/assets</directory>
        <includes>
            <include>**</include>
        </includes>
        <skipPngCrush>true</skipPngCrush>
    </resource>
    <resource>
        <directory>resources</directory>
    </resource>
</resources>
Run Code Online (Sandbox Code Playgroud)
  • 编辑Info.plist.xml文件并在最后添加这些行(之前</dict></plist>)
<key>CFBundleIcons</key>
<dict>
    <key>CFBundlePrimaryIcon</key>
    <dict>
        <key>CFBundleIconFiles</key>
        <array>
            <string>Icon</string>
            <string>Icon-72</string>
        </array>
    </dict>
</dict>
Run Code Online (Sandbox Code Playgroud)

资源