为什么iOS构建在PhoneGap构建上失败

时间:2020-04-18 16:08:17

标签: ios cordova phonegap

我正在使用PhoneGap Build构建iOS应用程序进行编译。我以前曾使用PGB为iOS进行编译,但是由于某些原因,构建失败并显示以下错误消息:

Check dependencies
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value 
for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in 
the build settings editor.
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value 
for targets which use Swift. Supported values are: 3.0, 4.0, 4.2. This setting can be set in 
the build settings editor.

** ARCHIVE FAILED **


The following build commands failed:
Check dependencies
(1 failure)
Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/private/project/cordova/node_modules/cordova- 
common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

我对cordova和phonegap还是比较陌生,我不知道是什么导致了错误。我曾尝试对其进行研究,但找不到对我的情况有所帮助的任何东西。我怀疑它可能与某个插件有关,但是我不确定是哪个插件导致了该问题或如何解决该问题。

我的config.xml是

...
<content src="index.html" />
<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
<preference name="Fullscreen" value="false" />
<preference name="CameraUsesGeolocation" value="true" />
<preference name="phonegap-version" value="cli-9.0.0" />
<icon src="www/img/icon.png" />
<platform name="android">
    <preference name="android-targetSdkVersion" value="28" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="2000" />
    <preference name="SplashMaintainAspectRatio" value="false" />
    <preference name="FadeSplashScreen" value="500" />
    <preference name="AutoHideSplashScreen" value="true" />
    <icon density="mdpi" height="48" platform="android" src="www/img/android/icons/icon-48-mdpi.png" width="48" />
    <icon density="hdpi" height="72" platform="android" src="www/img/android/icons/icon-72-hdpi.png" width="72" />
    <icon density="xhdpi" height="96" platform="android" src="www/img/android/icons/icon-96-xhdpi.png" width="96" />
    <icon density="xxhdpi" height="144" platform="android" src="www/img/android/icons/icon-144-xxhdpi.png" width="144" />
    <icon density="xxxhdpi" height="192" platform="android" src="www/img/android/icons/icon-192-xxxhdpi.png" width="192" />
    <allow-intent href="market:*" />
    <preference name="Fullscreen" value="false" />
    <preference name="CameraUsesGeolocation" value="true" />
    <config-file parent="/*" target="AndroidManifest.xml">
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
        <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
        <uses-feature android:name="android.hardware.location.gps" />
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
        <uses-permission android:name="android.permission.CAMERA" />
        <uses-feature android:name="android.hardware.camera" android:required="true" />
        <uses-permission android:name="android.permission.INTERNET" />
    </config-file>
</platform>
<platform name="ios" target="*-Info.plist" parent="NSCameraUsageDescription" overwrite="true">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
    <preference name="UseSwiftLanguageVersion" value="3.0" />
    <string>Allow the app to use your camera</string>
</platform>
<plugin name="com.subitolabs.android.cordova.galleryapi" source="git" spec="https://github.com/cordova-plugin-camera-preview/cordova-plugin-camera-preview.git">
    <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="26" />
</plugin>
<plugin name="cordova-plugin-camera-preview" />
<plugin name="cordova-plugin-chooser" />
<plugin name="cordova-plugin-filepath" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.4" />
<plugin name="cordova-plugin-geolocation" spec="~4.0.2" />
<plugin name="cordova-plugin-file" spec="~6.0.2" />
<plugin name="cordova-plugin-device" spec="~2.0.3" />

我将不胜感激。预先谢谢

0 个答案:

没有答案