我几乎尝试了所有解决方案,但这对我没有用。我在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


更新

再次重新安装Pod后,Restkit错误消失了,但出现以下错误:


  ld:警告:忽略文件/Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhdss/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 _ $ _ XCTestCase”中的objc-class-ref,引用自:
        PLArticleTests.o中的_OBJC_CLASS _ $ _ PLArticleTests“ _OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException”,引用自:
        PLArticleTests.o“ _OBJC_METACLASS _ $ _ XCTestCase”中的GCC_except_table2,引用自:
        _OBJC_METACLASS _ $ _ PLArticleTests在PLArticleTests.o“ __XCTDescriptionForValue”中,引用自:
        -PLArticleTests.o“ __XCTFailureFormat”中的[PLArticleTests testExample],引用自:
        -PLArticleTests.o“ __XCTFailureHandler”中的[PLArticleTests testExample],引用自:
        -[PLArticleTests testExample]在PLArticleTests.o ld中:找不到体系结构x86_64 clang的符号:错误:链接器命令失败
  退出代码为1(使用-v查看调用)
  
  (空):“ _OBJC_CLASS _ $ _ PLArticle”,引用自:
  
  (空):PLArticleTests.o中的Objc-class-ref
  
  (空):(也许您是说:_OBJC_CLASS _ $ _ PLArticleTests)
  
  (空):“ _OBJC_CLASS _ $ _ PLLocation”,引用自:
  
  (空):PLArticleTests.o中的Objc-class-ref
  
  (空):“ _OBJC_CLASS _ $ _ XCTestCase”,引用自:
  
  (空):PLArticleTests.o中的_OBJC_CLASS _ $ _ PLArticleTests
  
  (空):“ _ OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException”,已引用
  从:
  
  (空):PLArticleTests.o中的GCC_except_table2
  
  (空):“ _OBJC_METACLASS _ $ _ XCTestCase”,引用自:
  
  (空):PLArticleTests.o中的_OBJC_METACLASS _ $ _ PLArticleTests
  
  (空):“ __XCTDescriptionForValue”,引用自:
  
  (空):PLArticleTests.o中的-[PLArticleTests testExample]
  
  (空):“ __XCTFailureFormat”,引用自:
  
  (空):PLArticleTests.o中的-[PLArticleTests testExample]
  
  (空):“ __XCTFailureHandler”,引用自:
  
  (空):PLArticleTests.o中的-[PLArticleTests testExample]
  
  (空):找不到架构x86_64的符号
  
  (空):链接器命令失败,退出代码为1(使用-v查看
  调用)
  
  d
  /Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/Pocket
  普通的i386
      cd /用户/ sanojkashyap / pocketlobbyiOS / PocketLobbyiOS
      出口IPHONEOS_DEPLOYMENT_TARGET = 6.1
      导出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 / Build / Products / Debug-iphonesimulator
  -L / Users / sanojkashyap / pocketlobbyiOS / PocketLobbyiOS / Pods / Mapbox / Proj4 -L / Users / sanojkashyap / pocketlobbyiOS / PocketLobbyiOS / Pods / TestFlightSDK -F / Users / sanojkashyap / Library / Developer / Xcket-xwfhbxbfzfz /产品/ Debug-iphonesimulator
  -F / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator8.0.sdk / Developer / Library / Frameworks
  -F / Applications / Xcode.app / Contents / Developer / Library / Frameworks -F / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / Library / Frameworks
  -F / Applications / Xcode.app / Contents / Developer / Platforms / iPhoneSimulator.platform / Developer / SDKs / iPhoneSimulator8.0.sdk / Developer / Library / Frameworks
  -文件列表/Users/sanojkashyap/Library/Developer/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-Normal/List
  -bundle_loader /用户/ sanojkashyap /库/开发人员/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-MBProds-Record lPods-Mapbox -lPods-Mixpanel -lPods-OHAttributedLabel -lPods-PKRevealController -lPods-PSTCollectionView -lPods-RKValueTransformers -lPods-Reachability -lPods-RestKit -lPods-SDWebImage -lPods-SMCalloutView -lPods-SDKit -L TransitionKit -lProj4 -lTestFlight -lsqlite3 -lz -framework加速-framework AssetsLibrary -framework CFNetwork -framework
  CoreData-框架CoreGraphics-框架CoreLocation-框架
  CoreTelephony-框架CoreText-框架基础-框架
  ImageIO-框架MapKit-框架MessageUI-框架
  MobileCoreServices-框架QuartzCore-框架安全
  -framework SystemConfiguration-框架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 /用户/ sanojkashyap /库/开发人员/Xcode/DerivedData/PocketLobbyiOS-euffofwxmoaqxqbfslgkbnhhzdsz/Build/Intermediates/PocketLobbyiOS.build/Debug-iphonesimulator/PocketLobbyiOSTests.build/Objects-normal/i386/
  
  体系结构i386的未定义符号:“ _ OBJC_CLASS _ $ _ XCTestCase”,
  引用自:
        PLArticleTests.o中的_OBJC_CLASS _ $ _ PLArticleTests“ _OBJC_EHTYPE _ $ __ XCTestCaseInterruptionException”,引用自:
        PLArticleTests.o“ _OBJC_METACLASS _ $ _ XCTestCase”中的GCC_except_table2,引用自:
        _OBJC_METACLASS _ $ _ PLArticleTests在PLArticleTests.o“ __XCTDescriptionForValue”中,引用自:
        -PLArticleTests.o“ __XCTFailureFormat”中的[PLArticleTests testExample],引用自:
        -PLArticleTests.o“ __XCTFailureHandler”中的[PLArticleTests testExample],引用自:
        -在PLArticleTests.o中的[PLArticleTests testExample] ld:找不到体系结构i386铛的符号:错误:链接器命令失败
  退出代码为1(使用-v查看调用)

最佳答案

尝试将Pods.debug添加到您的项目->信息->配置->调试中,然后将Pods.release添加到“发布”部分。我通过此设置解决了丢失的“ RestKit.h”问题。

关于ios - 在Xcode 6上找不到'RestKit/RestKit.h'文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26376337/

10-14 22:35