2013-06-21 54 views
0

我有空的iOS静态库(空,意味着 - 我只有一个接口没有任何方法定义),当我尝试构建它时,我得到一堆错误,如:当我尝试构建它的静态库时出现错误

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:74: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:120:25: error: expected a type 
- (id)initWithIdentity:(SecIdentityRef)identity certificates:(NSArray *)certArray persistence:(NSURLCredentialPersistence) persistence NS_AVAILABLE(10_6, 3_0); 
         ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:130:46: error: expected a type 
+ (NSURLCredential *)credentialWithIdentity:(SecIdentityRef)identity certificates:(NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence NS_AVAILABLE(10_6, 3_0); 
              ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:137:4: error: expected a type 
- (SecIdentityRef)identity; 
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:155:22: error: expected a type 
- (id)initWithTrust:(SecTrustRef)trust NS_AVAILABLE(10_6, 3_0); 
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:162:42: error: expected a type 
+ (NSURLCredential *)credentialForTrust:(SecTrustRef)trust NS_AVAILABLE(10_6, 3_0); 
             ^
In file included from /Users/p-kir/Work/SourceRepos/iDev_GIT/Tests/AllTests/AllTests/AllTests-Prefix.pch:6: 
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:77: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtectionSpace.h:237:4: error: expected a type 
- (SecTrustRef)serverTrust NS_AVAILABLE(10_6, 3_0); 

有谁知道什么可能会造成这个? 谢谢。

回答

0

SecIdentityRefSecTrustRef定义在Security.framework。请确保您正在导入正确的头文件:

#import <Security/Security.h> 

,并添加Security.framework到您的项目。

相关问题