Skip to content

Commit ea366c0

Browse files
Address review comments, fix CI to use right SDK name.
1 parent 125f6c7 commit ea366c0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/darwin.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
working-directory: src/darwin/Framework
5959
# Disable availability annotations, since we are not building a system
6060
# Matter.framework.
61-
run: xcodebuild -target "Matter" -sdk tvos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
61+
run: xcodebuild -target "Matter" -sdk appletvos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1'
6262
- name: Run iOS Build Debug
6363
working-directory: src/darwin/Framework
6464
# Disable availability annotations, since we are not building a system

src/platform/Darwin/DnssdContexts.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,20 @@ void ResolveContext::DispatchSuccess()
519519
bool needDelete = MdnsContexts::GetInstance().RemoveWithoutDeleting(this);
520520

521521
#if TARGET_OS_TV
522-
// On tvOS, priotize results from en0, en1, ir0 in that order, if those
522+
// On tvOS, prioritize results from en0, en1, ir0 in that order, if those
523523
// interfaces are present, since those will generally have more up-to-date
524524
// information.
525525
static const unsigned int priorityInterfaceIndices[] = {
526526
if_nametoindex("en0"),
527527
if_nametoindex("en1"),
528528
if_nametoindex("ir0"),
529529
};
530+
#else
531+
// Elsewhere prioritize "lo0" over other interfaces.
532+
static const unsigned int priorityInterfaceIndices[] = {
533+
if_nametoindex("lo0"),
534+
};
535+
#endif // TARGET_OS_TV
530536

531537
for (auto interfaceIndex : priorityInterfaceIndices)
532538
{
@@ -539,7 +545,6 @@ void ResolveContext::DispatchSuccess()
539545
return;
540546
}
541547
}
542-
#endif // TARGET_OS_TV
543548

544549
for (auto & interface : interfaces)
545550
{

0 commit comments

Comments
 (0)