Hello Beacons app not detecting virtual beacon (created with Beacon Simulator app) - sha1

I have followed the ten steps outlined in the Hello Beacon app tutorial at https://codelabs.developers.google.com/codelabs/hello-beacons/. There are no errors being thrown up during build. The only issue is that the virtual beacon (using Beacon Simulator app) is not detected by the Hello Beacon app. I know the problem is not with the beacon simulator because it gets detected by the beacon tools app by Google.
I don’t think there is any issue with the code because I have followed the tutorial exactly without deviation. However there are a few areas in the code and in the google developers console where parameters have to be defined. I suspect this could be causing the issue:
I am not sure if I have defined "some_namespace", "some_type" correctly.
SubscribeOptions options = new SubscribeOptions.Builder()
.setStrategy(Strategy.BLE_ONLY)
.setFilter(new MessageFilter.Builder()
.includeNamespacedType("some_namespace", "some_type").build())
.build();
Here are a few parameters I tried –
“beacon-proximity-app”, “impdata”
“a72d91966ecd43888771” (from the Beacon Simulator app), “beacon-proximity-app/imdata” (from Beacon Tools app)
“beacon-proximity-app/impdata”, “”
“beacon-proximity-app”, “string”
“a72d91966ecd43888771” (from the Beacon Simulator app), “beacon-proximity-app/string” (from Beacon Tools app)
I also tried implementing the code with and without -
.setFilter(new MessageFilter.Builder()
.includeNamespacedType("some_namespace", "some_type")
.build()
I am not sure where to run the command to generate the SHA1 fingerprint because I don’t completely understand its purpose. I have tried generating it from the .android folder, hello beacons folder and the JRE bin folder
Google Developers Console - SHA1 fingerprint / API Key
I have placed the API key created at Google Developers Console in the Android Manifest file at:
<meta-data
android:name="com.google.android.nearby.messages.API_KEY"
android:value="API_key_placed_here" />
I am not sure if that is the only place the API key needs to be placed.
I would appreciate any help from the community to resolve this issue.

I finally got it to work. The only issue was the access restriction that was set on the API key using the package name and SHA1 fingerprint. Once that was removed, the Hello Beacons app could detect my simulated beacon.
In the optional step 10, I'm not sure what causes the error. Does it have something to do with the package name provided (com.google.android.gms.nearby.messages.samples.hellobeacons), or the SHA1 key? Difficult to say.
Hope this helps.

Related

Google Map don't load in iOS

I’m using GoogleMaps pod in my iOS application and it was working fine, but in my last build, apple reject my application. And the reason behind that is, the map was unable to load at the time of review on iPad running iOS 12.2 on Wi-Fi.
I did try to reproduce that bug on my device but I couldn’t.
Application do ask for location permission
Google Place API key also seems ok.
Is there any way to identify what the actual issue is and how I am supposed to solve this one?
Finally, I've solved that issue and for that, I've done some of the changes in my project.
1 - I've patched the latest Google Plist file in the project (I wasn't sure whether the old one was latest or not)
2 - I was using multi language in my project so before setting the delegate of google map, I've set the language for my project.
3 - instead of set the google map from Storyboard, I've set the google map programmatically in my view controller after setting language.
After surfing for so long to solve this issue, I came to know that this issue occurs when your App supports multi language. These some steps did work for me.

React Native app asks iOS location permissions on first launch, but 0 references to geo/location code anywhere inside

So I have a React Native app, and when testing in iOS, on first launch it always asks for location while in use (within 1 second of opening). ie. "Allow XXX to access your location while you are using the app?" permission dialog.
I am using react-native-permissions for other stuff, but I've searched and searched my code and have 0 references to "geolocation","location","navigator",etc. Basically there no location code or geolocation code anywhere to be found.
Looking for help on how to diagnose this crazy issue. In my NPM modules, again nothing crazy there either that would depend on location. I've even deleted the "NSLocationWhenInUseUsageDescription" from info.plist and app still launches, doesn't crash and never prompts location dialog!
(This is on iOS 11.3)
Looking for advice.
Thanks
Check your Info.plist, you probably have either of these keys, or both:
NSLocationAlwaysAndWhenInUseUsageDescription
NSLocationAlwaysUsageDescription
As a result iOS will prompt for location access as soon as you launch your app.

Unable to simulate location on Xcode Version 9.0.1 (9A1004)

