My React Native Expo cli app rejected from app store due to the following causes “Guideline 5.1.1 — Legal — Privacy — Data Collection and Storage” - react-native

We noticed that your app requests the user’s consent to access the photos, but doesn’t sufficiently explain the use of the photos in the purpose string.
To help users make informed decisions about how their data is used, all permission request alerts need to explain how your app will use the requested information.
Next Steps
Please revise the purpose string in your app’s Info.plist file for the photos to explain why your app needs access and include an example of how the user’s data will be used.
You can modify your app’s Info.plist file using the property list editor in Xcode.
But my app is developed by “React Native” expo cli. the app.json file configuration is shown following below also I have attached the app.json file of my application
EXPO SDK Version is “expo”: “44.0.0”,
React Native Version is “react-native”: “0.64.3”,
How I can overcome it? please help me

Related

Google Play Store App Reject - React native

App Reject2I have tried to upload my App on store, My App rejected every time .
** Issues ** : Violation of permission Policy.
Requested permissions do not match core functionality of the app
You declared Default SMS handler (and any other core functionality usage while default handler) as the core functionality of your app. However, after review, we found that your app does not match the declared use case(s). Learn more about permitted uses and exceptions.
Please either:
• Make changes to your app so that it meets the requirements of the declared core functionality or,
• Select a use case that matches your app’s functionality
Go android folder in your project and locate manefest.xml file in it.
Remove all the unnecessary permissions that were generated during project setup.
Google play like it that, you should only ask for permission that your App is using and you must state it in data policy how you are using the data in the App
Make sure you test all the functionalities before you upload.
Google is trying to prevent logic bomb here.
Finally App was published.
If you app continuous reject, Next time going to before submit check the following file locations / list available.
Upload new build and play store automatically remove the previous uploaded file(if already 3 build upload and got rejected & again upload a new 3 build with latest version code )

android.permission.CAMERA error when publishing app on play store

When publishing my app (using react native expo) on play store I got this error
APK or Android App Bundle must use authorizations that require a privacy policy: (android.permission.CAMERA).
But.... nothing that I have on my app requires camera!
if you read the message carefully you will see that you are using the permissions like camera and you don't supply a privacy policy. you need to supply a privacy policy if you do that. you can find more information about android privacy policy on google, for example here's the first link that came up in my search: https://www.iubenda.com/blog/privacy-policy-for-android-app/

Expo Notification askAsync() - Is there a way to customize the message?

I am using EXPO on a react native project and want to ask the user for push notification permission.
When I use the const {status} = await Permissions.askAsync(Permissions.NOTIFICATIONS); the message that appears is
"Expo" would like to send you notifications. Notifications may include sounds, badges, alerts and icon badges. These can be configured in settings.
My end user doesn't know what "Expo" is, they just know the app name. Is there a way for me to customize the "Expo" part to the app name?
How have people handled this when their app is ejected and push to the app store?
You can find the answer in here: https://docs.expo.io/distribution/app-stores/?redirected
Which says:
System permissions dialogs on iOS
If your app asks for system permissions from the user, e.g. to use the device's camera, or access photos, Apple requires an explanation for how your app makes use of that data. Expo will automatically provide a boilerplate reason for you, such as "Allow cool-app to access the camera", however these must be customized and tailored to your specific use case in order for your app to be accepted by the App Store. To do this, override these values using the ios.infoPlist key in app.json, for example:
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to scan barcodes on event tickets."
},
The full list of keys Expo provides by default can be seen here. Unlike with Android, on iOS it is not possible to filter the list of permissions an app may request at a native level. This means that by default, your app will ship with all of these default boilerplate strings embedded in the binary. You can provide any overrides you want in the infoPlist configuration. Because these strings are configured at the native level, they will only be published when you build a new binary with expo build.
You probably use Expo Go to develop your app , when you create standalone app (when you deploy the apk) it will show the app name that you specified in app.json.

How Expo(React Native) can access gallery and external storage without CAMERA_ROLL permission?

