fix(android): add resolve queue to handle NsdManager single-resolve limitation#4
Conversation
|
This is a great find! 😅 |
c753d6c to
9af304d
Compare
- Add yarn.lock and package.json to cocoapods cache key to prevent stale codegen builds
|
Root cause of iOS example build failure: The CI was caching the ios/Pods directory based only on Podfile.lock. However, React Native's codegen generates C++ files (like RNServiceDiscoverySpecJSI-generated.cpp) based on the native module specs defined in the JS/TS code and the codegenConfig in package.json. When native code or dependencies changed but Podfile.lock stayed the same, the cached Pods directory contained stale Xcode build rules that referenced generated files that would no longer be created, resulting in:
Fix Extended the cocoapods cache key to include yarn.lock and package.json, so the cache invalidates when:
Also updated the runner to macos-15 and Ruby to 3.3 for better compatibility with current tooling. |


Problem: Android's NsdManager.resolveService() can only handle one resolve at a time. The library was calling it for every discovered service simultaneously, causing most calls to fail silently with error code 3 (FAILURE_ALREADY_ACTIVE).
Solution: Queue discovered services and resolve them one at a time:
This PR adds: