phonegap 上传应用程序时出错:您的二进制文件未针对 iPhone 5 进行优化

Posted

技术标签:

【中文标题】phonegap 上传应用程序时出错:您的二进制文件未针对 iPhone 5 进行优化【英文标题】:phonegap Error uploading app :Your binary is not optimized for iPhone 5 【发布时间】:2014-04-07 14:24:07 【问题描述】:

我尝试使用应用程序加载器上传我的 phonegap 应用程序(.ipa 文件),但它给出了以下错误

          ERROR ITMS-9000: "Your binary is not optimized for iPhone 5 -
     New iPhone apps and app updates submitted must support the 
    4-inch display on iPhone 5 and must include a launch 
    image with the -568h size modifier immediately following the
     <basename> portion of the launch image's filename.
     Launch images must be PNG files and located at the top-level of 
your bundle, or provided within each .lproj folder if you localize
 your launch images. Learn more about iPhone 5 support and app launch
 images by reviewing the 'ios Human Interface Guidelines' at 'https://developer.apple.com/library/ios/documentation/UserExperience
/Conceptual/MobileHIG/IconsImages/IconsImages.html#//apple_ref
/doc/uid/TP40006556-CH14-SW5' and the 'iOS App Programming Guide' at 
'https://developer.apple.com/library/ios/documentation/iPhone/Conceptual
/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW12'." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

我引用了许多样本,但在所有样本中它给出了相同的错误 我用phonegap document它仍然给出同样的错误

这是我的 config.xml

    <icon src="icon.png" />
    <icon src="icon@2x.png" />
   <icon src="Icon-Small.png" />
   <icon src="Icon-Small@2x.png" />  
   <icon src="Default.png" />
   <icon src="Default@2x.png" />   
    <icon src="icon-568h@2x.png" />   
    <icon src="icons/ios/57.png"            gap:platform="ios"       
   />
    <icon src="72.png"            gap:platform="ios"        
  />
    <icon src="72@2x.png" /> 
    <icon src="icons/ios/57-2x.png"         gap:platform="ios"       
   />
    <icon src="icons/ios/72-2x.png"         gap:platform="ios"        
  />
 <icon src="Icon-Small-50.png" />
    <icon src="Icon-Small-50@2x.png" />
  <icon src="Default-Landscape.png" />
    <icon src="Default-Landscape@2x.png" />
  <icon src="Default-Portrait.png" />
    <icon src="Default-Portrait@2x.png" />
  <icon src="Icon-40.png" />
    <icon src="Icon-40@2x.png" /> 
 <icon src="Icon-60.png" />
    <icon src="Icon-60@2x.png" /> 

 <icon src="Icon-76.png" />
    <icon src="Icon-76@2x.png" /> 
   <!-- Define app splash screen for each platform. -->
    <gap:splash src="splashScreen.png"  />
    <gap:splash src="icons/ios/screen-iphone-portrait.png"    gap:platform="ios" 
      />
    <gap:splash src="icons/ios/ios/screen-iphone-portrait-2x.png" gap:platform="ios" 
      />
    <gap:splash src="icons/ios/ios/screen-ipad-portrait.png"      gap:platform="ios"
       />
    <gap:splash src="icons/ios/ios/screen-ipad-landscape.png"     gap:platform="ios" 
      />

【问题讨论】:

您找到解决方案了吗?我正在经历同样的错误 这个图标对我有用:yazilimsozluk.com/phonegap-ios-uygulama-ikonlari Phonegap app submission to AppStore - ITMS-9000 error的可能重复 这需要重复,因为 ios dev 太糟糕了 【参考方案1】:

似乎我们缺少一些启动画面。您的应用在配置上应具有以下内容:

<gap:splash src="res/screen/ios/screen-iphone-portrait.png"          gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png"       gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-iphone-landscape.png"         gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png"      gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-ipad-portrait.png"            gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png"         gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-ipad-landscape.png"           gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png"        gap:platform="ios"       />
  <gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png"  gap:platform="ios"        />

将这些文件放在你的项目中,它就会工作。

【讨论】:

这个图标对我有用:yazilimsozluk.com/phonegap-ios-uygulama-ikonlari【参考方案2】:

