Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.6k stars 290 forks source link

XCode 14 warning #373

Open cristianoccazinsp opened 1 year ago

cristianoccazinsp commented 1 year ago

Environment

System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 740.56 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.17.6 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 8.9.0 - /usr/local/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.1 AI-211.7628.21.2111.8309675
    Xcode: 14.0/14A309 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.14.1 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.67.4 => 0.67.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Platforms

iOS

Versions

Please add the used versions/branches

Description

After upgrading to XCode 14, the following warning shows when debugging. Looks like there's a chance to freeze the app under some circumstances.

Screen Shot 2022-09-13 at 12 09 17

Reproducible Demo

Regular use as documented:

Geolocation.getCurrentPosition(cb, {
 accuracy: {
    ios: 'best',
    android: 'high',
  },
  showLocationDialog: true,
  timeout: 30000,
  maximumAge: 0,
});

Expected Results

No warning

@Agontuk

Agontuk commented 1 year ago

I updated xcode to 14.0.1, but not seeing this warning. Can you check again ?

dkjeune commented 1 year ago

hi, i have the same error with xcode 14.0.1

This method can cause UI unresponsiveness if invoked on the main thread. Instead, consider waiting for the -locationManagerDidChangeAuthorization: callback and checking authorizationStatus first.

fukemy commented 1 year ago

hi, any solution now, in production build, sometimes I can not get location, no alert warning... I think this bug cause this issues

fukemy commented 1 year ago

@Agontuk, I am facing exactly same issue here, with XCode Version 14.0.1 (14A400), can u take a look?

hieuminh1810 commented 1 year ago

same issue - Xcode Version 14.0.1 (14A400)

Digicrest commented 1 year ago

Same issue on Xcode v14.2 (14C18)

gianpaj commented 1 year ago

same on Xcode 15 beta and iOS 17