我几乎尝试了所有解决方案,但这对我不起作用。我有Xcode 6,我收到此错误。我也更新了可可豆荚并更新了豆荚文件。
安装更新后,我在下面添加了几行:
[!] From now on use `PocketLobbyiOS.xcworkspace`.
[!] The use of implicit sources has been deprecated. To continue using all of the sources currently on your machine, add the following to the top of your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
[!] The `PocketLobbyiOS [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods/Pods.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `PocketLobbyiOS [Release]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods/Pods.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] The `PocketLobbyiOS [Distribution]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods/Pods.distribution.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
[!] OHAttributedLabel has been deprecated in favor of DTCoreText
Sajs-MacBook-Pro:PockyiOS sk$
这就是我在podfile中的内容。我删除了podfile并重新安装但仍然出现同样的错误。
platform :ios, '6.0'
pod 'MWPhotoBrowser', :git => 'https://github.com/floriankrueger/MWPhotoBrowser.git', :tag => '1.4.1'
pod 'TestFlightSDK', '~> 3.0.2'
pod 'RestKit', '~> 0.23.1'
pod 'RestKit/ObjectMapping'
pod 'RestKit/Search'
pod 'RestKit/Testing'
pod 'PKRevealController', '~> 2.0.6'
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :tag => '1.2.0'
pod 'MagicalRecord/Shorthand', '~> 2.2'
pod 'DDPageControl', '~> 0.1'
pod 'MWPhotoBrowser'
pod 'Reachability', '~> 3.1.1'
pod 'Mixpanel', '~> 2.4.0'
pod 'OHAttributedLabel', '~> 3.5.4'
# ignore all warnings from all pods
inhibit_all_warnings!
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
再次重新安装pods后,Restkit错误消失但我的错误如下:
ld:警告:忽略文件/Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Products/Debug-iphonesimulator/PocketLobbyiOS.app/PocketLobbyiOS, 文件是为i386构建的,而不是被链接的体系结构 (x86_64的): /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Products/Debug-iphonesimulator/PocketLobbyiOS.app/PocketLobbyiOS 架构x86_64的未定义符号:
" _OBJC_CLASS _ $ _ PLArticle",引自: PLArticleTests.o中的objc-class-ref (也许你的意思是:_OBJC_CLASS _ $ _ PLArticleTests)" _OBJC_CLASS _ $ _PLLocation",引自: PLArticleTests.o中的objc-class-ref" _OBJC_CLASS _ $ _ XCTestCase",引自: _OBJC_CLASS _ $ _ PLArticleTests in PLArticleTests.o" _OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException",引用自: PLArticleTests.o中的GCC_except_table2" _OBJC_METACLASS _ $ _ XCTestCase",引自: _OBJC_METACLASS _ $ _ PLArticleTests in PLArticleTests.o" __ XCTDescriptionForValue",引自: - PLArticleTests.o中的[PLArticleTests testExample]" __ XCTFailureFormat",引自: - PLArticleTests.o中的[PLArticleTests testExample]" __ XCTFailureHandler",引自: - PLArticleTests.o中的[PLArticleTests testExample] ld:找不到架构x86_64 clang的符号:错误:链接器命令失败 退出代码1(使用-v查看调用)(null):" _OBJC_CLASS _ $ _ PLArticle",引自:
(null):PLArticleTests.o中的Objc-class-ref
(null):(也许你的意思是:_OBJC_CLASS _ $ _ PLArticleTests)
(null):" _OBJC_CLASS _ $ _PLLocation",引自:
(null):PLArticleTests.o中的Objc-class-ref
(null):" _OBJC_CLASS _ $ _ XCTestCase",引自:
(null):PLArticleTests.o中的_OBJC_CLASS _ $ _ PLArticleTests
(null):" _OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException",引用 从:
(null):PLArticleTests.o中的GCC_except_table2
(null):" _OBJC_METACLASS _ $ _ XCTestCase",引自:
(null):PLArticleTests.o中的_OBJC_METACLASS _ $ _ PLArticleTests
(null):" __ XCTDescriptionForValue",引自:
(null): - PLArticleTests.o中的[PLArticleTests testExample]
(null):" __ XCTFailureFormat",引自:
(null): - PLArticleTests.o中的[PLArticleTests testExample]
(null):" __ XCTFailureHandler",引自:
(null): - PLArticleTests.o中的[PLArticleTests testExample]
(null):找不到架构x86_64
的符号(null):链接器命令失败,退出代码为1(使用-v查看 调用)
Ld的 /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/PocketLobbyiOSTests 正常的i386 cd / Users / sanojkashyap / pocketlobbyiOS / PocketLobbyiOS export IPHONEOS_DEPLOYMENT_TARGET = 6.1 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 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L /用户/ sanojkashyap /库/开发商/ Xcode中/ DerivedData / PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz /编译/产品/调试,iphonesimulator -L / Users / sanojkashyap / pocketlobbyiOS / PocketLobbyiOS / Pods / Mapbox / Proj4 -L / Users / sanojkashyap / pocketlobbyiOS / PocketLobbyiOS / Pods / TestFlightSDK -F / Users / sanojkashyap / Library / Developer / Xcode / DerivedData / PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz / Build /产品/调试,iphonesimulator -F /应用/ Xcode.app /内容/开发/平台/ iPhoneSimulator.platform /开发商/软件开发工具包/ iPhoneSimulator8.0.sdk /开发/库/框架 -F / Applications / Xcode.app / Contents / Developer / Library / Frameworks -F / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / Library / Frameworks -F /应用/ Xcode.app /内容/开发/平台/ iPhoneSimulator.platform /开发商/软件开发工具包/ iPhoneSimulator8.0.sdk /开发/库/框架 -filelist /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/PocketLobbyiOSTests.LinkFileList -bundle_loader /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Products/Debug-iphonesimulator/PocketLobbyiOS.app/PocketLobbyiOS -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lPods-AFNetworking -lPods-DACircularProgress -lPods-DDPageControl -lPods-FMDB -lPods-GRMustache -lPods-ISO8601DateFormatterValueTransformer -lPods-JRSwizzle -lPods-MBProgressHUD -lPods-MWPhotoBrowser -lPods-MagicalRecord- lPods-Mapbox -lPods-Mixpanel -lPods-OHAttributedLabel -lPods-PKRevealController -lPods-PSTCollectionView -lPods-RKValueTransformers -lPods-Reachability -lPods-RestKit -lPods-SDWebImage -lPods-SMCalloutView -lPods-SOCKit -lPods-TestFlightSDK -lPods- TransitionKit -lProj4 -lTestFlight -lsqlite3 -lz -framework加速-framework AssetsLibrary -framework CFNetwork -framework CoreData -framework CoreGraphics -framework CoreLocation -framework CoreTelephony -framework CoreText -framework Foundation-framework ImageIO -framework MapKit -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min = 6.1 -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker / Users / sanojkashyap / Library /Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/PocketLobbyiOSTests_dependency_info.dat -o /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/PocketLobbyiOSTests
架构i386的未定义符号:" _OBJC_CLASS _ $ _ XCTestCase", 引自: _OBJC_CLASS _ $ _ PLArticleTests in PLArticleTests.o" _OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException",引用自: PLArticleTests.o中的GCC_except_table2" _OBJC_METACLASS _ $ _ XCTestCase",引自: _OBJC_METACLASS _ $ _ PLArticleTests in PLArticleTests.o" __ XCTDescriptionForValue",引自: - PLArticleTests.o中的[PLArticleTests testExample]" __ XCTFailureFormat",引自: - PLArticleTests.o中的[PLArticleTests testExample]" __ XCTFailureHandler",引自: - PLArticleTests.o中的[PLArticleTests testExample] ld:找不到架构i386 clang的符号:错误:链接器命令失败 退出代码1(使用-v查看调用)
答案 0 :(得分:3)
尝试将Pods.debug添加到您的项目中 - >信息 - >配置 - > Debug和Pods.release到Release部分。我解决了我遗失的' RestKit.h'这个设置的问题。
答案 1 :(得分:1)
尝试以这种方式编写podfile:
source 'https://github.com/CocoaPods/Specs.git'
link_with ['PocketLobbyiOS', 'PocketLobbyiOSTests']
platform :ios, '6.0'
pod 'MWPhotoBrowser', :git => 'https://github.com/floriankrueger/MWPhotoBrowser.git', :tag => '1.4.1'
pod 'TestFlightSDK', '~> 3.0.2'
pod 'RestKit', '~> 0.23.1'
pod 'RestKit/ObjectMapping'
pod 'RestKit/Search'
pod 'RestKit/Testing'
pod 'PKRevealController', '~> 2.0.6'
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :tag => '1.2.0'
pod 'MagicalRecord/Shorthand', '~> 2.2'
pod 'DDPageControl', '~> 0.1'
pod 'MWPhotoBrowser'
pod 'Reachability', '~> 3.1.1'
pod 'Mixpanel', '~> 2.4.0'
pod 'OHAttributedLabel', '~> 3.5.4'
# ignore all warnings from all pods
inhibit_all_warnings!
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
安装pod,并在项目Build Setting-> Other Linker Flags中添加$(继承)。