我正在使用Xamarin在C#中创建一个Appletvos项目,我需要使用VLCKIT库,我尝试使用Cocoapod和Sharpie来创建此项目,但我在
sharpie pod bind
它使用我的VLCKIT文件正确创建一个构建目录,但在说
之后Check dependencies
** BUILD SUCCEEDED **
error: unable to parse target SDK from platform in Podfile
我不明白,因为命令
pod install
工作正常。
这是我的podfile:
install! 'cocoapods', :integrate_targets => false
target 'ObjectiveSharpieIntegration' do
platform :tvos, '11.2'
use_frameworks!
pod 'TVVLCKit-unstable', '3.0.0a50'
end
这就是我的终端的样子
Berthiers-MacBook-Air:project berthierhadrien$ pod install
Analyzing dependencies
Downloading dependencies
Installing TVVLCKit-unstable (3.0.0a24)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
Berthiers-MacBook-Air:project berthierhadrien$ sharpie pod bind VLC_Binder
User defaults from command line:
IDEDerivedDataPathOverride = /Users/berthierhadrien/project/Pods/sharpie-build
=== BUILD TARGET Pods-ObjectiveSharpieIntegration OF PROJECT Pods WITH CONFIGURATION Release ===
Check dependencies
Write auxiliary files
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-all-non-framework-target-headers.hmap
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration.hmap
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-project-headers.hmap
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-generated-files.hmap
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-own-target-headers.hmap
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-all-target-headers.hmap
/bin/mkdir -p /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64
write-file /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration.LinkFileList
CompileC /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration-dummy.o Target Support Files/Pods-ObjectiveSharpieIntegration/Pods-ObjectiveSharpieIntegration-dummy.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/berthierhadrien/project/Pods
export LANG=en_US.US-ASCII
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/GDAL.framework/Programs"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=137 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu11 -fobjc-arc -fmodules -fmodules-cache-path=/Users/berthierhadrien/project/Pods/sharpie-build/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/berthierhadrien/project/Pods/sharpie-build/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DPOD_CONFIGURATION_RELEASE=1 -DCOCOAPODS=1 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mtvos-version-min=11.2 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fembed-bitcode-marker -iquote /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-generated-files.hmap -I/Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-own-target-headers.hmap -I/Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-all-target-headers.hmap -iquote /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Pods-ObjectiveSharpieIntegration-project-headers.hmap -I/Users/berthierhadrien/project/build/Release-appletvos/include -I/Users/berthierhadrien/project/Pods/Headers/Public -I/Users/berthierhadrien/project/Pods/Headers/Public/TVVLCKit-unstable -I/Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/DerivedSources/arm64 -I/Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/DerivedSources -F/Users/berthierhadrien/project/build/Release-appletvos -F/Users/berthierhadrien/project/Pods/TVVLCKit-unstable/TVVLCKit-binary -isystem /Users/berthierhadrien/project/Pods/Headers/Public -isystem /Users/berthierhadrien/project/Pods/Headers/Public/TVVLCKit-unstable -MMD -MT dependencies -MF /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration-dummy.d --serialize-diagnostics /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration-dummy.dia -c /Users/berthierhadrien/project/Pods/Target Support Files/Pods-ObjectiveSharpieIntegration/Pods-ObjectiveSharpieIntegration-dummy.m -o /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration-dummy.o
Libtool /Users/berthierhadrien/project/build/Release-appletvos/libPods-ObjectiveSharpieIntegration.a normal arm64
cd /Users/berthierhadrien/project/Pods
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/GDAL.framework/Programs"
export TVOS_DEPLOYMENT_TARGET=11.2
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only arm64 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS11.2.sdk -L/Users/berthierhadrien/project/build/Release-appletvos -filelist /Users/berthierhadrien/project/build/Pods.build/Release-appletvos/Pods-ObjectiveSharpieIntegration.build/Objects-normal/arm64/Pods-ObjectiveSharpieIntegration.LinkFileList -framework Foundation -o /Users/berthierhadrien/project/build/Release-appletvos/libPods-ObjectiveSharpieIntegration.a
** BUILD SUCCEEDED **
error: unable to parse target SDK from platform in Podfile
您知道一种解决此问题的方法还是如何创建我需要的绑定项目?
(也可以告诉我iOS库和TVOS库的说明是否与我发现iOS文档相同)
(我也可以在C#中使用Xamarin在TVOS项目中使用iOS,MacOS库)
谢谢
我知道已经有一段时间了,但是直到我遇到同一问题之前,我才发现这个。
我花了一段时间才弄清楚,但是由于错误消息的线索,我明白了。
这里发生的事情是客观的Sharpie 试图从Podfile 获得平台SDK。因此,遵循cocoapods语法参考在podfile >的末尾,只需添加:
platform :ios, '14.5' //14.5 or whatever
现在再次运行
sharpie pod bind
,如果一切顺利,它应该在结尾处输出
Binding...
[write] ApiDefinitions.cs
[write] StructsAndEnums.cs