I'm working on a project where it's very often necessary to change the user's location, of course I included all the necessary data to simulate the location from the very beginning of the project. Today Xcode does not pretend to be a custom location, I decided to try to simulate one of the standard locations (for example San Francisco), but when I launch the application on a real device, my real location is displayed on the real device. I tried to run the application on the simulator, but got the same result. I did a clean project, rebooted the real device (iPhone 7), rebooted Xcode but it did not give results. I read a few topics, but they all relate to the fact that the developers did not include the simulation of the location in the scheme. How can I fix this problem? Thank you.
Update: I've updated Xcode, now I'm using Version 9.1 (9B55), but this did not fix this bug. Sometimes (once a week approximately), Xcode refuses to simulate even standard locations from the list (for example San Francisco). Although the menu above the consoles shows that the location simulates.
Info.plist contains
<key>NSLocationWhenInUseUsageDescription</key>
<string>Turn On Location Services to allow App to show you Events near you.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Turn On Location Services to allow App to show you Events near you.</string>
<key>NSLocationUsageDescription</key>
<string>Turn On Location Services to allow App to show you Events near you.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Turn On Location Services to allow App to show you Events near you.</string>
Update 1: Xcode does not simulate the location only on a real device (iPhone 7), two weeks ago there was no such problem. When I call CLLocationManager to show an alert, this alert on the real device is not shown at all. I repeat, this problem does not always repeat, this can happen once a week, but no methods help to restore this possibility to a working state.
I got the same problem and here's my work around.
You know the Location Services is not working when you don't see the arrow on status bar when you request location. So just turn Location Services off and on again. I guess this is a bug.
Go to Phone Settings > Location Services... then turn it off and on.
Xcode > Debug > Location Simulation
Simulator > Debug > Location > Custom Location (this will take what you set from step 2.)
You should see the arrow on status bar when you request location. If not... try the steps again.
First of everything ... Warning! , read this (from apple):
You are required to include the NSLocationWhenInUseUsageDescription and NSLocationAlwaysAndWhenInUsageDescription keys in your app's Info.plist file. (If your app supports iOS 10 and earlier, the NSLocationAlwaysUsageDescription key is also required.) If those keys are not present, authorization requests fail immediately.
Anyway, i just suggest make a simple test.
Make sure that you set Allow Location Simulation on the Run Scheme for your Debug Build Configuration on your target-
Run your App, switch to the Map app on simulator (is is the rfirst time you use, make sure you accept allow location dialog). -
Change the location on the location icon on Xcode (see below), and check that the map move to that location-
If everything is ok, the map app must show selected location
If your app is not able to follow same behaviour, maybe you are missing something. Further reading:
About Location Services and Maps
CoreLocation Framework Reference
Cheers.

BeaconTools iOS app : Error : Couldn't fetch registration data (while registering with EID)

I am currently working on iOS application which includes functionality on Beacons. I used google nearby API's for searching Beacon. While integrating Nearby API i am facing below issues.
I am trying to register Beacon (minewtech Eddystone) through "Beacon Tools" iOS application using Broadcast Profile "EID". But i got error while registering.
Same beacon registration succeed from Android version of "Beacon Tools".
I have followed all steps in https://developers.google.com/nearby/messages/ios/get-started tutorial but unfortunately application don't found any beacon even if beacons are registered(registered from android app) on google beacon dashboard.
I have downloaded sample application from googlesamples/ios-nearby and run it, but in this app also registered beacon was't detected. Where as in Android app it works fine.
I have created APP_Key from console project and used it while creating GNSMessageManager object.
Let me know if any additional setup require for iOS.
Please Find attached screenshot for reference.
Reference Error Image

IOS App Submission Routing App

I am trying to submit my app for review in Itunes Connect, but when I try to submit it I get an error:
To configure this app as an IOS routing app, upload a routing app
coverage file on the app's Version page in My Apps on iTunes Connect.
To configure your app as an IOS routing app, the app's Info.plist must
contain the MKDirectionsApplicationSupportedModes key.
So in my project, in the Capabilities, the Maps is turned off. I do have the MapKit.framework in my project, as I do utilize the map, however I do not ever show routing information nor provide it in my app. Is the fact that this framework in my project causing this ITunes Connect error, and if so, how do I go about fixing it. And by fixing it, I want it to turn off routing.
My app is not made to provide routing information, nor do I want to set it as an iOS routing app.
Any help would be appreciated.
I am using XCode 6.
I figured it out. In my info plist there was a document type name of MKDirectionsRequest. Removing that solved the problem.
From the apple docs
(To use the features of the Map Kit framework, you must turn on the
Maps capability in your Xcode project.)
above the entire paragraph.(https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/LocationAwarenessPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009497)
Location-based information consists of two pieces: location services
and maps. Location services are provided by the Core Location
framework, which defines Objective-C interfaces for obtaining
information about the user’s location and heading (the direction in
which a device is pointing). Maps are provided by the Map Kit
framework, which supports both the display and annotation of maps
similar to those found in the Maps app. (To use the features of the
Map Kit framework, you must turn on the Maps capability in your Xcode
project.) Location services and maps are available on both iOS and OS
X.
Not sure but maybe you only need to turn on mapkit
In my info.plist I had to delete two entries:
1) the document you referenced above - MKDirectionsRequest
and
2) MKDirectionsApplicationSupportedModes - MKDirectionsModeCar which is called "Maps routing app supported modes"
I just faced this exact issue last week.
I had accidentally turned on Map capabilities and turned it off later. Like your case, this didn't fix the issue.
I believe what fixed it was removing MapKit from here.
I was trying other things at the time so try this and if this isn't it then I'll see if something else I changed fix this.

Resources