2012-04-09 15 views
0

私はアプリケーションのバージョン番号にアクセスする必要があるiOSアプリケーションで作業しています。 Info.plistにアクセスしてObjecitve-C + Xcodeの方が簡単だとわかります しかし、私はこの機能をCorona SDKに追加したいと思います。これは可能ですか?はいの場合はどうですか? 私はここにこだわっていて前に進まないので助けてください。iOSアプリケーションのバージョンを取得するCorona SDK

+0

単純にアプリケーションのバージョン番号で変数を作成して、自分で更新することはできませんか?可能であれば、[system.getPreference](http://developer.anscamobile.com/content/system-os)で利用可能になります。 –

答えて

0

ビルド時プロパティは、Lua構文を使用するオプションのbuild.settingsファイルで提供することができます。 hereのサンプルを使用して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" 
} 
関連する問題