SecAddSharedWebCredential working in Simulator but Not working in iPhone Device

I tried to store ID and password into iCloud Keychain, I have already done with all functionality and coding parts, I can easily store them when I test into Simulator but am unable to work with a real device. I have also gone through all the useful articles, but still facing the same issue.

SecAddSharedWebCredential("domainName" as CFString, self.strEmailId as CFString, self.strPassword as CFString) { error in if error != nil { print(error?.localizedDescription) return }

I have implemented the above code for storing ID and password, It works in Simulator but does not work on a real device. I faced the below error.

("The operation couldn’t be completed. (OSStatus error -25293 - "doaminName" failed to approve "TeamID.BundleIdentifier")")

Can you please help me out?

SecAddSharedWebCredential working in Simulator but Not working in iPhone Device
 
 
Q