• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SecRandom.h on iPhone OS 2.2.1?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: SecRandom.h on iPhone OS 2.2.1?
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Expanding NSScrollView
  • Next by Date: NSData dataWithBytes:Length: all 00
  • Previous by thread: Re: Expanding NSScrollView
  • Next by thread: Re: SecRandom.h on iPhone OS 2.2.1?
  • Index(es):
    • Date
    • Thread