Hello guys!!
I starting to program on the iPhone (and I'm new at programming on macs too...).
I'm encountering some problems retrieving a password from the keychain..
I managed to store it (at least it's what I can guess, until I have a confirmation.. ) using:
OSStatus ss= SecKeychainAddGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", [firstCheck length], firstCheck, NULL);
where firstCheck is a NSString..
now I trying to read that same password with:
OSStatus ss= SecKeychainFindGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", &l, pwdData, itemRef);
where:
UInt32 l;
void **pwdData; (this doesn't feel right...is it right?)
SecKeychainItemRef *itemRef;
The code compiles without warnings or else..but when I run the app and get there...in the console I get this message:
"Loading program into debugger
GNU gdb 6.3.50-20050815 (Apple version gdb-960) (Sun May 18 18:38:33 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/fra/Library/Application Support/iPhone Simulator/User/Applications/BD7CD692-303E-4342-AB3D-4323236D3766/Login.app/Login', process 3584."
but if I write:
OSStatus ss= SecKeychainFindGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", NULL, NULL, NULL);
I don't get any problem...
does anyone now where I'm doing wrong?
feel free to insult me, after all I'm a newbie
I starting to program on the iPhone (and I'm new at programming on macs too...).
I'm encountering some problems retrieving a password from the keychain..
I managed to store it (at least it's what I can guess, until I have a confirmation.. ) using:
OSStatus ss= SecKeychainAddGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", [firstCheck length], firstCheck, NULL);
where firstCheck is a NSString..
now I trying to read that same password with:
OSStatus ss= SecKeychainFindGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", &l, pwdData, itemRef);
where:
UInt32 l;
void **pwdData; (this doesn't feel right...is it right?)
SecKeychainItemRef *itemRef;
The code compiles without warnings or else..but when I run the app and get there...in the console I get this message:
"Loading program into debugger
GNU gdb 6.3.50-20050815 (Apple version gdb-960) (Sun May 18 18:38:33 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/fra/Library/Application Support/iPhone Simulator/User/Applications/BD7CD692-303E-4342-AB3D-4323236D3766/Login.app/Login', process 3584."
but if I write:
OSStatus ss= SecKeychainFindGenericPassword(NULL, 13, "TokenPassword", 10, "MyUserAcct", NULL, NULL, NULL);
I don't get any problem...
does anyone now where I'm doing wrong?
feel free to insult me, after all I'm a newbie