react-native-nearby-api-example's Issues
Hard crash without any error
Hi @adrianso ! I don't know where else to post this, but thanks for your changes to react-native-nearby-api
! Couldn't find your fork of it, but I've finally got it working on my app.
I do have a problem though. I'm getting a hard crash on Simulators and real devices without any error information.
When only using NearbyApi.connect()
everything works fine, but once I try to subscribe()
or publish()
the app crashes. (not instantly, but with a short delay).
My code:
const nearbyAPI = new NearbyAPI(true);
nearbyAPI.onFound((m) => {
if (typeof m === 'string') onNearbyUserFound(m);
});
nearbyAPI.onPublishFailed((message) => {
Logger.logError(`[NEARBY] Publishing User ID failed! ${message}`, new Error(`[GOOGLE-NEARBY] Publish failed! ${message}`));
});
nearbyAPI.onSubscribeFailed((message) => {
Logger.logError(`[NEARBY] Subscribing to messages failed! ${message}`, new Error(`[GOOGLE-NEARBY] Subscribing failed! ${message}`));
});
nearbyAPI.onConnectionFailure((message) => {
Logger.logError(`[NEARBY] Failed to connect BTE to Google Nearby! ${message}`, new Error(`[GOOGLE-NEARBY] Connection failure! ${message}`));
});
Logger.debug('[NEARBY] Connecting...');
nearbyAPI.connect(GOOGLE_NEARBY_API_KEY); // works fine
nearbyAPI.subscribe(); // executes
Logger.debug('[NEARBY] Connected!'); // executes
// about a second later the app crashes..
I'm guessing it has something to do with Bluetooth permissions, do you know how I can get this working?
Also, the library always includes Assets.car
in [CP] Copy Pods Resources
in Xcode Build Phases, do you know why this happens? Must be something in the podspec.. (See: badfeatures/react-native-nearby-api#33)
Thanks!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.