Change camera and gps text access

Hi george

I was using the config.xml below in Phonegap, but in Voltbuilder the error (you said this code is deprecated), so i removed it and sent to apple, and they reprove, i need to describe in portugues why the app need to access camera and gps, how can i do it in VoltBuilder?

<platform name="ios">
    <plugin name="cordova-custom-config" version="*"/>
    <config-file platform="ios" target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
        <String>Necessita de acesso à sua localização para encontrar restaurantes próximos a você</String>
    </config-file>
    <config-file platform="ios" target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
        <String>Necessita de acesso à sua localização para encontrar restaurantes próximos a você</String>
    </config-file>
</platform>

<gap:config-file platform="ios" parent="NSPhotoLibraryUsageDescription">
    <String>Para leitura de QRCode</String>
</gap:config-file>

<gap:config-file platform="ios" parent="NSCameraUsageDescription">
    <String>Para leitura de QRCode</String>
</gap:config-file>

Error: 
UserError: Obsolete usage of in config.xml. Se

Apple requests:

Have a look at the docs.

Things which could go wrong tell you more about config-file.

Permissions has sample code for what you are trying to do.

i did read the doc, use it (copy, paste and change only text), but see the Voltbuilder compile error:

<platform name="ios">
  <edit-config target="NSLocationAlwaysUsageDescription" file="*-Info.plist" mode="overwrite">
    <String>Necessita de acesso à sua localização para encontrar restaurantes próximos a você</String>
  </edit-config>
  <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="overwrite">
    <String>Necessita de acesso à sua localização para encontrar restaurantes próximos a você</String>
  </edit-config>
  <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="overwrite">
    <String>Para leitura de QRCode</String>
  </edit-config>
  <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="overwrite">
    <String>Para leitura de QRCode</String>
  </edit-config>
</platform>

this question is most important to me, apple is not authorizing my app, can u help me?

You need to post the reason Apple is declining you before anyone can help.

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage

We noticed that your app requests the user’s consent to access their camera and location but does not clarify the use of the camera and location in the applicable purpose string.

Next Steps

Please revise the relevant purpose string in your app’s Info.plist file to specify why the app is requesting access to the user’s camera and location. You can modify your app’s Info.plist file using the property list editor in Xcode.

To help users understand why your app is requesting access to their personal data, all permission request alerts in your app should specify how your app will use the requested feature.

Resources

For additional information and instructions on requesting permission, please review the Requesting Permission section of the iOS Human Interface Guidelines and the Information Property List Key Reference. You may also want to review the Technical Q&A QA1937: Resolving the Privacy-Sensitive Data App Rejection page for details on how to provide a usage description for permission request alerts.

Please see attached screenshots for details.

I put the images in the head post… i need to change the camera and location text permission…

I really need to get on with it, can you help me? My app is stopped and I need to publish to apple

What’s the build number? There is probably more information in the log.

Calling plugman.install on plugin "/plugins/phonegap-plugin-barcodescanner" for platform "ios
Installing "phonegap-plugin-barcodescanner" for ios
Finding scripts for "before_plugin_install" hook from plugin phonegap-plugin-barcodescanner on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "phonegap-plugin-barcodescanner" on ios.
Failed to install 'phonegap-plugin-barcodescanner': Error: Unexpected key "NSLocationWhenInUseUsageDescription" while parsing <dict/>.
    at invariant (/node_modules/plist/lib/parse.js:53:11)
    at parsePlistXML (/node_modules/plist/lib/parse.js:121:9)
    at parsePlistXML (/node_modules/plist/lib/parse.js:101:23)
    at Object.parse (/node_modules/plist/lib/parse.js:71:15)
    at Object.getPackageName (/platforms/ios/cordova/lib/projectFile.js:80:39)
    at Api.addPlugin (/platforms/ios/cordova/Api.js:250:59)
    at handleInstall (/Users/voltbuilder/.nvm/versions/node/v12.18.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:561:10)
    at /Users/voltbuilder/.nvm/versions/node/v12.18.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:344:28
Unexpected key "NSLocationWhenInUseUsageDescription" while parsing <dict/>.
Error: Unexpected key "NSLocationWhenInUseUsageDescription" while parsing <dict/>.
    at invariant (/node_modules/plist/lib/parse.js:53:11)
    at parsePlistXML (/node_modules/plist/lib/parse.js:121:9)
    at parsePlistXML (/node_modules/plist/lib/parse.js:101:23)
    at Object.parse (/node_modules/plist/lib/parse.js:71:15)
    at Object.getPackageName (/platforms/ios/cordova/lib/projectFile.js:80:39)
    at Api.addPlugin (/platforms/ios/cordova/Api.js:250:59)
    at handleInstall (/Users/voltbuilder/.nvm/versions/node/v12.18.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:561:10)
    at /Users/voltbuilder/.nvm/versions/node/v12.18.3/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:344:28

i was looking for the build number, and now is compiling… i dont understand…

in time, was compiling in android… there is no build number in screen… or log.filebuildnumber

I think it’s because you’re using <String>, not <string>.

1 Like

Unbelievable!!! my bad… i did past code into visual studio and string changes to String…
Great!!! tks!!!