내가RubyMotion : SecKeychainFindGenericPassword 및 유형에 대한 포인터 설명을 찾을 수 없습니다 '^'
내가이 시도 OS X에 rubyMotion, 와 키 체인에서 암호를 검색하기 위해 노력하고있어 :
# passsword_data_pointer=Pointer.new(:object) #works but empty password
# password_data_pointer=Pointer.new('^') #makes ruby crash and complain 'Can't find pointer description for type '^'
password_data=NSMutableData.new #works but empty password
password_length = Pointer.new('I')
result=SecKeychainFindGenericPassword (
nil,
"some_service_string".length,
"some_service_string",
"some_username_string".length,
"some_username_string",
password_length,
password_data_pointer,#or password_data.bytes
nil
)
# password_string=NSMutableData.dataWithBytes(password_data.bytes, length:password_length[0])
password_string=NSMutableData.dataWithBytes(password_data_pointer, length:password_length[0])
p password_string
을 내가하는 일과 상관없이 비밀번호를 가져올 방법이 없습니다.
도와주세요. 나이를 검색하면 인터넷은 macruby 또는 cocoa 또는 c 예제로 가득 차 있지만이 주제에 대한 루비 모션에는 아무 것도 없습니다.
shiming in에 감사드립니다. OS X을 타겟팅하는 것이 더 명확해야합니다! – MichaelC
아, 잡았다. SSKeychain을 사용하면 좋습니다. Mac OSX 또는 iOS와 호환됩니다. – Devon