Ios 叮当声:错误:不支持的选项'--ObjC';

Ios 叮当声:错误:不支持的选项'--ObjC';,ios,xcode,Ios,Xcode,由于某种原因,当我在Xcode项目中向我的其他链接器标志添加“-ObjC”时,我得到了一个链接器错误。如果删除此标志,则无法加载其中一个表视图,并出现以下错误: *** Assertion failure in -[AMTableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:7344 *** Terminating app due to unc

由于某种原因,当我在Xcode项目中向我的其他链接器标志添加“-ObjC”时,我得到了一个链接器错误。如果删除此标志,则无法加载其中一个表视图,并出现以下错误:

*** Assertion failure in -[AMTableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:7344
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
我认为这是由于缺乏ObjC造成的,对吗

因此,当我重新添加该标志时(它实际上是用-$(继承的),因为cocoapods告诉我要将其引入),我得到一个链接器错误:

Ld /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator/myapp.app/myapp normal x86_64
    cd /Users/jimmy/Desktop/AptTin
    export IPHONEOS_DEPLOYMENT_TARGET=8.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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator -F/Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator -F/Users/jimmy/Desktop/AptTin -filelist /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Intermediates/AptTin.build/Debug-iphonesimulator/AptTin.build/Objects-normal/x86_64/myapp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 --ObjC -lPods-AFNetworking -lPods-AMSlideOutController -lPods-DACircularProgress -lPods-HexColors -lPods-LBBlurredImage -lPods-MBProgressHUD -lPods-MWPhotoBrowser -lPods-PSTCollectionView -lPods-SDWebImage -lPods-TSMessages -framework Accelerate -framework AssetsLibrary -framework CoreGraphics -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=8.1 -framework MobileCoreServices -framework Security -framework CoreLocation -framework SystemConfiguration -framework AssetsLibrary -framework MessageUI -framework ImageIO -framework CoreData -framework MapKit -framework QuartzCore -framework Crashlytics -framework CoreGraphics -framework FacebookSDK -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Intermediates/AptTin.build/Debug-iphonesimulator/AptTin.build/Objects-normal/x86_64/myapp_dependency_info.dat -o /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator/myapp.app/myapp

clang: error: unsupported option '--ObjC'

我错过了什么?使用--ObjC标志会发生什么

问题在于链接器标志的拼写不正确。我刚签入我的项目,它应该是带一个破折号的'-ObjC',但不是两个。
以下是有关标志的附加信息:

以下是苹果公司的描述:

将-ObjC选项传递给链接器会导致它加载所有成员 实现任何Objective-C类或类别的静态库。 这将拾取任何类别方法实现。但它可以使 生成的可执行文件较大,可能会拾取不必要的对象。 由于这个原因,默认情况下它不启用


您是用cocoapods启动项目还是将cocoapods集成到现有项目中?我通过在我的目录中创建一个pod文件并进行pod安装,在中添加了cocoapods