Closed iozzyi closed 1 year ago
I've created a patch commenting-out the line of code causing the issue and it seems to work now:
patches/@react-native-community+geolocation+3.0.5.patch
diff --git a/node_modules/@react-native-community/geolocation/ios/RNCGeolocation.mm b/node_modules/@react-native-community/geolocation/ios/RNCGeolocation.mm
index 5403680..9bfa163 100644
--- a/node_modules/@react-native-community/geolocation/ios/RNCGeolocation.mm
+++ b/node_modules/@react-native-community/geolocation/ios/RNCGeolocation.mm
@@ -389,9 +389,9 @@ - (void)locationManager:(CLLocationManager *)manager
CLLocation *location = locations.lastObject;
BOOL mocked = NO;
- if (@available(iOS 15.0, *)) {
- mocked = location.sourceInformation.isSimulatedBySoftware;
- }
+ // if (@available(iOS 15.0, *)) {
+ // mocked = location.sourceInformation.isSimulatedBySoftware;
+ // }
_lastLocationEvent = @{
@"mocked": @(mocked),
Environment
Platforms
iOS -
npx react-native run-ios
Versions
Description
After installing
@react-native-community/geolocation
the iOS build started failing on a C++ compilation error.Steps to reproduce
@react-native-community/geolocation
withyarn add @react-native-community/geolocation
as per the READMEcd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
npx react-native run-ios
Also tried clearing the pod cache and rebuilding from scratch, same result.
rm -rf ~/Library/Caches/CocoaPods && rm -rf ~/Library/Developer/Xcode/DerivedData/* && cd ios && rm -rf Pods && pod deintegrate && pod setup && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
npx react-native run-ios