我是葫芦新手,我正在尝试使用此处提供的示例应用程序(https://github.com/calabash/calabash-ios-example)来学习葫芦
我已经下载了压缩项目,并按照此处“使用 Xcode 手动设置”部分提供的步骤进行操作 - https://github.com/calabash/calabash-ios。
但是当我尝试构建项目时,它失败并出现以下错误。
由于无法解决错误,我删除了 -cal 方案,从 Xcode 项目的框架文件夹中删除了葫芦框架,并使用了“calabash-ios 设置”选项。这创建了一个新的 -cal 方案。但是当我尝试构建 -cal 方案时,我仍然会遇到以下错误。我检查了构建设置中的其他链接器标志,并将其设置为项目文件夹中的葫芦框架。
我能够在没有葫芦计划的情况下成功构建项目。所以这似乎是葫芦设置的问题。你能告诉我如何解决这个问题吗?
Build target LPSimpleExample-cal
Project LPSimpleExample | Configuration Debug | Destination iPhone 6 | SKD Simulator -iOS 8.0
Ld /Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Products/Debug-iphonesimulator/LPSimpleExample\ copy.app/LPSimpleExample\ copy normal i386
cd "/Users/eswar/Workspace/calabash projects/calabash-ios-example-2"
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Products/Debug-iphonesimulator -F/Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Products/Debug-iphonesimulator -F/Users/eswar/Workspace/calabash\ projects/calabash-ios-example-2 -filelist /Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Intermediates/LPSimpleExample.build/Debug-iphonesimulator/LPSimpleExample-cal.build/Objects-normal/i386/LPSimpleExample\ copy.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -force_load /Users/eswar/Workspace/calabash\ projects/calabash-ios-example-2/calabash.framework/calabash -lstdc++ -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.0 -framework CFNetwork -framework MapKit -framework UIKit -framework Foundation -framework CoreGraphics -framework calabash -Xlinker -dependency_info -Xlinker /Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Intermediates/LPSimpleExample.build/Debug-iphonesimulator/LPSimpleExample-cal.build/Objects-normal/i386/LPSimpleExample\ copy_dependency_info.dat -o /Users/eswar/Library/Developer/Xcode/DerivedData/LPSimpleExample-gwyzlvixnflcwydwrtizzsfiwete/Build/Products/Debug-iphonesimulator/LPSimpleExample\ copy.app/LPSimpleExample\ copy
Undefined symbols for architecture i386:
"_SecItemAdd", referenced from:
-[LPSSKeychainQuery save:] in calabash(LPSSKeychainQuery.o)
"_SecItemCopyMatching", referenced from:
-[LPSSKeychainQuery fetchAll:] in calabash(LPSSKeychainQuery.o)
-[LPSSKeychainQuery fetch:] in calabash(LPSSKeychainQuery.o)
"_SecItemDelete", referenced from:
-[LPSSKeychainQuery deleteItem:] in calabash(LPSSKeychainQuery.o)
"_kSecAttrAccessible", referenced from:
-[LPSSKeychainQuery save:] in calabash(LPSSKeychainQuery.o)
"_kSecAttrAccount", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecAttrLabel", referenced from:
-[LPSSKeychainQuery save:] in calabash(LPSSKeychainQuery.o)
"_kSecAttrService", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecAttrSynchronizable", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecAttrSynchronizableAny", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecClass", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecClassGenericPassword", referenced from:
-[LPSSKeychainQuery query] in calabash(LPSSKeychainQuery.o)
"_kSecMatchLimit", referenced from:
-[LPSSKeychainQuery fetchAll:] in calabash(LPSSKeychainQuery.o)
-[LPSSKeychainQuery fetch:] in calabash(LPSSKeychainQuery.o)
"_kSecMatchLimitAll", referenced from:
-[LPSSKeychainQuery fetchAll:] in calabash(LPSSKeychainQuery.o)
"_kSecMatchLimitOne", referenced from:
-[LPSSKeychainQuery fetch:] in calabash(LPSSKeychainQuery.o)
"_kSecReturnAttributes", referenced from:
-[LPSSKeychainQuery fetchAll:] in calabash(LPSSKeychainQuery.o)
"_kSecReturnData", referenced from:
-[LPSSKeychainQuery fetch:] in calabash(LPSSKeychainQuery.o)
"_kSecValueData", referenced from:
-[LPSSKeychainQuery save:] in calabash(LPSSKeychainQuery.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
此处发布了一个类似的问题,Joshua 建议升级到 Xcode 5.1.1 和 SDK 到 7.0。但我已经在使用 Xcode 6.01,以下是我的 SDK 版本:
SDK:OS X:10.9:(13F26) iOS:8.0:(12A365)
iOS 模拟器:7.1:(11D167)8.0:(12A365)
其他信息:
xcode安装位置 /Applications/Xcode.app/Contents/Developer
xcode 版本 Xcode 6.0.1 构建版本 6A317
葫芦版本 0.11.0
calabash.framework版本 0.11.0