7

使用CocoaPods时开启inhibit_warnings参数的小问题

 2 years ago
source link: https://ooso.net/archives/702
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

使用CocoaPods时开启inhibit_warnings参数的小问题 – 某人的栖息地

Skip to the content

inhibit_warnings参数能够有效的抑制CocoaPods引入的第三方代码库产生的warning,但是有时候会产生意想不到的错误,例如我今天引入ReactiveCocoa的时候就产生了下面的错误:

CompileDTraceScript ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d
    cd /Users/Tony/Code/TestApp/Pods
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/Tony/.rvm/gems/ruby-1.9.3-p194/bin:/Users/Tony/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/Tony/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/Tony/.rvm/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/heroku/bin:/usr/local/git/bin:/usr/local/share/npm/bin:/Applications/MAMP/Library/bin:/Users/Tony/Applications/play:/Users/Tony/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/local/git/bin:/usr/local/sbin:/Users/Tony/.rvm/bin:/Users/Tony/.ec2/bin"
    /usr/sbin/dtrace -h -DOS_OBJECT_USE_OBJC=0 -fobjc-arc -DOS_OBJECT_USE_OBJC=0 -w -Xanalyzer -analyzer-disable-checker -s ReactiveCocoa/ReactiveCocoaFramework/ReactiveCocoa/RACSignalProvider.d -o /Users/Tony/Library/Developer/Xcode/DerivedData/TestApp-bfkcwbnhjkdedddkxicxplyvlnxq/Build/Intermediates/Pods.build/Debug-iphonesimulator/Pods-ReactiveCocoa.build/DerivedSources/RACSignalProvider.h

......

Command /usr/sbin/dtrace failed with exit code 2

而我的pod文件中引入方式如下:


pod 'ReactiveCocoa', '~> 2.1', :inhibit_warnings => true

在这里,关闭了inhibit_warnings之后,就可以正常编译了。同理,inhibit_all_warnings也会产生类似的问题。

所以,要开启这个参数,需要谨慎,不要因为一些小小洁癖耽误自己大量的时间。

Leave a Reply Cancel reply

Your email address will not be published.

Comment

Name

Email

Website


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK