libgdx IDEA 发布ipa到AppStore

在不清楚怎么用本身喜欢的开发环境发布app是一件很痛苦的事。通过一番google和蒙以后,终于成功提交build到AppStore。再次总结一下注意点,但愿能看见这篇嫖客的小伙伴都少走弯路。java

1. 在父项目的build.gradle中的project(":ios")中添加如下配置证书(红色字体)ios

project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"

    configurations { natives }

    dependencies {
        compile project(":core")
        compile "org.robovm:robovm-rt:${roboVMVersion}"
        compile "org.robovm:robovm-cocoatouch:${roboVMVersion}"
        compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
        compile fileTree(dir: 'libs', include: '*.jar')//add at 20140828 for 内购
    }
    robovm { iosSignIdentity = "iPhone Distribution: XXXXXXXXXXXX" iosProvisioningProfile = "xxxxx" }
}

注意iosSignIdentity里填的是钥匙串里的名字,而不是Xcode里看到的。个人Xcode里看到的是iOS Distribution,一直报找不到。app

至于怎么弄证书就本身google吧,不复杂。字体

2. 运行gradle的ios [createIPA]命令,建立ipa。gradle

3. 在iTunes Connect建立对应的App,下载ApplicationLoader并上传ipa。ui

--------------------------------------------------google

补充:spa

1. Info.plist.xml设定仅提供给iPhonecode

<key>UIDeviceFamily</key>
    <array>
        <integer>1</integer><!--iPhone/iPod-->
        <!--<integer>2</integer>iPad-->
    </array>

2. Info.plist.xml设定仅使用竖屏orm

<key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <!--<string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>-->
    </array>

3. 增长iOS7的120x120的icon,文件名能够是Icon-60@2x.png

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

4. 再次提交前,createIPA前修改版本号robovm.properties

app.version, app.build

相关文章
相关标签/搜索