동일한 식별자 (동일한 프로필)를 가진 다른 응용 프로그램에서 응용 프로그램으로 설정된 키 체인 데이터에 액세스하려고합니다. 이를 달성하기 위해 this link을 사용했습니다.키 체인 데이터를 공유하는 두 응용 프로그램은 iOS 시뮬레이터에서 정상적으로 작동하지만 장치에서는 작동하지 않습니다.
나는 자격 증명을 다시 가져 오기 위해 노력하고 때 키 체인 데이터의 저장이 제대로 일어나고, 나는 지금까지
OSStatus status = SecItemAdd((CFDictionaryRef)dictionary, NULL);
(모두 시뮬레이터 및 장치) 아래 한 Statment 위해 이렇게 좋은 errSecSuccess를 얻을 수 있지만, 내 애플 리케이션은 다른 애플 리케이션 B에 저장된 그것은 시뮬레이터와 장치에서 다르게 작동합니다.
iOS 시뮬레이터 6.1에서는 다음 문장의 상태가 '0'으로 표시됩니다.
OSStatus status = SecItemCopyMatching((CFDictionaryRef)searchDictionary, &foundDict);
모든 iOS 장비에서 '-25300'으로 상태가 표시됩니다. 왜 장치와 시뮬레이터 다른
//errSecSuccess = 0, /* No error. */
//errSecUnimplemented = -4, /* Function or operation not implemented. */
//errSecParam = -50, /* One or more parameters passed to a function where not valid. */
//errSecAllocate = -108, /* Failed to allocate memory. */
//errSecNotAvailable = -25291, /* No keychain is available. You may need to restart your computer. */
//errSecDuplicateItem = -25299, /* The specified item already exists in the keychain. */
//errSecItemNotFound = -25300, /* The specified item could not be found in the keychain. */
//errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */
//errSecDecode = -26275, /* Unable to decode the provided data. */
//errSecAuthFailed = -25293, /* The user name or passphrase you entered is not correct. */
을 나는 항목이 발견되지 않는 그것을 얻을 수 있지만 :
나는 이러한 보안 프레임 워크에있는 오류 코드 알고있다.