Does anyone know what has changed in the Nearby Messages API service recently and could explain the described problem? (Only iOS applications with same bundleId
can communicate with each other.)
I created two iOS applications with different bundleId
s. These applications communicate with each other using the Nearby Messages API.
The applications worked properly - until about 2 weeks ago, the Nearby Messages service stopped working.
I suspect the Nearby Messages API changed because nothing was changed in the application code.
The following are logs from the NearbyMessages-1.1.1 library:
2020-12-23 15:34:38.330220+0100 Client[375:11734] Report RPC response: Success
2020-12-23 15:34:38.330582+0100 Client[375:11734] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2020-12-23 15:34:38.334692+0100 Client[375:11734] Tokens: 3 good, 0 bad, 0 broadcast
2020-12-23 15:34:38.334985+0100 Client[375:11734] Report RPC request: 3 token(s), 0 beacon(s), 3 directive(s)
2020-12-23 15:34:38.943624+0100 Client[375:11734] Report RPC response: Success
2020-12-23 15:34:38.943897+0100 Client[375:11734] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
2020-12-23 15:34:43.831088+0100 Client[375:11734] Tokens: 3 good, 0 bad, 0 broadcast
2020-12-23 15:34:43.831899+0100 Client[375:11734] Report RPC request: 3 token(s), 0 beacon(s), 3 directive(s)
2020-12-23 15:34:44.472385+0100 Client[375:11734] Report RPC response: Success
2020-12-23 15:34:44.472755+0100 Client[375:11734] Report RPC response: 0 directive(s), 3 token(s), 0 message(s), 0 publication results(s), 0 unpublish results(s), 0 subscription results(s), 0 unsubscribe results(s)
As you can see the library notices the presence of a second phone, however, the MessageFoundHandler
is not notified.
Only when I set the same bundleId
for both applications, the Nearby service starts to work again.
It appears Nearby Messages API has started to restrict message visibility only to recipients using the same bundleId
- at least that is what I am seeing.
Based on the documentation of the service:
5. The server facilitates message exchange between two devices when both are associated with a common token, and the API keys used by the calling apps are associated with the same project in the Google Developers Console.
Despite the above condition being met, the service does not work as it should when we have communication between different applications.
If it helps: I performed the tests using an iPhone 6s and an iPhone 11