I have a terrible question..
I hope there is anyone who know this problem..
In EXPO App which is a wrapper API for React Native,
How can Expo Image picker example app can access Gallery(external storage) without requesting any external storage access permission to user???
original source code is here..
https://docs.expo.io/versions/latest/sdk/imagepicker/
I tried with removing any askAsync(CAMERA_ROLL.permission) or getAsync(CAMERA_ROLL.permission).
So the example app has no permission about accessing external storage...
BUT!! I press the button, It access the Gallery....
How can it be possible??
I double check permission on the app, but there is no granted permission to external storage...
Please let me know...
I think it is the appropriate thing which firstly asked permission, then access the external storage..
P.S I tested it with android phone only.
i have never checked permissions..
To stop expo app from having this permission, do the following:
Remove all reference to the permission requests (That you already did)
Remove the Image launcher (but it seems you don't want to do that)
Clear the expo application permission of media access
Step 3 is what you are looking for, to clear application settings go to your phones settings -> application management -> select expo app -> permissions and clear the gallery/media permission.
Now when you run the application again you will not be able to access the gallery even if you press the button as you mentioned and if you include the getAsync to request for permission you will be prompt with asking for permission.
EDIT:
To explicitly set permissions for stand alone applications modify your app.json file and add the "permissions" parameter under the android configurations there, by default expo uses all permissions of your device. specify there the permissions you want your application to have.
Please refer to this link for further details on how to configure your app.json file.
Hope this helps!

How to get the URI scheme of any app for AppLinks/universal linking?

I need to open a third-party app from my react native mobile app. I understand that this is called universal linking on iOS and AppLink on Android.
I have done a lot of research for this, and I have been able to set up a link to the third party app on the app store. Now I just need to get my app to open up the app if the user has it installed. That requires the URI scheme of the other app, though.
My question is, how do I get the URI scheme to this third party app? Rather, how do I get the URI scheme of any app? I know the URI scheme of the twitter app is 'twitter://app', but the app I am trying to link to is way more niche than twitter or other popular apps, so there is no help for this sort of thing online.
Any tips?
Finding the URL scheme of an iOS app
Due to Apple's tendency for secrecy, it's not easy to find the URL scheme of an iOS app. But it can be done. Here's how I do it, using a Mac app called iMazing.
Launch iMazing, select a connected iOS device, click Apps:
In the footer of the window, click Manage Apps:
Select the app you're interested in , then select Export .IPA menu item. Note: You may need to download the app first.
The saved file will have the .ipa extension. Change the extension to .zip, and unzip the file. You now have a directory with the name matching the app's name.
Assuming "asana" is the app name, open the file "asana/Payload/asana.app/Info.plist" in a text editor, and search for a section that contains "CFBundleURLSchemes". Assuming the app contains CFBundleURLSchemes (they are optional), it should look something like this:
The URL scheme is in the <string>asana</string>, so the complete url scheme in this case is "asana://". Test that the URL launches the app by typing it into iOS Safari browser window. If it works, Safari should display an alert like this:
What About Apps Without CFBundleURLSchemes?
I haven't found a way to launch apps without CFBundleURLSchemes directly, but you can link to the app's page in the App Store, where the user can open the app with the Open button (or Get button if the app is not installed).
You will need to obtain the app page's URL from the App Store:
Open App Store, go to the app's page, click the share icon:
Click Copy Link:
The URL will look like this:
https://apps.apple.com/us/app/asana-organize-tasks-work/id489969512
Clicking on that link in Safari will bring up the app page in the App Store.
Maybe it is worth to start with some background:
There are various ways to deep link into an app, and it depends on the platform (iOS\Android\WindowsPhone...) and its version.
On iOS, up until version 9, the way to open an app was by using URI schemes, e.g. the one you added above: twitter://app. Each app declares the scheme that should be used. Therefore in order to deep link into the app you wish to open, you'll need to use the scheme that it declared. This is the same for Android until version 6.
Starting iOS9+, Apple introduced Universal Links as the method for deep linking. Here's some information: https://developer.apple.com/ios/universal-links/
In these versions, URI schemes won't longer work when using Safari browser (which is the iOS default browser) if the app is not installed. If the app is installed, however, URI schemes should allow opening the app, if everything is configured successfully. In Android there's a similar method called "AppLinks".
Having said this, the above information is for setting deep link for your app. I do not think that it is a common use case to open a third party app from your app - deep links are configured and used by the app owner (e.g. for publishing his\her app to engage users).