From 5e7bef63856c6e7637952c51199da8adfdba827e Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Mon, 30 Jan 2023 09:47:43 -0800 Subject: [PATCH] Fixes to darwin/tv-casting-app's build due to zap changes (#24713) --- .../MatterTvCastingBridge.xcodeproj/project.pbxproj | 10 ++++++++++ .../MatterTvCastingBridge/CastingServerBridge.mm | 2 +- .../MatterTvCastingBridge/ContentApp.mm | 2 +- .../MatterTvCastingBridge/TargetNavigatorTypes.h | 4 ++-- .../MatterTvCastingBridge/TargetNavigatorTypes.mm | 8 ++++---- .../TvCasting/TvCasting.xcodeproj/project.pbxproj | 4 ++-- examples/tv-casting-app/linux/CastingShellCommands.cpp | 2 ++ .../tv-casting-common/include/TargetVideoPlayerInfo.h | 3 ++- .../tv-casting-common/src/CastingServer.cpp | 2 ++ .../tv-casting-common/src/TargetVideoPlayerInfo.cpp | 2 ++ 10 files changed, 28 insertions(+), 11 deletions(-) diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj index ef0579eca8eb50..ae049529c753e9 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge.xcodeproj/project.pbxproj @@ -407,9 +407,14 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", + /* Compile time codegen would need this: + "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", + */ "$(CHIP_ROOT)/zzz_generated/", "$(CHIP_ROOT)/zzz_generated/app-common", "$(CHIP_ROOT)/zzz_generated/controller-clusters", + /* darwin-specific bypassing compile time codegen for header inclusion */ + "$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -488,9 +493,14 @@ "$(CHIP_ROOT)/third_party/nlassert/repo/include", "$(CHIP_ROOT)/third_party/nlio/repo/include", "$(TEMP_DIR)/out/gen/include", + /* Compile time codegen would need this: + "$(TEMP_DIR)/out/gen/src/controller/data_model/zapgen/", + */ "$(CHIP_ROOT)/zzz_generated/", "$(CHIP_ROOT)/zzz_generated/app-common", "$(CHIP_ROOT)/zzz_generated/controller-clusters", + /* darwin-specific bypassing compile time codegen for header inclusion */ + "$(CHIP_ROOT)/zzz_generated/darwin/controller-clusters", ); INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index c8cfd5f2971681..cb73255f4e7252 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -1664,7 +1664,7 @@ - (void)targetNavigator_subscribeTargetList:(ContentApp * _Nonnull)contentApp while (iter.Next()) { const chip::app::Clusters::TargetNavigator::Structs::TargetInfoStruct::DecodableType & targetInfo = iter.GetValue(); - TargetNavigator_TargetInfoStruct * objCTargetInfo = [[TargetNavigator_TargetInfoStruct alloc] + TargetNavigator_TargetInfoStruct * objCTargetInfoStruct = [[TargetNavigator_TargetInfoStruct alloc] initWithIdentifier:@(targetInfo.identifier) name:[NSString stringWithUTF8String:targetInfo.name.data()]]; [objCTargetList addObject:objCTargetInfoStruct]; diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ContentApp.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ContentApp.mm index 5497224aabce2c..ac4649867bdb2a 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ContentApp.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/ContentApp.mm @@ -19,7 +19,7 @@ #import "ContentApp.h" -#include +#include @implementation ContentApp diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.h index c00eba2edcfdb8..327a7007852a54 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.h @@ -20,12 +20,12 @@ #ifndef TargetNavigatorTypes_h #define TargetNavigatorTypes_h -@interface TargetNavigator_TargetInfo : NSObject +@interface TargetNavigator_TargetInfoStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull identifier; @property (nonatomic, copy) NSString * _Nonnull name; -- (TargetNavigator_TargetInfo * _Nonnull)initWithIdentifier:(NSNumber * _Nonnull)identifier name:(NSString * _Nonnull)name; +- (TargetNavigator_TargetInfoStruct * _Nonnull)initWithIdentifier:(NSNumber * _Nonnull)identifier name:(NSString * _Nonnull)name; - (id _Nonnull)copyWithZone:(NSZone * _Nullable)zone; @end diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.mm index 5f3447d7165674..81ba139974fb0a 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/TargetNavigatorTypes.mm @@ -19,9 +19,9 @@ #import "TargetNavigatorTypes.h" -@implementation TargetNavigator_TargetInfo +@implementation TargetNavigator_TargetInfoStruct -- (TargetNavigator_TargetInfo * _Nonnull)initWithIdentifier:(NSNumber * _Nonnull)identifier name:(NSString * _Nonnull)name +- (TargetNavigator_TargetInfoStruct * _Nonnull)initWithIdentifier:(NSNumber * _Nonnull)identifier name:(NSString * _Nonnull)name { self = [super init]; if (self) { @@ -33,11 +33,11 @@ - (TargetNavigator_TargetInfo * _Nonnull)initWithIdentifier:(NSNumber * _Nonnull - (NSString *)description { - return [NSString stringWithFormat:@"TargetNavigator_TargetInfo: identifier=%@ name=%@", _identifier, _name]; + return [NSString stringWithFormat:@"TargetNavigator_TargetInfoStruct: identifier=%@ name=%@", _identifier, _name]; } - (id)copyWithZone:(NSZone * _Nullable)zone { - return [[TargetNavigator_TargetInfo alloc] initWithIdentifier:_identifier name:_name]; + return [[TargetNavigator_TargetInfoStruct alloc] initWithIdentifier:_identifier name:_name]; } @end diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj index 5ddb457fc7464f..28e88cc4b6dad2 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting.xcodeproj/project.pbxproj @@ -379,7 +379,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"TvCasting/Preview Content\""; - DEVELOPMENT_TEAM = KCRB72LX9T; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -449,7 +449,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"TvCasting/Preview Content\""; - DEVELOPMENT_TEAM = KCRB72LX9T; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; diff --git a/examples/tv-casting-app/linux/CastingShellCommands.cpp b/examples/tv-casting-app/linux/CastingShellCommands.cpp index ded04e87930dfc..136c0fef46625f 100644 --- a/examples/tv-casting-app/linux/CastingShellCommands.cpp +++ b/examples/tv-casting-app/linux/CastingShellCommands.cpp @@ -20,8 +20,10 @@ */ #include "CastingShellCommands.h" + #include "CastingServer.h" #include "CastingUtils.h" +#include "app/clusters/bindings/BindingManager.h" #include #include #include diff --git a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h index 9a0e9cab75e94a..f98116f3c7ca27 100644 --- a/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h +++ b/examples/tv-casting-app/tv-casting-common/include/TargetVideoPlayerInfo.h @@ -19,7 +19,8 @@ #pragma once #include "TargetEndpointInfo.h" -#include "app/clusters/bindings/BindingManager.h" + +#include #include constexpr size_t kMaxNumberOfEndpoints = 5; diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index adba7ff25454b9..f793f8a9ca7509 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -18,6 +18,8 @@ #include "CastingServer.h" +#include "app/clusters/bindings/BindingManager.h" + using namespace chip; using namespace chip::Controller; using namespace chip::Credentials; diff --git a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp index 7e1d13f7e4677a..f21fde3883256a 100644 --- a/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/TargetVideoPlayerInfo.cpp @@ -17,6 +17,8 @@ */ #include "TargetVideoPlayerInfo.h" +#include + using namespace chip; CASEClientPool gCASEClientPool;