this works in MacRuby (having required 'Security' framework)
error=SecKeychainAddGenericPassword(
nil,
"someservice".length,
"someservice",
"someusername".length,
"someusername",
"somepassword".length,
"somepassword".pointer,
nil)
In RubyMotion, there is no ".pointer" method, so I thought one would have to do :
lpointer=Pointer.new(:string)
lpointer.assign("somepassword")
But in RubyMotion this does not really store the password on the keychain. The Key is created fine, but there is no password in it.
error=SecKeychainAddGenericPassword(
nil,
"someservice".length,
"someservice",
"someusername".length,
"someusername",
"somepassword".length,
lpointer,
nil)
What am I missing ?