tuya / tuya-home-ios-sdk-sample-objc

This sample demonstrates how to use Tuya Smart Home iOS SDK features in Objective-C.
https://developer.tuya.com/docs/app-development/ios-app-sdk/feature-overview?id=Ka5cgmlybhjk8
15 stars 10 forks source link

"_OBJC_CLASS_$_TYBaseService", referenced from: objc-class-ref in libTYSmartHouse.a(TYHomeDashboardService.o) #5

Closed qiaolw closed 3 years ago

qiaolw commented 3 years ago
  1. 使用pod文件如下 target 'TuyaAppSDKSample-iOS-ObjC' do pod 'SVProgressHUD' pod 'TuyaSmartHomeKit', '~> 3.29.5' pod 'TuyaSmartPanelBizBundle','~> 3.27.5' pod 'TuyaSmartSceneBizBundle','~> 3.27.5' end

  2. pod update 后 build 报错 Undefined symbols for architecture x86_64: "_OBJCCLASS$_TYBaseService", referenced from: objc-class-ref in libTYSmartHouse.a(TYHomeDashboardService.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

xiaoxuan-Tuya commented 3 years ago

若您希望在该Sample中引入UI业务包TuyaSmartSceneBizBundle,我们建议您不要指定TuyaSmartSceneBizBundleTuyaSmartHomeKit的版本。两个framework版本不同时可能因为依赖冲突而导致上述问题。您可以默认使用最新版本。

target 'TuyaAppSDKSample-iOS-ObjC' do
  pod 'SVProgressHUD'
  pod 'TuyaSmartHomeKit'
  pod 'TuyaSmartPanelBizBundle'
  pod 'TuyaSmartSceneBizBundle'
end
qiaolw commented 3 years ago

若您希望在该Sample中引入UI业务包TuyaSmartSceneBizBundle,我们建议您不要指定TuyaSmartSceneBizBundleTuyaSmartHomeKit的版本。两个framework版本不同时可能因为依赖冲突而导致上述问题。您可以默认使用最新版本。

target 'TuyaAppSDKSample-iOS-ObjC' do
  pod 'SVProgressHUD'
  pod 'TuyaSmartHomeKit'
  pod 'TuyaSmartPanelBizBundle'
  pod 'TuyaSmartSceneBizBundle'
end

你好,感谢回复,也试了这种方式, 但还是不行; 去掉 TuyaSmartSceneBizBundle 就build ok.

qiaolw commented 3 years ago

请确保您的Xcode版本为最新。若仍存在该问题,您可以直接下载UI业务包的sample。

我等下上传个 sample给你们看下;Xcode12.5,昨天也升级到了13. UI业务包集成的lib太多, 我们只需要场景与设备面板两个,UI业务包sample我去掉其它的,只要有 TuyaSmartSceneBizBundle就报同样的问题.

qiaolw commented 3 years ago

你好,这个好像只要随便新建个 工程,添加下面的内容 pod update后就会出现,不需要提供sample吧,你们那边能build OK? pod 'SVProgressHUD' pod 'TuyaSmartHomeKit' pod 'TuyaSmartPanelBizBundle' pod 'TuyaSmartSceneBizBundle'

taojingGino commented 3 years ago

@qiaolw 关于这个错误需要添加pod 'TuyaSmartBaseKit', '~>3.28.0',这个问题将在下个版本修复