Skip to content

Expand default info.plist to contain CFBundleIconFiles UILaunchImages #1868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sitefinitysteve opened this issue Jun 21, 2016 · 3 comments
Closed

Comments

@sitefinitysteve
Copy link

I personally strugged with this for days, and it pops up every other day on the slack channel I guess as people get to the "Ready to publish" point.

Could we perhaps change the default shipped info.plist stub that comes with {N} to include the full list of images, and people can just remove\rename them as needed instead of searching around trying to figure this out on their own?

<key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Default.png</string>
                <string>Default@2x.png</string>
                <string>Default-Landscape.png</string>
                <string>Default-Landscape@2x.png</string>
                <string>Default-Portrait.png</string>
                <string>Default-Portrait@2x.png</string>
                <string>icon.png</string>
                <string>icon-120.png</string>
                <string>icon-40.png</string>
                <string>icon-40@2x.png</string>
                <string>icon-40@3x.png</string>
                <string>icon-60.png</string>
                <string>icon-60@2x.png</string>
                <string>icon-60@3x.png</string>
                <string>icon-76.png</string>
                <string>icon-76@2x.png</string>
                <string>icon-72.png</string>
                <string>icon-72@2x.png</string>
                <string>icon-Small.png</string>
                <string>icon-Small-50.png</string>
                <string>icon-Small-50@2x.png</string>
                <string>icon-Small@2x.png</string>
                <string>icon-Small@3x.png</string>
                <string>icon@2x.png</string>
            </array>
            <key>UIPrerenderedIcon</key>
            <true/>
        </dict>
    </dict>
<key>UILaunchImages</key>
    <array>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{320, 480}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{320, 480}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-568h</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{320, 568}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-568h</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{320, 568}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-667h</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{375, 667}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-667h</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{375, 667}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-736h</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{414, 736}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape-736h</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{414, 736}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Portrait</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>8.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
    </array>

I'm not 100% sure if these are CORRECT, but the publish to the app store worked with this

@jlooper
Copy link

jlooper commented Jun 21, 2016

Amplifying this, to help the many folks on Slack who keep bumping up against this issue!

@PanayotCankov
Copy link
Contributor

Since this have been merged:
https://github.com/NativeScript/template-hello-world/commit/8a6cdcad2705b570c2a32b2d5365ef9cc7ddd985
We will no longer need to list icons nor launch screens in the Info.plist.

These will now be defined in asset catalog inside app/App_Resources.
The app/App_Resources/Assets.xcassets folder can be dragged over the Xcode icon to open a visual editor for the icons or can be generated using an external tool. The name of the icon and launch screen to be used is defined in the build.xcconfig, after that the build tool will take care to list the images from the asset catalog in the Info.plist in the produced app.

As an addition there is a LaunchScreen.storyboard file with one stretched and one cantered image that we hope will be sufficient to provide for dynamic size launch screen. This will replace the LaunchScreen.xib that used to be placed in the platforms/ios. You can opt out from the LaunchScreen.storyboards and use the static images by removing the LaunchScreen key and value in the app/App_Resources/Info.plist.

Any existing apps should be able to work the way they are, if you are to benefit from the new setup it would be best to create a new project and merge carefully the app/App_Resources contents from the new project onto the existing one.

We will follow up with article to elaborate on the new launch screen and icons structure for iOS.

@ghost
Copy link

ghost commented Mar 2, 2017

I am getting either in landscape mode or portrait mode , but not both please help me out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants