2

How can Gluon Mobile be configured to use the iOS Asset Catalog? According to this link: https://developer.apple.com/ios/submit/ : "Starting April 2018, all new iOS apps submitted to the App Store must be built with the iOS 11 SDK .", I figure this means that using the Asset Catalogue will be mandatory.

My ipa - File uploads without error, but then I receive htis message by mail:

"Dear Developer,

We identified one or more issues with a recent delivery for your app, "". Please correct the following issues, then upload again.

Missing Asset Catalog - Your app is missing the asset catalog file in '....app'. For more information see http://help.apple.com/xcode/mac/current/#/dev10510b1f7."

Which sample project of Gluon is up to date in this regard?

  • See this [question](https://stackoverflow.com/questions/46216718/missing-cfbundleiconname-in-xcode9-ios11-app-release). Probably just adding the `CFBundleIconName` key, and a valid app icon to `/ios/assets/` should be enough? This app with the provided [resources](https://github.com/devoxx/MyDevoxxGluon/tree/master/DevoxxClientMobile/src/ios/assets) was published to the Apple Store. – José Pereda Mar 19 '18 at 12:43

1 Answers1

1

In the meantime I managed to submit to iTunes. Here is how:

Create a folder <your-catalog-name>.xcassets (typical default is Assets.xcassets) located in src/ios/assets. The contents of this folder must match the iOS SDK 11 asset catalog format, therefore it's called the "Asset catalog folder". It is best created using XCode (see https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/FolderStructure.html) and then copy-pasting the resulting file system folder, using Mac OS Finder, into your Gluon Mobile project.

Tip: Be careful not to confuse Asset catalog folder and Asset folder located therein.

Screenshot from my Intellij project, which contains two asset folders, AppIcon.appiconset and LaunchImage.launchimage:

enter image description here

Note the Contents.json files in each of the asset folders. Once created by XCode, I would not recommend that you change anything manually, except you know exactly what you're doing.

Then refer to the Asset folder with a entry in Info.plist like this:

<?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>
        ...

        <!-- The name "AppIcon" refers to the asset folder name of type "appiconset",
             that is the first part of the folder name "AppIcon.appiconset".
             This folder is located inside the asset catalog "Assets.xcassets",
             which in turn is located in the project folder "src/ios/assets".
        -->
        <key>CFBundleIconName</key>
        <string>AppIcon</string>


        ...

 </dict>
</plist>

Note that there are different types of asset folders. Besides the '...appiconset' asset folder, you also need a ...launchimagefolder, but that's all created easily with XCode, according to the link above. See also https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/AssetTypes.html#//apple_ref/doc/uid/TP40015170-CH30-SW1

I was first confused by various old versions of configuring iOS app icons, for example from https://github.com/gluonhq/gluon-samples/blob/master/notes/src/ios/Default-Info.plist:

Old format DO NOT USE!:

<key>CFBundleIconFiles</key>
        <array>
                <string>Icon-60</string>
                <string>Icon-76</string>
                <string>Icon-Small-40</string>
                <string>Icon-Small</string>
        </array>
        <key>CFBundleIconFiles~ipad</key>
        <array>
                <string>Icon-76</string>
                <string>Icon-Small-40</string>
                <string>Icon-Small</string>
</array>

Also this is an old format, DO NOT USE!:

<key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Icon</string>
                <string>Icon-72</string>
                <string>Icon-120</string>
                ...
            </array>
        </dict>
    </dict>

Finally, I include the to links which helped me to figure out all this:

https://medium.com/@hellosunschein/launchimage-s-explained-33b88c02d027

https://github.com/MobiVM/robovm/issues/210