Sunday 15 June 2014

objective c - Errors when trying to build static library for iOS -


I have an empty static library for iOS (which is empty - which means - I just define an interface without any methods was) when I tried it to make I get a bunch of errors:

  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/ file included /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:74: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6 the SDKs / iPhoneSimulator6.1.sdk .1.sdk / System / Library / Framework / Foundat ion.framework / header / NSURLCredential.h: 120: 25: error: expected a kind - (id) initWithIdentity: (SecIdentityRef) Identity Certificate: (NSArray *) certArray Persistence: (NSURLCredentialPersistence) stubbornly 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: (SecIdentityRef) identity certificate: (NSArray *) certArray persistence: a + (NSURLCredential *) expected credentialWithIdentity (NSURLCredentialPersistence) stubbornly 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: Expect one type - (SecIdentityRef) identification; ^ /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 one 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: Expect one type + (NSURLCredential *) credentialForTrust: (SecTrustRef) trust NS_AVAILABLE (10_6, 3_0); ^ File includes /Users/p-kir/Work/SourceRepos/iDev_GIT/Tests/AllTests/AllTests/AllTests-Prefix.pch:6 the file contains /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator in .platform / developer / SDKs / IPhoneSimulator6klksdk / system / Library / Frameworks / Foundationkframework / header / 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 kind - (SecTrustRef) serverTrust NS_AVAILABLE (10_6, 3_0); Do anyone know what this can be? Thank you.   

SecIdentityRef and SecTrustRef defined Security In Framework , make sure you are importing the appropriate header file:

  #import & lt; Security / security. H & gt;   

And add security.framework to your project.

No comments:

Post a Comment