我的pod版本
pod --version
1.2.0.beta.1
我试着把我的sdk推到cocoapods
pod trunk push --use-libraries --allow-warnings --verbose
还有我的podspec.json
{
"name": "****",
"version": "3.0.0",
"summary": "",
"description": "",
"license": "MIT",
"platforms": {
"ios": "7.0"
},
"requires_arc": true,
"frameworks": [
"Foundation",
"CoreGraphics",
"UIKit",
"CoreTelephony",
"AudioToolbox",
"SystemConfiguration",
"CoreFoundation",
"CFNetwork",
"AVFoundation",
"CoreAudio",
"Security",
"CoreLocation"
],
"libraries": [
"sqlite3.0",
"z",
"resolv"
],
}
但是当使用xcodebuild构建时,它会失败,我收到错误
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/*****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App normal x86_64
cd /var/folders/pt/bs9qqr3518vfqns9p6wkf9_h0000gn/T/CocoaPods/Lint
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/****/.nvm/versions/node/v6.6.0/bin:/Users/****/.pyenv/shims:/Users/****/.pyenv/bin:/Users/****/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -L/Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Products/Release-iphonesimulator -L/var/folders/pt/bs9qqr3518vfqns9p6wkf9_h0000gn/T/CocoaPods/Lint/Pods/JCore -F/Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Products/Release-iphonesimulator -F/var/folders/pt/bs9qqr3518vfqns9p6wkf9_h0000gn/T/CocoaPods/Lint/Pods/JMessage -filelist /Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -object_path_lto -Xlinker /Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App_lto.o -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -ljcore-ios-1.1.0 -lresolv -lsqlite3.0 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreLocation -framework CoreTelephony -framework Foundation -framework JMessage -framework Security -framework SystemConfiguration -framework UIKit -weak_framework UserNotifications -framework Foundation -lPods-App -Xlinker -dependency_info -Xlinker /Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App_dependency_info.dat -o /Users/****/Library/Developer/Xcode/DerivedData/App-gyxbdimplseshvgwiyzdpehcncag/Build/Intermediates/App.build/Release-iphonesimulator/App.build/Objects-normal/x86_64/App
** BUILD FAILED **
因为我的SDK不支持i386。所以它会在i386中失败。
有没有办法忽略错误,我只是不想支持i386
答案 0 :(得分:0)
因为我依赖lib的架构是:armv7 armv7s x86_64 arm64
但我的lib包含的架构是:armv7 armv7s i386 x86_64 arm64
所以当pod trunk push时它将在i386中构建。
要修复此错误,请在.podspect文件中添加此代码
var selName = $("#ven").val();