IPhone iPhone SDK (build 9M2199a, beta 8) Security.h Security-Framework

Hi!
I've downloaded and installed the iPhone SDK (build 9M2199a, beta 8).
Now, i'm trying to write code to use the Keychain in iPhone but "SecItem.h" in "Security.h" (Security-Framework) is missing so the Attributes (kSecClass, ...) can't be found and the code doesn't compile.
Where i can get it ?
Thanks for help.
Message was edited by: iPhoneProj

I had the same issue. The security code seem to only work if you build for Device|Debug. You can't run the code in the simulator.

Similar Messages

  • Troubleshooting iPhone SDK build 9M2199 beta 7 ...

    I successfully installed the iPhone SDK last night but seem to have a few problems: a) the DOC SET for the "Apple iPhone OS 2.0" does not seem to work, retried several times.
    b) when trying to follow the "Getting started" tutorial I noticed that the install did not install a "Cocoa Touch template" in the New Project.
    I did try to re-install the same thing again but still no luck.

    I am glad I am not the only one here! I kept on thinking the installation must have gone wrong somewhere.
    The probable new names I think are:
    Cocoa Touch OpenGL Application -> OpenGL ES Application
    Cocoa Touch Tab Bar -> Tab Bar Application
    Cocoa Touch Utility -> Utility Application
    The unclear ones:
    Cocoa Touch Application -> ?
    Cocoa Touch List -> ?
    ? -> Navigation-Based Application
    ? -> View-Based Application
    ? -> Window-Based Application
    Does anyone know when the tutorials are updated to what the SDK actually looks like?
    Message was edited by: BelAus

  • Can you download the iPhone SDK 3.0 Beta on Leopard 10.5.5?

    Do you have to have 10.5.6 installed to use the iPhone SDK 3.0 beta and iPhone OS 3.0 beta?
    Thanks

    If the software requirements for the SDK say 10.5.6, then that's what you must have.

  • IPhone SDK build version

    Hello everyone. I'm fairly new to Mac programming and the Xcode environment so I hope one of you can answer my silly question: How can I tell which build version of the iPhone SDK I have installed?

    Hey jerberrs,
    Is there a way to tell at compile time what the SDK version is? I have both 2.0 and 2.1 installed and I am looking for a way to conditionally compile based on the version of the SDK.

  • XCode freezes when opening project after installing iPhone SDK 3.2 beta

    I have problem opening up existing XCode projects, and creating new XCode projects.
    If I open an existing XCode project, no window appears and XCode becomes non-responsive.
    If I create a new XCode project, it shows me the window to create new project, but after entering the project name, XCode becomes non-responsive.
    I've played around with the settings and found out that if I go to
    Preferences>Code Sense and untick the Indexing>'Enable for all projects'
    The problem is solved. But with that turn, I no longer have auto-completion.
    I have tried a few methods to solve this but none was working
    1) I thought the problem was due to documentation. In Preferences>Documentation, I see "Mac OS X 10.6 Core Library" and "iPhone OS 3.2 Library" showing "Getting..." all the time. I compared the file sizes of the docsets to my laptop (no problem with XCode) and there's a big difference in file size. So I copied these files from my laptop to the Mac with problem. This does not solve the problem.
    2) Clear cache .
    3) Disable indexing. Quit XCode. Start XCode and enable indexing. Then quit XCode and start project.
    4) Uninstall XCode completely with sudo /Developer/Library/uninstall-devtools --mode=all , and then reinstall iphonesdk_3.0__snow_leopard_final. I verifed that I was able to open projects normally. Then I installed iphonesdk_3.1_with_xcode_3.2_final__snow_leopard_10a432, followed by
    iphonesdk_3.2_beta_with_xcode3.2.2. Problem comes back
    5) I tried to clear the files below but it does not help
    ~/Library/Preferences/com.apple.Xcode.plist
    ~/Library/Caches/com.apple.Xcode
    ~/Library/Caches/xcodebuild
    ~/Library/Application Support/Developer/Shared/Xcode/
    Anyone able to point me to a solution? Thanks

    Hello honcheng & welcome to discussions.
    I'd recommend doing a custom install during the iPhone OS 3.2 beta installation instead, and putting it into a separate location from the release tools...
    I would also suggest participating in the beta forums as well.

  • [iPhone SDK 2.0 beta 7] Why No Provisioning files available to select?

    I have three provision files loaded in Organizer and all have the check flag indicating they have all been loaded and are active in Xcode. But when I go to the Project Build tab per instructions and click on the provisioning section none of the profiles are available to choose, only the default place holder. I have tried the suggestion of closing and restarting xcode and all were created since the first day provision bug was fixed. All three show up in the portal as active. As far as I can tell, the APID in the provision matches what is in the project although I'm not sure that should matter according to what I have been reading.
    Message was edited by: casasims

    I was having the same issues yesterday. Finally, last night, I removed the keys I used to request my certificate, removed my certificate, applied for a new one, installed it, requested a new provisioning profile (com.domain.*) with the new certificate, loaded that. Then the profile appeared in my signing options in the Project Info screen. So I selected the new profile for Code Signing Provisioning Profile, and the two items within that - Any iPhone OS Device and Device - iPhone OS2.0. For the code Signing Identity's Device - iPhone OS2.0 I put iPhoneDeveloper:Firstname Lastname. I set my bundle identifier to com.domain.appname in the Info.plist (in the resources folder of my project). It then worked <whew>.
    So I essentially started over with the whole development certificate/provisioning stuff, and added the Bundle identifier key to my plist file and put the app identifier there (without apple's seed at the beginning)
    Brian

  • IPhone SDK 2.0 Beta 7 - Deploy fails on the install phase: verifying app

    I am trying to deploy a test application to a test iPod Touch device. I do not get a list of provsioning profiles in the build tab of the info dialog of the target. So I right click the build item and select "Show Definitions", in the "Any SDK" node of the Code Sign Provisioning Profile item I entered the name of the correct provisioning profile. I do not get any build errors regarding code signing or provisioning profiles. I also added my Developer Identity certificate to the login Keychain. All seems fine and when I click build and go I see files being copied to the device but as soon as it completes I get an error dialog that states the following.
    "Your mobile device has encountered an unexpected error (0xE80000001) during the install phase: Verifying application".
    I tried adding and deleting the provision profile several times, deleting it from the profile settings of the device and rebooting the device all to no avail. Wondering if anyone has any suggestions or has seen this issue before. My provisioning profile currently has a wildcard com.foo.*. I will try and create a new provisioning profile for the app itself and update only if it fixes the problem.
    Thanks.

    Thanks for the reply. I did try D&D of the provisioning profile onto the XCode icon and it installs the profile and creates an entry in ~/Library/Mobile Devices/Provisioning Profiles as expected. I have also tried several combinations of deleting this folder and removing the profile manually from the device etc. I also tried creating a profile with the AppID (no wildcards). None of these approaches worked and I still do not see the provisioning profile in the of available profiles for my Code Signing identity. I think it may have something to do with my identity. I also set the active target Identifier specifically in the properties tab of the target info dialog.

  • [iPhone SDK 2.0 beta 7]

    What happened to the UITransitionView that use to be in UIKit? If they deprecated it it looks like they would be some reference in the library to that effect. I can't seem to find any reference or mention of this on any official apple developer site but there are many references to it elsewhere. The easiest thing perhaps would be to add the standard left, right, up down transitions to the UIView class in addition to the flip and curl transitions they already have. either that or provide some standard left right transition examples that don't involve tableviews. A plain simple button on one view linked to a left/right transition to another view sort of like the flip control but more flexible that a simple hard coded two view flip flop like they use in the Transition sample.

    Dont really care any more I have moved on.

  • Problem in iPhone SDK Sample: [CrashLanding ]

    iPhone SDK build : build 9M2199a
    Sample: CrashLanding
    Version: 1.7
    OpenGL swap buffer method seems to fails sometimes resulting in a crappy blink display. The display seems split into two images. The screen goes messy, I can view the backbuffer blinking over frontbuffer with no drawing update on it.
    Thanks,
    Julien Meyer
    Jadegame.com

    I developed my application based on the CrashLanding sample. I have inherited the same rendering failure. The swap occurs, but it's presenting stale data for one of the frames. The stale data appears to be the first frame rendered. The failure occurs either immediately, or not at all. Restarting the application usually makes the problem go away.
    Has anyone determined a fix for this?
    Thank you,
    Joel-

  • Do synthesized instance variables work in iPhone SDK?

    I tried using Obj-C properties to synthesize not only the accessor methods, but also the instance variable. I ended up with an error saying something like "...must explicitly name an ivar...".
    I was under the impression the iPhone ran the modern (64-bit) Objective-C runtime. I'm using xCode 3.x and iPhone SDK 2.2. Are synthesized instance variables not supported, or do I need to change some xCode/project configuration settings to activate this support (I'd really like to use it)?
    Does the fact that I'm linking to the Sen Test Kit Framework, or running on a relatively old Intel MacBook Pro cause this problem? If the 2.2 SDK does not support synthesized instance variables, does iPhone SDK 3.0 beta support them?
    Note that I would need the synthesized ivar support to work on the iPhone simulator too (obviously) so that I can do testing. Hopefully the iPhone simulator supports the modern Obj-C 2.0 runtime.
    Thank You,
    Eric

    orangekay wrote:
    A. I don't see that anywhere in the Objective-C 2.0 language specification, so I don't believe this has anything to do with the iPhone SDK.
    B. I don't see any point in adding such a thing to the language as it accomplishes nothing that could not be handled with a standard ivar declaration.
    This sounds like a feature you imagined.
    Yeah, right I imagined it. Get a clue, will you?
    http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/oc Properties.html#//apple_ref/doc/uid/TP30001163-CH17-SW3
    In general the behavior of properties is identical on all runtimes (see Runtime Versions and Platforms in Objective-C 2.0 Runtime Programming Guide). There is one key difference: the modern runtime supports instance variable synthesis whereas the legacy runtime does not.
    For @synthesize to work in the legacy runtime, you must either provide an instance variable with the same name and compatible type of the property or specify another existing instance variable in the @synthesize statement. With the modern runtime, if you do not provide an instance variable, the compiler adds one for you. For example, given the following class declaration and implementation:
    @interface MyClass : NSObject {
    float sameName;
    float otherName;
    @property float sameName;
    @property float differentName;
    @property float noDeclaredIvar;
    @end
    @implementation MyClass
    @synthesize sameName;
    @synthesize differentName=otherName;
    @synthesize noDeclaredIvar;
    @end
    the compiler for the legacy runtime would generate an error at @synthesize noDeclaredIvar; whereas the compiler for the modern runtime would add an instance variable to represent noDeclaredIvar.

  • IPhone SDK 2.0 - xcode fails to build new project

    I downloaded and installed the latest iPhone 2.0 SDK. I did not uninstall any previous tools (xcode/SDK). I assume the 2.0 SDK installation will perform the upgrade in a proper fashion (not requiring one to uninstall the previous SDK/xcode). I start up xcode. I check the version via the about menu. It states that the version of xcode is 'Version 3.1 (Beta)'. The project settings indicate that the Base SDK is Device - iPhone OS 2.0. I checked my system to ensure that my current filesystem has the correct SDK. It has the Macintosh HD->iPhoneOS.pltaform->Developer->SDK's->iPhoneOS2.0.sdk.
    OK, everything seems good up to this point. I create a new xcode application for the iPhone. I then go to compile the application and I get the following error:
    /Developer/iPhone Examples/Foo/Classes/FooAppDelegate.h:16: error: syntax error before 'UIToolbarController'
    Source code line : UIToolbarController *toolbarController;
    Yes I realize that the UIToolbarController API has been removed for SDK 2.0. However, how can one use xcode to build a starter application if it is generating code that references outdated API's???
    Am I doing something wrong? I have searched all the forums but have not come across this issue. Hence, I think something is wrong with my setup/install. If the solution is not to use UIToolbarController API, then why does the xcode still use it to build starter code projects? Also, if we can't use the API, what is it's replacement?
    thanks

    It created more errors, as there are a whole lot of other API's
    that have changed (UIViewController now doesn't resolve
    some of it's members, e.g. toolbarItem).
    Err... hello? Someone just told you what the names have changed to!
    Wow. I have about 1 months worth of work, that I am going to
    have to seriously think about throwing away because of all of
    these growing pains.
    Can't talk about the iPhone SDK specifically, but Xcode in general has great refactoring tools that will make the name changes, in all locations, in a split second for you. No, lets not get hysterical. It's not one month's work at all. It's not even five seconds work.
    I think the newer 2.0 release is causing more problems than solutions.
    That's the whole point. It's not a release. It's a beta. That's what happens with beta's. That's why you sign an NDA (non-disclosure agreement), stating that under no conditions will you discuss the SDK with anyone, and that you agree that things may change without prior notice or even break down completely.
    Basically shutting down all of my development efforts.
    Errrr.... hello again?

  • IPhone SDK (Beta 5) - AudioQueue Problem playing MP3

    Dear community,
    i have a problem using the iPhone SDK (Beta 5). I want to playback a simple MP3-file. So i checked a lot of examples, read documentation and found a least the "AudioQueueTest" example. This is an simple example which is able to play MP3, WAV, ... from the command line. I ported the example to a simple application on the iPhone. Now the problem:
    If i playback a WAV file in the iPhone simulator, everything works fine. If i want to playback an MP3 file, it doesn't work and i don't know why. I stepped through the debugger and found out that the application freezes at the command "AudioQueueNewOutput".
    Do you have the same problem? What i am doing wrong? Is it no possible to create a background thread playing back a local MP3 file?
    Thank you!

    Did you get PCM recording on actual iPhone hardware? With Beta5, my PCM recording works fine in the simulator, but on the hardware, all the buffers I receive contain only 4 bytes of audio data!
    Here's my source code - if anyone can spot anything wrong, I'd be enormously grateful!
    #import "AudioAppDelegate.h"
    #import "AudioViewController.h"
    #import "AudioToolbox/AudioQueue.h"
    #define BUFFER_CT 4
    #define BUFFER_BYTES 8192
    AudioQueueRef audioInQueue;
    static void AudioInCallback(void* aqData,AudioQueueRef aq,AudioQueueBufferRef buffer,const AudioTimeStamp* startTime,UInt32 numPackets,const AudioStreamPacketDescription* desc)
    OSStatus result;
    printf("received %d bytes\n",buffer->mAudioDataByteSize);
    result=AudioQueueEnqueueBuffer(audioInQueue,buffer,0,NULL);
    if(result)
    printf("AudioQueueEnqueueBuffer returned %d\n",result);
    static void StartAudio(void)
    OSStatus result;
    AudioStreamBasicDescription format;
    // 11KHz, 16-bit stereo
    memset(&format,0,sizeof(format));
    format.mSampleRate=11025;
    format.mFormatFlags=kLinearPCMFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;
    format.mFormatID=kAudioFormatLinearPCM;
    format.mBytesPerPacket=BUFFER_BYTES;
    format.mBytesPerFrame=4;
    format.mFramesPerPacket=format.mBytesPerPacket / format.mBytesPerFrame;
    format.mChannelsPerFrame=2;
    format.mBitsPerChannel=16;
    result=AudioQueueNewInput(&format,AudioInCallback,NULL,CFRunLoopGetCurrent(),kC FRunLoopCommonModes,0,&audioInQueue);
    printf("AudioQueueNewInput result was %d\n",result);
    for(int i=0;i<BUFFER_CT;i++)
    AudioQueueBufferRef buffer;
    result=AudioQueueAllocateBuffer(audioInQueue,format.mBytesPerPacket,&buffer);
    printf("AudioQueueAllocateBuffer result was %d\n",result);
    result=AudioQueueEnqueueBuffer(audioInQueue,buffer,0,NULL);
    printf("AudioQueueEnqueueBuffer to in result was %d\n",result);
    Float32 gain=1.0;
    AudioQueueSetParameter(audioInQueue,kAudioQueueParam_Volume,gain);
    result=AudioQueueStart(audioInQueue,NULL);
    printf("AudioQueueStart result was %d\n",result);
    }

  • Build error (iPhone SDK)

    Hi, I just started reading the book Programming in Objective-C 2.0 by Kochan and I'm already stuck at the beginning.
    I can't seem to build anything without getting the same error. Even de "Hello world" templates you start out with don't work. I've tried several frameworks and even reinstalled the iPhone SDK but it didn't work.
    This is the error I get:
    Building target “prog1” of project “prog1” with configuration “Debug”
    Checking Dependencies
    Ld "/Users/dogafincan/Programma's/prog1/build/Debug/prog1" normal i386
    cd "/Users/dogafincan/Programma's/prog1"
    setenv MACOSXDEPLOYMENTTARGET 10.5
    /Developer/usr/bin/gcc-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/dogafincan/Programma's/prog1/build/Debug -F/Users/dogafincan/Programma's/prog1/build/Debug -filelist /Users/dogafincan/Programma's/prog1/build/prog1.build/Debug/prog1.build/Objects -normal/i386/prog1.LinkFileList -mmacosx-version-min=10.5 -framework Foundation -o /Users/dogafincan/Programma's/prog1/build/Debug/prog1
    ld: file not found: /Users/dogafincan/Programmas/prog1/build/prog1.build/Debug/prog1.build/Objects- normal/i386/prog1.o
    collect2: ld returned 1 exit status
    ------------------------------------------

    newroz wrote:
    /Developer/usr/bin/gcc-4.0 -arch i386
    -isysroot /Developer/SDKs/MacOSX10.5.sdk
    -L/Users/dogafincan/Programma's/prog1/build/Debug
    -F/Users/dogafincan/Programma's/prog1/build/Debug
    -filelist /Users/dogafincan/Programma's/prog1/build/prog1.build/Debug/prog1.build/Objects -normal/i386/prog1.LinkFileList
    -mmacosx-version-min=10.5 -framework Foundation
    -o /Users/dogafincan/Programma's/prog1/build/Debug/prog1
    ld: file not found: /Users/dogafincan/Programmas/prog1/build/prog1.build/Debug/prog1.build/Objects- normal/i386/prog1.o
    collect2: ld returned 1 exit status
    For one, you are using one path with apostrophes (/Users/dogafincan/Programma's/) and somewhere else using a path (_ld: file not found: /Users/dogafincan/Programmas/_) that lacks them. Is that intended?
    Try to keep folder names simple/brief, without punctuation to avoid these kinds of issues.
    You might want to practice on a simpler structured basis, such as AS, first so you can make these kinds of mistakes and learn before jumping in the deep end of the pool.

  • IPhone SDK Beta 4 - How to send emails with attachments?

    Hello everyone!
    This is my first post Please be so kind to point me in the right direction.
    Using the official iPhone SDK Beta 4, I am trying to show the compose email screen not only with a subject and body fields, but also with an attached PDF file that I generated. I know that many apps available in the Installer.app can do that, but can the SDK do that as well?
    Generating a mailto URL doesn't seem to be the answer since the RFC 2368 doesn't support attachments as far as I understand. All my attempts to hard-code a mailto URL that could trick the Mail application into composing a message with an attachment have failed...
    Could you give me a hint or maybe copy paste some code to help me with attaching files to emails?
    Thank you so much in advance,
    Eugene

    I tried the following :
    NSError *error;
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"export.csv"];
    if ([records writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:&error] == NO) {
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Export error" message:@"An error occured while writing the file."
    delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
    [alert show];
    [alert release];
    static NSString *email = @"[email protected]";
    NSString *outMailtoPath = [NSString stringWithFormat:@"mailto:%@?subject=Review&body=%@&attachment=%@", email, @"test", path, nil];
    NSURL *url = [NSURL URLWithString: [(NSString *)CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)outMailtoPath,NULL,NULL,kCFStringEncodingUTF8) autorelease]];
    [[UIApplication sharedApplication] openURL:url]

  • Problems building w/ Snow Leopard and iPhone SDK 3.0 Snow Leopard

    Suddenly having problems building and codesigning after upgrading to Snow Leopard and iPhone SDK 3.0 Snow Leopard.
    Profile set to Distribution, Device 2.2.1 Distribution, as has worked in the past.
    The build fails with this error:
    Command <com.apple.tools.product-pkg-utility> failed with exit code -1
    The below section is highlighted in Build Results.
    ProcessingProductPackaging /Users/harvey/Documents/iPhoneApp_Work/Listening-Hiragana/iPhone_Comprehension_timerharvey/entitlements.plist "/Users/harvey/Documents/iPhoneApp_Work/Listening-Hiragana/iPhone_Comprehension_timer_harvey/build/iPhoneComprehension.build/Distribution-iphoneos/Kana Listening.build/iPhone_Comprehension.xcent"
    cd /Users/harvey/Documents/iPhoneApp_Work/Listening-Hiragana/iPhone_Comprehension_timerharvey
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/u sr/bin:/bin:/usr/sbin:/sbin"
    <com.apple.tools.product-pkg-utility> /Users/harvey/Documents/iPhoneApp_Work/Listening-Hiragana/iPhone_Comprehension_timerharvey/entitlements.plist -entitlements -format xml -o "/Users/harvey/Documents/iPhoneApp_Work/Listening-Hiragana/iPhone_Comprehension_timer_harvey/build/iPhoneComprehension.build/Distribution-iphoneos/Kana Listening.build/iPhone_Comprehension.xcent"
    Any ideas? This is really strange.
    The same error occurs when trying to build for Device - 3.0, and any other version it seems.
    This is especially frustrating as I'm simply trying to update an app that I released before I upgraded.
    I will love whoever helps me forever and ever.
    saikyo

    Found the new SDK on the CD. Now I am running XCode 3.2.
    I'm talking to myself now for the benefit of future readers.
    On the Dev Center I see the note:
    "Important: You will need to re-install the iPhone SDK for Snow Leopard if you plan on developing iPhone applications after upgrading your Mac to Snow Leopard and installing Xcode 3.2."
    So I'm going to download and install the iPhone SDK 3.0 (Snow Leopard) from the SDK downloads area on the Dev Center page. This seems weird to me as it's 3.0... but I'm running 3.2 now... I guess this will just update my 3.2?
    I also notice that when I run XCode 3.2 I don't have Simulator as an option anymore in my profiles.
    Going to go ahead with the update now and see how it goes.

Maybe you are looking for