是否需要加载所有图标和屏幕

<icon src="icon.png" gap:platform="ios"   />
<icon src="icon-60.png" gap:platform="ios"   />
<icon src="icon-60@2x.png" gap:platform="ios"   />
<icon src="icon@2x.png" gap:platform="ios"   />
<!-- iPad -->
<icon src="icon-72.png" gap:platform="ios"   />
<icon src="icon-72@2x.png" gap:platform="ios"   />
<icon src="icon-76.png" gap:platform="ios"   />
<icon src="icon-76@2x.png" gap:platform="ios"   />

<!-- Settings Icon -->
<icon src="icon-small.png" gap:platform="ios"   />
<icon src="icon-small@2x.png" gap:platform="ios"   />
<icon src="icon-50.png" gap:platform="ios"   />
<icon src="icon-50@2x.png" gap:platform="ios"   />

<!-- Spotlight Icon -->
<icon src="icon-40.png" gap:platform="ios"   />
<icon src="icon-40@2x.png" gap:platform="ios"   />
<!-- Define app splash screen for each platform. -->
<!-- iPhone and iPod touch -->
<gap:splash src="Default.png" gap:platform="ios"   />
<gap:splash src="Default@2x.png" gap:platform="ios"   />

<!-- iPhone 5 / iPod Touch (5th Generation) -->
<gap:splash src="Default-568h@2x.png" gap:platform="ios"   />

<!-- iPad -->
<gap:splash src="Default-Portrait.png" gap:platform="ios"   />
<gap:splash src="Default-Landscape.png" gap:platform="ios"   />

<!-- Retina iPad -->
<gap:splash src="Default-Portrait@2x.png" gap:platform="ios"   />
<gap:splash src="Default-Landscape@2x.png" gap:platform="ios"   />

【讨论】:

【参考方案3】:

使用上述回复对我有帮助,这里是我的图标和启动画面的完整列表

<!-- iPhone -->
<icon src="res/icon/ios/icon-57.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-57-2x.png"         gap:platform="ios"        />
<icon src="res/icon/ios/icon-60.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-60-2x.png"         gap:platform="ios"        />

<!-- iPad -->
<icon src="res/icon/ios/icon-72.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-72-2x.png"         gap:platform="ios"        />
<icon src="res/icon/ios/icon-76.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-76-2x.png"         gap:platform="ios"        />

<!-- Settings Icon -->
<icon src="res/icon/ios/icon-small.png"         gap:platform="ios"        />
<icon src="res/icon/ios/icon-small-2x.png"      gap:platform="ios"        />
<icon src="res/icon/ios/icon-50.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-50@2x.png"         gap:platform="ios"        />

<!-- Spotlight Icon -->
<icon src="res/icon/ios/icon-40.png"            gap:platform="ios"        />
<icon src="res/icon/ios/icon-40@2x.png"         gap:platform="ios"        />

<!-- WebOs -->
<icon src="res/icon/webos/icon-64.png"          gap:platform="webos" />

<!-- Windows -->
<icon src="res/icon/windows-phone/icon-48.png"  gap:platform="winphone" />
<icon src="res/icon/windows-phone/icon-173.png" gap:platform="winphone"   gap:role="background" />

<!-- Define app splash screen for each platform. -->
<!-- iPad -->
<gap:splash src="res/screen/ios/screen-ipad-landscape.png"          gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-ipad-landscape-2x.png"       gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-ipad-portrait.png"           gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-ipad-portrait-2x.png"        gap:platform="ios"       />

<!-- iPhone -->
<gap:splash src="res/screen/ios/screen-iphone-landscape.png"         gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-iphone-landscape-2x.png"      gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-iphone-portrait.png"          gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-iphone-portrait-2x.png"       gap:platform="ios"       />
<gap:splash src="res/screen/ios/screen-iphone-portrait-568h-2x.png"  gap:platform="ios"        />

【讨论】:

【参考方案4】:

我搜索了几天来找到同样问题的答案。我的解决方案是文件格式。 您只能使用 PNG。 文件名和路径无关紧要。我使用的是JPG,当我尝试上传我的二进制文件时,它一直抛出同样的错误,一旦我切换到PNG,它就可以完美地工作。

