0

アプリケーションのバージョン番号にアクセスする必要があるiOSアプリケーションに取り組んでいます。

Info.plistにアクセスすることで、Objective-C + Xcodeの方が簡単であることがわかりますが、CoronaSDKでこの機能が必要です。

これは可能ですか?はいの場合、どのように?
私はここで立ち往生していて前進できないので助けてください。

4

1 に答える 1

1

ビルド時のプロパティは、Lua構文を使用するオプションのbuild.settingsファイルで提供できます。ここに示すサンプルを使用して、plist値を設定および取得できます。

settings =
{
   orientation =
   {
       default = "portrait",
       supported =
       {
            "portrait", "portraitUpsideDown", "landscapeRight", "landscapeLeft"
     }
},


iphone =
{
    plist =
    {
        UIInterfaceOrientation = "UIInterfaceOrientationLandscapeRight",

        UISupportedInterfaceOrientations =
        {
            "UIInterfaceOrientationLandscapeLeft",
            "UIInterfaceOrientationLandscapeRight"
        },

        UIApplicationExitsOnSuspend = true,
        UIStatusBarHidden = true,
        UIPrerenderedIcon = true

       }
    }
}


settings.iphone.plist["UIInterfaceOrientation~ipad"] = "UIInterfaceOrientationPortrait"
settings.iphone.plist["UISupportedInterfaceOrientations~ipad"] = 
{
    "UIInterfaceOrientationPortrait",
    "UIInterfaceOrientationPortraitUpsideDown"
}
于 2012-04-12T16:43:49.560 に答える