2013-06-21 3 views
0

У меня есть пустая статическая библиотека для iOS (пустая, означает - у меня есть только один интерфейс, определенный без каких-либо методов), когда я пытаюсь его построить, я получаю кучу ошибок, таких как:Ошибки при попытке создания статической библиотеки для 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

SecIdentityRef и SecTrustRef определены в Security.framework. Убедитесь, что вы импортируете соответствующий файл заголовка:

#import <Security/Security.h> 

и добавьте Security.framework к вашему проекту.

Смежные вопросы