如果有人想要快速复制和粘贴,这里是所有图标和启动/启动大小。

<icon src="tools/images/icons/36.png"   gap:platform="android"      gap:qualifier="ldpi" />
<icon src="tools/images/icons/48.png"   gap:platform="android"      gap:qualifier="mdpi" />
<icon src="tools/images/icons/72.png"   gap:platform="android"      gap:qualifier="hdpi" />
<icon src="tools/images/icons/96.png"   gap:platform="android"      gap:qualifier="xhdpi" />
<icon src="tools/images/icons/29.png"   gap:platform="ios"            />
<icon src="tools/images/icons/40.png"   gap:platform="ios"            />
<icon src="tools/images/icons/50.png"   gap:platform="ios"            />
<icon src="tools/images/icons/57.png"   gap:platform="ios"            />
<icon src="tools/images/icons/58.png"   gap:platform="ios"            />
<icon src="tools/images/icons/60.png"   gap:platform="ios"            />
<icon src="tools/images/icons/72.png"   gap:platform="ios"            />
<icon src="tools/images/icons/76.png"   gap:platform="ios"            />
<icon src="tools/images/icons/80.png"   gap:platform="ios"            />
<icon src="tools/images/icons/100.png"  gap:platform="ios"            />
<icon src="tools/images/icons/114.png"  gap:platform="ios"            />
<icon src="tools/images/icons/120.png"  gap:platform="ios"            />
<icon src="tools/images/icons/144.png"  gap:platform="ios"            />
<icon src="tools/images/icons/152.png"  gap:platform="ios"            />
<icon src="tools/images/icons/64.png"   gap:platform="webos" />
<icon src="tools/images/icons/48.png"   gap:platform="winphone" />
<icon src="tools/images/icons/173.png"  gap:platform="winphone"     gap:role="background" />



<!-- Define app splash screen for each platform.    -->
<gap:splash src="tools/images/splash/android/320x426.9.png" gap:platform="android" gap:qualifier="ldpi" />
<gap:splash src="tools/images/splash/android/320x470.9.png" gap:platform="android" gap:qualifier="mdpi" />
<gap:splash src="tools/images/splash/android/480x640.9.png" gap:platform="android" gap:qualifier="hdpi" />
<gap:splash src="tools/images/splash/android/720x960.9.png" gap:platform="android" gap:qualifier="xhdpi" />
<gap:splash src="tools/images/splash/ios/320x480.png"       gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/640x960.png"       gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/640x1136.png"      gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/768x1024.png"      gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/1024x768.png"      gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/1536x2008.png"     gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/1536x2048.png"     gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/2048x1496.png"     gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/2048x1536.png"     gap:platform="ios"       />
<gap:splash src="tools/images/splash/ios/320x480.png"       gap:platform="winphone" />

同样,只有文件类型很重要。文件路径和文件名不重要; phonegap build 无论如何都会重命名所有内容。

【讨论】:

问题中没有一个非png;每张图片都是 PNG。【参考方案5】:

我解决了这个问题 有所有需要的图标 here

我重新提交所有应用 这是链接

https://itunes.apple.com/us/app/english-words-memory-game/id907071052?l=tr&ls=1&mt=8

https://itunes.apple.com/us/app/243/id896701562?l=tr&ls=1&mt=8

https://play.google.com/store/apps/details?id=com.hybridsoftware.game

https://play.google.com/store/apps/details?id=com.hybridsoftware.synonymsmemorygame

【讨论】:

以上是关于phonegap 上传应用程序时出错:您的二进制文件未针对 iPhone 5 进行优化的主要内容,如果未能解决你的问题,请参考以下文章

在phonegap上签署Android应用程序时出错

将 android app bundle 上传到 playstore 时出错。。您的 app bundle 的目标是无法识别的语言 jp

使用 Application Loader 将二进制文件上传到 iTunes 商店时出错

上传到 iOS 应用商店时出现错误“您的二进制文件无效”

在 App Store 上传应用程序时出错

将大型二进制文件上传到 SDL Tridion Multimedia Components 时出错