You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.
Hello, I want to integrate this package to leverage the proximity feature of the device.
I am checking this on iPhone 6s with 13.3.1, I haven't tried this on android.
Here's my package.json
Que-1: Should I use npm react-native-proximity or @grit96/react-native-proximity?
Now after installing I have properly linked this package by react-native link @grit96/react-native-proximity (Got the relevant message for the same on a console.)
App.js
import Proximity from '@grit96/react-native-proximity';
export default class App extends Component {
componentDidMount() {
Proximity.addListener(this._proximityListener);
}
_proximityListener(data) {
console.log('In _proximityListener===', data);
}
componentWillUnmount() {
Proximity.removeListener(this._proximityListener);
}
Other stuff...
This gives me an error on console like, TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNProximity.proximityEnabled')
I thought it might be due to linking, so I have tried to link this library manually by adding RNProximity.xcodeproj under the Libraries folder in XCode. And added libRNProximity.a under BuildPhase >Link Binary With Libraries, but that gives me an error like 'React/RCTBridge.h' file not found in RNProximity.m file
One more thing, my pod file get updated with this, pod 'react-native-proximity', :path => '../node_modules/@grit96/react-native-proximity'
But when I try to do pod install, it gives me an error like no .podspec file found at the location '../node_modules/@grit96/react-native-proximity'`. (Even if It's there.)
Can anyone please help me where I am going wrong? @williambout
The text was updated successfully, but these errors were encountered:
vivekshah-zymr
changed the title
Not able to integrate this npm properly.
Getting error while integrating this package.
May 27, 2020
Hello, I want to integrate this package to leverage the proximity feature of the device.
I am checking this on iPhone 6s with 13.3.1, I haven't tried this on android.
Here's my
package.json
Que-1: Should I use npm
react-native-proximity
or@grit96/react-native-proximity
?Now after installing I have properly linked this package by
react-native link @grit96/react-native-proximity
(Got the relevant message for the same on a console.)App.js
This gives me an error on console like,
TypeError: null is not an object (evaluating '_reactNative.NativeModules.RNProximity.proximityEnabled')
I thought it might be due to linking, so I have tried to link this library manually by adding
RNProximity.xcodeproj
under the Libraries folder in XCode. And addedlibRNProximity.a
under BuildPhase >Link Binary With Libraries, but that gives me an error like'React/RCTBridge.h' file not found
in RNProximity.m fileOne more thing, my pod file get updated with this,
pod 'react-native-proximity', :path => '../node_modules/@grit96/react-native-proximity'
But when I try to do pod install, it gives me an error like no
.podspec
file found at the location '../node_modules/@grit96/react-native-proximity'`. (Even if It's there.)Can anyone please help me where I am going wrong?
@williambout
The text was updated successfully, but these errors were encountered: