Podspec 依赖于 Google-Analytics Cocoapods 0.36
Podspec with dependencies to Google-Analytics Cocoapods 0.36
我的私人 podspec 有一个很大的问题,在我们更新到 cocoapods 0.35 之前一切正常。
规范不是很复杂,但取决于 GoogleAnalytics-iOS-SDK
这是我们的 pod 规范:
{
"name": "RKTagManager",
"version": "0.0.1",
"summary": "Google TagManager wrapper.",
"license": {
"type" : "Closed Source",
"text" : "This library is as is, not warrenty of any kind."
}
"platforms": {
"ios": "5.1.1"
},
"requires_arc" : true,
"source": {
"hg": "<snip",
"revision" : "RKTagManager-0.0.1"
},
"dependencies": {
"GoogleAnalytics-iOS-SDK": []
},
"source_files": [
"Source/RKTagManager/*.{h,m}"
]
}
当我尝试验证它时,编译失败并显示以下消息:
Ld /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager normal i386
cd /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/Pods
export IPHONEOS_DEPLOYMENT_TARGET=5.1.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/<snip>/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Release-iphonesimulator/Pods -F/var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Release-iphonesimulator/Pods -filelist /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager.LinkFileList -install_name @rpath/RKTagManager.framework/RKTagManager -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1.1 -framework Foundation -framework GoogleAnalytics_iOS_SDK -framework OIFoundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager_dependency_info.dat -o /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager
ld: warning: embedded dylibs/frameworks only run on iOS 8 or later
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TAGManager", referenced from:
objc-class-ref in RKTagManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我只是不明白为什么它再也找不到 TAGManager 调用了。
我正在使用 Xcode 6.2,RKTagManager
是 iOS.
的替代品
解决方案似乎是强制 CocoaPods 将 pod 规范构建为一个库。由于0.36
pods 正在构建一个框架,而不是一个孤独的框架。
使用 --use-libraries
编译为 pod 规范作为框架的库实例。
您可以这样做:
pod repo push OIPods RKTagManager.podspec.json --use-libraries
我的私人 podspec 有一个很大的问题,在我们更新到 cocoapods 0.35 之前一切正常。
规范不是很复杂,但取决于 GoogleAnalytics-iOS-SDK
这是我们的 pod 规范:
{
"name": "RKTagManager",
"version": "0.0.1",
"summary": "Google TagManager wrapper.",
"license": {
"type" : "Closed Source",
"text" : "This library is as is, not warrenty of any kind."
}
"platforms": {
"ios": "5.1.1"
},
"requires_arc" : true,
"source": {
"hg": "<snip",
"revision" : "RKTagManager-0.0.1"
},
"dependencies": {
"GoogleAnalytics-iOS-SDK": []
},
"source_files": [
"Source/RKTagManager/*.{h,m}"
]
}
当我尝试验证它时,编译失败并显示以下消息:
Ld /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager normal i386
cd /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/Pods
export IPHONEOS_DEPLOYMENT_TARGET=5.1.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/<snip>/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.2.sdk -L/var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Release-iphonesimulator/Pods -F/var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Release-iphonesimulator/Pods -filelist /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager.LinkFileList -install_name @rpath/RKTagManager.framework/RKTagManager -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=5.1.1 -framework Foundation -framework GoogleAnalytics_iOS_SDK -framework OIFoundation -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager_dependency_info.dat -o /var/folders/9r/y21mxssd6rgf6gbrlhqsqv5m0000gp/T/CocoaPods/Lint/build/Pods.build/Release-iphonesimulator/Pods-RKTagManager.build/Objects-normal/i386/RKTagManager
ld: warning: embedded dylibs/frameworks only run on iOS 8 or later
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_TAGManager", referenced from:
objc-class-ref in RKTagManager.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我只是不明白为什么它再也找不到 TAGManager 调用了。
我正在使用 Xcode 6.2,RKTagManager
是 iOS.
解决方案似乎是强制 CocoaPods 将 pod 规范构建为一个库。由于0.36
pods 正在构建一个框架,而不是一个孤独的框架。
使用 --use-libraries
编译为 pod 规范作为框架的库实例。
您可以这样做:
pod repo push OIPods RKTagManager.podspec.json --use-libraries