React-native-background-geolocation: IOS Build fails

Created on 26 Mar 2019  ·  3Comments  ·  Source: transistorsoft/react-native-background-geolocation

  • Plugin version: 3.0.0-beta.4
  • Xcode version: 10.2
  • react-native-cli: 2.0.1
  • react-native: 0.59.2

Context

I am unable to build a fresh project with the latest release as receive 2 errors in RNBackgroundGeolocation.h:27;

  • No type or protocol named 'RCTInvalidating'
  • Reference to 'RCTInvalidating' is ambiguous

Steps to Reproduce

react-native init geolocation_test
cd geolocation_test
yarn add react-native-background-geolocation
react-native link react-native-background-geolocation
react-native link react-native-background-fetch
react-native link cocoa-lumberjack
react-native run-ios

Debug logs

In file included from /Users/***/dev/workspaces/geolocation_demo/node_modules/react-native-background-geolocation/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.m:8:
/Users/***/dev/workspaces/geolocation_demo/node_modules/react-native-background-geolocation/ios/RNBackgroundGeolocation/RNBackgroundGeolocation.h:27:55: error: reference to 'RCTInvalidating' is ambiguous

Most helpful comment

I have a report of this from a customer in the private repo:

Quick fix: RNBackgroundGeolocation.h

Change:
```diff
-if __has_include(“RCTInvalidating.h”)

  • #import “RCTInvalidating.h”
    -else
    #import
    -endif

All 3 comments

I have a report of this from a customer in the private repo:

Quick fix: RNBackgroundGeolocation.h

Change:
```diff
-if __has_include(“RCTInvalidating.h”)

  • #import “RCTInvalidating.h”
    -else
    #import
    -endif

thanks for the speedy reply much appreciated. ~will try that out now~ it worked, build is passing. thanks again

I will update the plugin in 3.0.0-rc.1 due out today.

Was this page helpful?
0 / 5 - 0 ratings