SecRandom.h on iPhone OS 2.2.1?
SecRandom.h on iPhone OS 2.2.1?
- Subject: SecRandom.h on iPhone OS 2.2.1?
- From: Randall Meadows <email@hidden>
- Date: Tue, 21 Jul 2009 14:28:15 -0600
I started working on a new project, and started out using the 3.0 SDK;
I'm now far enough along to realize that I don't really need to
eliminate older versions, so I switched the Base SDK to 2.2.1.
I do, however, use the Security framework, specifically
SecRandomCopyBytes() to generate random numbers. For 3.0, this simply
required adding Security.framework to my project and #importing
<Security/Security.h>.
However, when I switch to 2.2.1 and build the project,
SecRandomCopyBytes and kSecRandomDefault are undeclared, even though
they are documented as being "Available in iPhone OS 2.0 and later."
When I look at the Security.framework in my project, SecRandom.h
(which is where those two things are documented as being declared in)
is not included in the list of files.
I found it in the file system, at /Developer/Platforms/
iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/
Frameworks/Security.framework, but when I try to add *this* framework
to the project, Xcode *actually* adds /Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk/
System/Library/Frameworks/Security.framework instead. This latter
location is where all the other frameworks (Foundation.framework,
CoreGraphics.framework, et al.) in the project live, but that
Security.framework does not contain SecRandom.h.
Is this a situation where it works only on the device, not the
simulator? That would suck rocks.
Any suggestions are greatly appreciated...
randy
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden