Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing NSLocationAlwaysUsageDescription in Info.plist without any GeoLocation Usage in 0.61.5 (ITMS-90683) #28200

Open
fritzfr opened this issue Feb 28, 2020 · 13 comments
Labels
API: Geolocation Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. Never gets stale Prevent those issues and PRs from getting stale Platform: iOS iOS applications.

Comments

@fritzfr
Copy link

fritzfr commented Feb 28, 2020

Description:

I am getting E-Mail from Apple after submitting to App Store Connect regarding ITMS-90683. It basically says that I have to include NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription in my Info.plist because they say that my

app's code references one or more APIs that access sensitive user data.

Now, I do not use any of react natives geolocation functions. I have scanned my whole repo for anything regarding these APIs, and the only thing which came up was RCTConvert+CoreLocation.h (https://github.com/facebook/react-native/blob/master/React/Views/RCTConvert%2BCoreLocation.h) and it's ".m" file. These do import "CoreLocation", which could be enough to trigger this E-Mail, as suggested here.

See this issue for explaining the whole background: #20879.

React Native version:

System:
    OS: macOS Mojave 10.14.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
    Memory: 22.33 MB / 16.00 GB
    Shell: 5.3 - /bin/zsh
  Binaries:
    Node: 12.12.0 - /usr/local/bin/node
    npm: 6.13.6 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-28 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-eject: 0.1.2

Steps To Reproduce

  1. Bootstrap a clean react native app.
  2. Submit it to App Store connect.

Expected Results

As Geolocation was supposed to be extracted from the core, I wonder why I still get this warning. I do not consider adding the mentioned values in my plist, as I expect that it will most likely show on some user facing screen that the app is using location services when it is definitely not.

@hramos hramos added API: Geolocation Platform: iOS iOS applications. Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. and removed Needs: Triage 🔍 labels Feb 28, 2020
@hramos
Copy link
Contributor

hramos commented Feb 28, 2020

Thank you for filing a new issue. The old one was closed after Geolocation was removed from core, but it looks like this needs some follow up.

@maschad
Copy link
Contributor

maschad commented Mar 5, 2020

The <CoreLocation/CoreLocation.h> is being imported in the RCTCameraRollManager.mm class, which is actually scheduled to be removed from Core as mentioned here - I am not too sure why CameraRollManager would require it though as it is unused in that class.

@fritzfr
Copy link
Author

fritzfr commented Mar 10, 2020

@maschad Thanks for the PR. Hope this will get merged.

@maschad
Copy link
Contributor

maschad commented Mar 10, 2020

Did apple approve your build after you applied the fix? @felix-voicehub because currently I don't have a means of how I could write a test for this

@fritzfr
Copy link
Author

fritzfr commented Mar 10, 2020

@maschad I'm only on testflight currently. With "fix" you mean just manually applying your PR to my repo?

@maschad
Copy link
Contributor

maschad commented Mar 10, 2020

@felix-voicehub yes, or you could do it via npm using the command npm install --save maschad/react-native#remove-corelocation

facebook-github-bot pushed a commit that referenced this issue Mar 16, 2020
#28300)

Summary:
This PR is to address #28200

Even though GeoLocation was extracted from the Core, there are still libraries i.e. the CoreLocation.h library included which cause Apple to reject Apps, as mentioned here.

This removed all references to the CoreLocation library that where remaining.

## Changelog

[iOS] [Removed] - Message
Pull Request resolved: #28300

Test Plan:
- Flow check passes.
- RNTest built successfully.

Differential Revision: D20441145

Pulled By: shergin

fbshipit-source-id: 03faa4d20dc15cea931b42f34f13814df9c94a01
@fritzfr
Copy link
Author

fritzfr commented Apr 28, 2020

@maschad It took me a while but I finally applied the 2 PRs (https://github.com/facebook/react-native/pull/28326/files and https://github.com/facebook/react-native/pull/28300/files) to my own repo.

I am still getting an E-Mail from Apple, however, instead of 2 notices (NSLocationAlwaysUsageDescription and NSLocationWhenInUseUsageDescription missing), there is now only 1 item with NSLocationWhenInUseUsageDescription in that e-mail. I have no idea where that comes from. It seems however not mandatory to fix it, as it says just before that notice:

Though you are not required to fix the following issues, we wanted to make you aware of them

@stale
Copy link

stale bot commented Jul 27, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 27, 2020
@fritzfr
Copy link
Author

fritzfr commented Jul 28, 2020

Yes this is still an issue. Just tried again with a new RN project on 0.63.1.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 28, 2020
@stale
Copy link

stale bot commented Dec 26, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 26, 2020
@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Apr 11, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 9, 2023
@Muha-coinmotion
Copy link

Muha-coinmotion commented Oct 11, 2023

Yes, this is still an issue. Just tried again with a new RN project on 0.72. Can I simply remove the permission, if I am not using any location service, then no need to add this permission in the info.plist.

@github-actions github-actions bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 12, 2023
@cortinico cortinico added the Never gets stale Prevent those issues and PRs from getting stale label Oct 13, 2023
@longnguyen2508
Copy link

longnguyen2508 commented Mar 12, 2024

Why is NSLocationWhenInUseUsageDescription set in Info.plist file as react-native init default?
Tried on React Native 0.73.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: Geolocation Impact: App Rejected Describes an issue that may result in the app getting rejected from an app store. Never gets stale Prevent those issues and PRs from getting stale Platform: iOS iOS applications.
Projects
None yet
Development

No branches or pull requests

6 participants