Я создаю свое приложение PhoneGap, используя сервис PhoneGap Build.Мое приложение использует сканер штрих-кода PhoneGap.Все отлично компилируется и генерирует и файл ipa, который я отправляю в обзор магазина приложений.После успешной отправки я получаю электронное письмо от Apple об ошибках, связанных с отсутствием NSPhotoLibraryUsageDescription и NSPhotoLibraryUsageDescription.Я исследовал эту проблему и попробовал различные сборки и повторные представления безуспешно.Я использую PhoneGap версии 8.0 локально, но похоже, что по умолчанию в сборке PhoneGap используется сборщик cli-6.5.0.
Я пробовал теги edit-config, а также теги custom-config-file, у меня естьпоместите их внутри родительского тега.
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
<string>This app needs access to your photo library to select barcode images</string>
</edit-config>
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>This app needs access to your camera to scan barcodes</string>
</edit-config>
<custom-config-file parent="NSPhotoLibraryUsageDescription" platform="ios" target="*-Info.plist">
<string>This app needs access to your photo library to select barcode images</string>
</custom-config-file>
<custom-config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
<string>This app needs access to your camera to scan barcodes</string>
</custom-config-file>
Я также добавил переменные к тегу плагина сканера штрих-кода:
<plugin name="phonegap-plugin-barcodescanner" spec="~6.0.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
<variable name="CAMERA_USAGE_DESCRIPTION" value="This app needs access to your camera to scan barcodes" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app needs access to your photo library to select barcode images" />
</plugin>
Я прочитал другие сообщения в StackOverflow, связанные с этой темой, но ничего не решает проблему.Каждый раз, когда я что-то пробую, я перестраиваюсь и повторно отправляю в Apple, но все равно получаю ту же самую неразрешенную ошибку.Мой полный XML-файл конфигурации приведен ниже.
<?xml version='1.0' encoding='utf-8'?>
<widget id="" version="2.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name></name>
<description>
</description>
<author email="" href="">
</author>
<content src="index.html" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="14" />
<plugin name="cordova-plugin-battery-status" source="npm" spec="~1.2.4" />
<plugin name="cordova-plugin-camera" source="npm" spec="~4.0.3" />
<plugin name="cordova-plugin-media-capture" source="npm" spec="~1.4.3" />
<plugin name="cordova-plugin-device" source="npm" spec="~1.1.6" />
<plugin name="cordova-plugin-dialogs" source="npm" spec="~1.3.3" />
<plugin name="cordova-plugin-file" source="npm" spec="~4.3.3" />
<plugin name="cordova-plugin-geolocation" source="npm" spec="~2.4.3" />
<plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.7" />
<plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.7.1" />
<plugin name="cordova-plugin-network-information" source="npm" spec="~1.3.3" />
<plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.5" />
<platform name="android">
<icon density="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />
<icon density="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />
<icon density="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="www/res/screen/android/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="www/res/screen/android/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="www/res/screen/android/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="www/res/screen/android/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="www/res/screen/android/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="www/res/screen/android/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="www/res/screen/android/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<icon height="57" platform="ios" src="www/res/icon/ios/icon.png" width="57" />
<icon height="114" platform="ios" src="www/res/icon/ios/icon@2x.png" width="114" />
<icon height="40" platform="ios" src="www/res/icon/ios/icon-40.png" width="40" />
<icon height="80" platform="ios" src="www/res/icon/ios/icon-40@2x.png" width="80" />
<icon height="50" platform="ios" src="www/res/icon/ios/icon-50.png" width="50" />
<icon height="100" platform="ios" src="www/res/icon/ios/icon-50@2x.png" width="100" />
<icon height="60" platform="ios" src="www/res/icon/ios/icon-60.png" width="60" />
<icon height="120" platform="ios" src="www/res/icon/ios/icon-60@2x.png" width="120" />
<icon height="180" platform="ios" src="www/res/icon/ios/icon-60@3x.png" width="180" />
<icon height="72" platform="ios" src="www/res/icon/ios/icon-72.png" width="72" />
<icon height="144" platform="ios" src="www/res/icon/ios/icon-72@2x.png" width="144" />
<icon height="76" platform="ios" src="www/res/icon/ios/icon-76.png" width="76" />
<icon height="152" platform="ios" src="www/res/icon/ios/icon-76@2x.png" width="152" />
<icon height="29" platform="ios" src="www/res/icon/ios/icon-small.png" width="29" />
<icon height="58" platform="ios" src="www/res/icon/ios/icon-small@2x.png" width="58" />
<icon height="87" platform="ios" src="www/res/icon/ios/icon-small@3x.png" width="87" />
<splash height="1136" platform="ios" src="www/res/screen/ios/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" platform="ios" src="www/res/screen/ios/Default-667h.png" width="750" />
<splash height="2208" platform="ios" src="www/res/screen/ios/Default-736h.png" width="1242" />
<splash height="1242" platform="ios" src="www/res/screen/ios/Default-Landscape-736h.png" width="2208" />
<splash height="1536" platform="ios" src="www/res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="768" platform="ios" src="www/res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" platform="ios" src="www/res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="1024" platform="ios" src="www/res/screen/ios/Default-Portrait~ipad.png" width="768" />
<splash height="960" platform="ios" src="www/res/screen/ios/Default@2x~iphone.png" width="640" />
<splash height="480" platform="ios" src="www/res/screen/ios/Default~iphone.png" width="320" />
</platform>
<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:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
<string>To scan barcodes</string>
</edit-config>
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
<plugin name="phonegap-plugin-barcodescanner" spec="~6.0.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
<variable name="CAMERA_USAGE_DESCRIPTION" value="This app needs access to your camera to scan barcodes" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="This app needs access to your photo library to select barcode images" />
</plugin>
</widget>