如何将iOS8代码段添加到Adobe Air iOS app.xml?

时间:2014-12-14 17:38:04

标签: ios iphone xml air

我正在使用Adobe Air构建iOS 8 iPhone应用程序,我想隐藏iOS的状态栏。我发现这个片段可以解决这个问题:

<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>   

如何将其添加到我的应用的app.xml? 我尝试了以下操作,但收到了 Unexpected element 错误消息:

<iPhone>
<InfoAdditions><![CDATA[
<key>UIStatusBarHidden</key>
<true/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>       
]]></InfoAdditions>
</iPhone>

1 个答案:

答案 0 :(得分:1)

如上所述here,您无法在XML

中定义该属性
  

AIR在生成的Info.plist文件中设置了几个条目以确保   应用程序和运行时功能正常工作。你不能   定义以下设置:

     

CFBundleDisplayName

     

CFBundleExecutable

     

CFBundleIconFiles

     

CFBundleIdentifier

     

CFBundleInfoDictionaryVersion

     

CFBundlePackageType

     

CFBundleResourceSpecification

     

CFBundleShortVersionString

     

CFBundleSupportedPlatforms

     

CFBundleVersion

     

CTAutoOrients

     

CTInitialWindowTitle

     

CTInitialWindowVisible

     

CTIosSdkVersion

     

CTMaxSWFMajorVersion

     

DTPlatformName

     

DTSDKName

     

MinimumOSVersion(保留至3.2)

     

NSMainNibFile

     

UIInterfaceOrientation

     

UIStatusBarHidden

     

UISupportedInterfaceOrientations

     

注意:您可以定义MinimumOSVersion。 MinimumOSVersion   定义在Air 3.3及更高版本中得到尊重。

但是,您可以在initialWindow节点中设置状态栏样式,如此

<fullScreen>true</fullScreen>
<systemChrome>none</systemChrome>

第一行将删除启动时的状态,第二行将在运行时删除