代码之家  ›  专栏  ›  技术社区  ›  Ashwin Shrestha

cordova app中缺少框架的info.plist文件

  •  2
  • Ashwin Shrestha  · 技术社区  · 7 年前

    我有一个科尔多瓦应用程序,当编译和运行在设备运行良好,但当我上传到应用商店。“生成无效”。我还收到了苹果公司的邮件:iTunes Connect

    亲爱的开发者, 我们发现您的应用程序app_name最近交付的一个或多个问题。

    请更正以下问题,然后再次上载。

    1.)此捆绑包无效-缺少/payload/app_name.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/custom.framework或无法读取的info.plist文件。
    
    2.)无效的捆绑包-位于'/payload/app\name.app/www/js/cordova ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/custom.framework'的捆绑包不包含捆绑包可执行文件。
    
    3.)此捆绑包无效-/payload/app_name.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/customerbeddable.framework的info.plist文件丢失或无法读取。
    
    4.)无效捆绑包-位于'/payload/app_name.app/www/js/cordova ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/customerbeddable.framework'的捆绑包不包含捆绑包可执行文件。
    

    似乎找不到原因。构建如何在本地设备中工作,但在构建、存档和上载时,其构建无效。

    事先谢谢:)

    我的配置文件内容:

    <?xml version='1.0'encoding='utf-8'?>
    <widget id=“com.docandtrack.app”version=“2.0.1”xmlns=“http://www.w3.org/ns/widgets”xmlns:cdv=“http://cordova.apache.org/ns/1.0”>
    <name>文档和跟踪</name>
    <说明>
    卡车司机使用文档和跟踪系统的应用程序
    </description>
    <author email=“email”href=“endpoint link”>
    文档和跟踪
    </author>
    <content src=“index.html”/>
    <access origin=“*”/>
    <allow intent href=“http:/*/*”/>
    <allow intent href=“https:/*/*”/>
    <allow intent href=“tel:*”/>
    <allow intent href=“sms:*”/>
    <允许意向href=“mailto:*”/>
    <允许意向href=“geo:*”/>
    <preference name=“splashscreen”value=“screen”/>
    <platform name=“Android”>
    <允许意向href=“market:*”/>
    <preference name=“autohidesplashscreen”value=“true”/>
    <preference name=“fadesplashscreen”value=“false”/>
    <preference name=“SplashScreenDelay”value=“1500”/>
    <preference name=“splashShowOnlyFirstTime”value=“false”/>
    <splash density=“land hdpi”src=“res/android/screen.9.png”/>
    <splash density=“land ldpi”src=“res/android/screen.9.png”/>
    <splash density=“land mdpi”src=“res/android/screen.9.png”/>
    <splash density=“land xhdpi”src=“res/android/screen.9.png”/>
    <splash density=“port hdpi”src=“res/android/screen.9.png”/>
    <splash density=“port ldpi”src=“res/android/screen.9.png”/>
    <splash density=“port mdpi”src=“res/android/screen.9.png”/>
    <splash density=“port xhdpi”src=“res/android/screen.9.png”/>
    <icon density=“ldpi”src=“res/android/icon ldpi.png”/>
    <icon density=“mdpi”src=“res/android/icon mdpi.png”/>
    <icon density=“hdpi”src=“res/android/icon hdpi.png”/>
    <icon density=“xhdpi”src=“res/android/icon xhdpi.png”/>
    <icon density=“xhdpi”src=“res/android/icon xhdpi.png”/>
    <icon density=“xxxhdpi”src=“res/android/icon xxxhdpi.png”/>
    </platform>
    <platform name=“iOS”>
    <allow intent href=“itms:*”/>
    <allow intent href=“ITMS应用程序:*”/>
    <preference name=“backupwebstorage”value=“none”/>
    <preference name=“deployment target”value=“10.0”/>
    <splash height=“480”src=“res/ios/screen/default~iphone.png”width=“320”/>gt;
    <splash height=“960”src=“res/ios/screen/default@2x~iphone.png”width=“640”/>
    <splash height=“1024”src=“res/ios/screen/default pitalt~ipad.png”width=“768”/>gt;
    <splash height=“2048”src=“res/ios/screen/default pitalt@2x~ipad.png”width=“1536”/>gt;
    <splash height=“768”src=“res/ios/screen/default landscape~ipad.png”width=“1024”/>gt;
    <splash height=“1536”src=“res/ios/screen/default landscape@2x~ipad.png”width=“2048”/>gt;
    <splash height=“1136”src=“res/ios/screen/default-568h@2x~iphone.png”width=“640”/>
    <splash height=“1334”src=“res/ios/screen/default-667h.png”width=“750”/>gt;
    <splash height=“2208”src=“res/ios/screen/default-736h.png”width=“1242”/>gt;
    <splash height=“1242”src=“res/ios/screen/default-landscape-736h.png”width=“2208”/>gt;
    <icon height=“20”src=“res/ios/icon-20.png”width=“20”/>gt;
    <icon height=“40”src=“res/ios/icon-20@2x.png”width=“40”/>gt;
    <icon height=“180”src=“res/ios/icon-60@3x.png”width=“180”/>gt;
    <icon height=“120”src=“res/ios/icon-60@2x.png”width=“120”/>gt;
    <icon height=“167”src=“res/ios/icon-83.5@2x.png”width=“167”/>
    <icon height=“152”src=“res/ios/icon-76@2x.png”width=“152”/>
    <icon height=“76”src=“res/ios/icon-76.png”width=“76”/>
    <icon height=“80”src=“res/ios/icon-40@2x.png”width=“80”/>gt;
    <icon height=“60”src=“res/ios/icon-60.png”width=“60”/>
    <icon height=“87”src=“res/ios/icon-29@3x.png”width=“87”/>gt;
    <icon height=“58”src=“res/ios/icon-29@2x.png”width=“58”/>gt;
    <icon height=“29”src=“res/ios/icon-29.png”width=“29”/>gt;
    <icon height=“114”src=“res/ios/icon-57@2x.png”width=“114”/>gt;
    <icon height=“57”src=“res/ios/icon-57.png”width=“57”/>
    <icon height=“100”src=“res/ios/icon-50@2x.png”width=“100”/>gt;
    <icon height=“50”src=“res/ios/icon-50.png”width=“50”/>gt;
    <icon height=“144”src=“res/ios/icon-72@2x.png”width=“144”/>gt;
    <icon height=“72”src=“res/ios/icon-72.png”width=“72”/>
    <icon height=“1024”src=“res/ios/icon-1024.png”width=“1024”/>
    </platform>
    <plugin name=“Cordova plugin whitelist”spec=“1”/>
    <plugin name=“Cordova plugin splashscreen”spec=“~3.1.0”/>
    <plugin name=“Cordova plugin file transfer”spec=“~1.5.0”/>
    <plugin name=“Cordova plugin datepicker”spec=“~0.9.3”/>
    <plugin name=“cordova plugin statusbar”spec=“~2.1.0”/>gt;
    <plugin name=“Cordova插件对话框”spec=“~1.2.0”/>
    <plugin name=“docandtrack image plugin”/>
    <plugin name=“com.transistorsoft.cordova.background geolocation”spec=“https://github.com/transistorsoft/cordova-background-geolocation.git”/>
    <edit config file=“*-info.plist”mode=“merge”target=“nsMotionUsageDescription”>
    <string>仅当检测到设备正在移动时,才智能切换位置跟踪,从而提高电池效率</string>
    </edit配置
    <edit config file=“*-info.plist”mode=“merge”target=“nsphotoolibraryUsageDescription”>
    <string>存储文档需要照片库lt;/string>
    </edit配置
    <edit config file=“*-info.plist”mode=“merge”target=“nscamerausagedescription”>
    <string>存储文档需要相机</string>
    </edit配置
    <edit config file=“*-info.plist”mode=“merge”target=“nslocationalwaysand when niuseusagedescription”>
    <string>路由映射需要后台位置跟踪</string>
    </edit配置
    <edit config file=“*-info.plist”mode=“merge”target=“nslocationwhinuseusagedescription”>
    <string>路由映射需要位置跟踪</string>
    </edit配置
    <edit config file=“*-info.plist”mode=“merge”target=“nslocationUsageDescription”>
    <string>路由映射需要位置跟踪</string>
    </edit配置
    <preference name=“cordova background geoclocation license”value=“xxxxxxxx”/>
    <preference name=“Cordova background geolocation orderid”value=“XXXXXXXXXXX”/>
    <preference name=“AndroidPersistentFileLocation”value=“兼容性”/>
    <preference name=“statusbaroverlaysWebView”value=“false”/>
    <preference name=“statusbarbackgroundcolor”value=“2c3642”/>
    <preference name=“statusbarstyle”value=“blackopaque”/>
    <preference name=“disallowOvercroll”value=“true”/>
    <plugin name=“cordova plugin inappbrowser”spec=“~1.4.0”/>
    <plugin name=“cordova plugin file”spec=“^5.0.0”/>
    <plugin name=“Cordova plugin camera”spec=“^4.0.2”/>
    <plugin name=“Cordova Android支持Gradle版本”spec=“^1.3.0”>
    <variable name=“Android_支持_版本”value=“27.+”/>
    </plugin>
    <plugin name=“Cordova plugin sim”spec=“~1.3.3”/>
    <plugin name=“cordova plugin crosswalk webview”spec=“^2.2.0”>
    <variable name=“xwalk_version”value=“23+”/>
    <variable name=“xwalk_liteversion”value=“xwalk_core_library_canary:17+”/>
    <variable name=“xwalk_commandline”value=“--disable pull to refresh effect”/>gt;
    <variable name=“xwalk_mode”value=“embedded”/>
    <variable name=“xwalk_multipleapk”value=“true”/>
    </plugin>
    <plugin name=“cordova plugin device”spec=“^2.0.2”/>
    <engine name=“android”spec=“^6.3.0”/>
    <engine name=“ios”spec=“~4.5.4”/>
    </widget>
    

    更多信息:

    我的科尔多瓦版本是8.0.0 已安装平台:

    已安装平台: 安卓6.3.0 iOS 4.5.4版

    我的WWW文件夹结构屏幕截图:

    以下是我的JS文件夹内容:

    .

    Dear Developer,
    
    We identified one or more issues with a recent delivery for your app,  APP_NAME. 
    

    请更正以下问题,然后重新上载。

    1.) This bundle is invalid - The Info.plist file for /Payload/APP_NAME.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/Custom.framework is missing or could not be read.
    
    2.) Invalid Bundle - The bundle at '/Payload/APP_NAME.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/Custom.framework' does not contain a bundle executable.
    
    3.) This bundle is invalid - The Info.plist file for /Payload/APP_NAME.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/CustomEmbeddable.framework is missing or could not be read.
    
    4.) Invalid Bundle - The bundle at '/Payload/APP_NAME.app/www/js/cordova-ios/tests/spec/unit/fixtures/org.test.plugins.dummyplugin/src/ios/CustomEmbeddable.framework' does not contain a bundle executable.
    

    似乎找不到原因。构建如何在本地设备中工作,但是当构建、存档和上载时,它的构建无效。

    事先谢谢:)

    我的配置文件内容:

    <?xml version='1.0' encoding='utf-8'?>
    <widget id="com.docandtrack.app" version="2.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Doc and Track</name>
    <description>
        An App for Truckers to use the Doc and Track system
    </description>
    <author email="email" href="endpoint link">
        Doc and Track
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="SplashScreen" value="screen" />
    <platform name="android">
        <allow-intent href="market:*" />
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="FadeSplashScreen" value="false" />
        <preference name="SplashScreenDelay" value="1500" />
        <preference name="SplashShowOnlyFirstTime" value="false" />
        <splash density="land-hdpi" src="res/android/screen.9.png" />
        <splash density="land-ldpi" src="res/android/screen.9.png" />
        <splash density="land-mdpi" src="res/android/screen.9.png" />
        <splash density="land-xhdpi" src="res/android/screen.9.png" />
        <splash density="port-hdpi" src="res/android/screen.9.png" />
        <splash density="port-ldpi" src="res/android/screen.9.png" />
        <splash density="port-mdpi" src="res/android/screen.9.png" />
        <splash density="port-xhdpi" src="res/android/screen.9.png" />
        <icon density="ldpi" src="res/android/icon-ldpi.png" />
        <icon density="mdpi" src="res/android/icon-mdpi.png" />
        <icon density="hdpi" src="res/android/icon-hdpi.png" />
        <icon density="xhdpi" src="res/android/icon-xhdpi.png" />
        <icon density="xxhdpi" src="res/android/icon-xxhdpi.png" />
        <icon density="xxxhdpi" src="res/android/icon-xxxhdpi.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <preference name="BackupWebStorage" value="none" />
        <preference name="deployment-target" value="10.0" />
        <splash height="480" src="res/ios/screen/Default~iphone.png" width="320" />
        <splash height="960" src="res/ios/screen/Default@2x~iphone.png" width="640" />
        <splash height="1024" src="res/ios/screen/Default-Portrait~ipad.png" width="768" />
        <splash height="2048" src="res/ios/screen/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="768" src="res/ios/screen/Default-Landscape~ipad.png" width="1024" />
        <splash height="1536" src="res/ios/screen/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="1136" src="res/ios/screen/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="res/ios/screen/Default-667h.png" width="750" />
        <splash height="2208" src="res/ios/screen/Default-736h.png" width="1242" />
        <splash height="1242" src="res/ios/screen/Default-Landscape-736h.png" width="2208" />
        <icon height="20" src="res/ios/icon-20.png" width="20" />
        <icon height="40" src="res/ios/icon-20@2x.png" width="40" />
        <icon height="180" src="res/ios/icon-60@3x.png" width="180" />
        <icon height="120" src="res/ios/icon-60@2x.png" width="120" />
        <icon height="167" src="res/ios/icon-83.5@2x.png" width="167" />
        <icon height="152" src="res/ios/icon-76@2x.png" width="152" />
        <icon height="76" src="res/ios/icon-76.png" width="76" />
        <icon height="80" src="res/ios/icon-40@2x.png" width="80" />
        <icon height="60" src="res/ios/icon-60.png" width="60" />
        <icon height="87" src="res/ios/icon-29@3x.png" width="87" />
        <icon height="58" src="res/ios/icon-29@2x.png" width="58" />
        <icon height="29" src="res/ios/icon-29.png" width="29" />
        <icon height="114" src="res/ios/icon-57@2x.png" width="114" />
        <icon height="57" src="res/ios/icon-57.png" width="57" />
        <icon height="100" src="res/ios/icon-50@2x.png" width="100" />
        <icon height="50" src="res/ios/icon-50.png" width="50" />
        <icon height="144" src="res/ios/icon-72@2x.png" width="144" />
        <icon height="72" src="res/ios/icon-72.png" width="72" />
        <icon height="1024" src="res/ios/icon-1024.png" width="1024" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <plugin name="cordova-plugin-splashscreen" spec="~3.1.0" />
    <plugin name="cordova-plugin-file-transfer" spec="~1.5.0" />
    <plugin name="cordova-plugin-datepicker" spec="~0.9.3" />
    <plugin name="cordova-plugin-statusbar" spec="~2.1.0" />
    <plugin name="cordova-plugin-dialogs" spec="~1.2.0" />
    <plugin name="docandtrack-image-plugin" />
    <plugin name="com.transistorsoft.cordova.background-geolocation" spec="https://github.com/transistorsoft/cordova-background-geolocation.git" />
    <edit-config file="*-Info.plist" mode="merge" target="NSMotionUsageDescription">
        <string>Using the accelerometer increases battery-efficiency by intelligently toggling location-tracking only when the device is detected to be moving</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
        <string>Photo library is required for storing documents</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
        <string>Camera is required for storing documents</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysAndWhenInUseUsageDescription">
        <string>Background location-tracking is required for route mapping</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
        <string>Location tracking is required for route mapping</string>
    </edit-config>
    <edit-config file="*-Info.plist" mode="merge" target="NSLocationUsageDescription">
        <string>Location tracking is required for route mapping</string>
    </edit-config>
    <preference name="cordova-background-geolocation-license" value="xxxxxxxxxxx" />
    <preference name="cordova-background-geolocation-orderId" value="xxxxxxxxxxxx" />
    <preference name="AndroidPersistentFileLocation" value="Compatibility" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#2C3642" />
    <preference name="StatusBarStyle" value="blackopaque" />
    <preference name="DisallowOverscroll" value="true" />
    <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0" />
    <plugin name="cordova-plugin-file" spec="^5.0.0" />
    <plugin name="cordova-plugin-camera" spec="^4.0.2" />
    <plugin name="cordova-android-support-gradle-release" spec="^1.3.0">
        <variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-sim" spec="~1.3.3" />
    <plugin name="cordova-plugin-crosswalk-webview" spec="^2.2.0">
        <variable name="XWALK_VERSION" value="23+" />
        <variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+" />
        <variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect" />
        <variable name="XWALK_MODE" value="embedded" />
        <variable name="XWALK_MULTIPLEAPK" value="true" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^2.0.2" />
    <engine name="android" spec="^6.3.0" />
    <engine name="ios" spec="~4.5.4" />
    </widget>
    

    更多信息:

    我的科尔多瓦版本是8.0.0 已安装平台:

    已安装平台: 安卓6.3.0 iOS 4.5.4版

    我的WWW文件夹结构屏幕截图:

    Platform folder structure

    WWW folder structure

    以下是我的JS文件夹内容:

    js folder content 1

    1 回复  |  直到 7 年前
        1
  •  1
  •   jcesarmobile    7 年前

    问题是你拥有整个 cordova-ios 库代码在您的 js 文件夹。就像你所有的 科多瓦IOS 代码,它还包含测试,其中包括 dummyplugin 测试,其中包含无效的自定义框架,这些框架未通过Apple验证。

    你也不用再加了 cordova-android 或者你的插件和libs。现在,删除整个cordova ios文件夹,重新构建应用程序。

    需要的 科多瓦IOS 代码和插件代码由 cordova prepare 命令并复制到适当的 appName/platforms/ios/www 文件夹。