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
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:
constnearbyAPI=newNearbyAPI(true);nearbyAPI.onFound((m)=>{if(typeofm==='string')onNearbyUserFound(m);});nearbyAPI.onPublishFailed((message)=>{Logger.logError(`[NEARBY] Publishing User ID failed! ${message}`,newError(`[GOOGLE-NEARBY] Publish failed! ${message}`));});nearbyAPI.onSubscribeFailed((message)=>{Logger.logError(`[NEARBY] Subscribing to messages failed! ${message}`,newError(`[GOOGLE-NEARBY] Subscribing failed! ${message}`));});nearbyAPI.onConnectionFailure((message)=>{Logger.logError(`[NEARBY] Failed to connect BTE to Google Nearby! ${message}`,newError(`[GOOGLE-NEARBY] Connection failure! ${message}`));});Logger.debug('[NEARBY] Connecting...');nearbyAPI.connect(GOOGLE_NEARBY_API_KEY);// works finenearbyAPI.subscribe();// executesLogger.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!
The text was updated successfully, but these errors were encountered:
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 tosubscribe()
orpublish()
the app crashes. (not instantly, but with a short delay).My code:
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!
The text was updated successfully, but these errors were encountered: