Trouble Loading Keychain Data Xcode 10.2 Swift 4
MayankAgarwal04 opened this issue · 4 comments
Hi Team,
I am having a trouble loading the keychain data. App crash when loadDataForUserAccount is called. Mac OS 10.14.4 and Xcode 10.2 Swift 4
I updated my Mac os to 10.14.4 and updated my Xcode to 10.2 & project swift version 4 to convert 5. After that when first time Xcode Run project login successfully after second time Xcode project Run app crash I tried to error "expression produced error: error: /var/folders/s1/: error: no type named 'ReadRequest' in module
Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<project.ReadRequest>(bitPattern: 0x13e1e2890)!.pointee)".
Let me know if I'm doing anything wrong from my side. Is there any particular reason for that?
Error Function :-
public static func loadDataForUserAccount(userAccount: String, inService service: String = LocksmithDefaultService) -> [String: Any]? {
struct ReadRequest: GenericPasswordSecureStorable, ReadableSecureStorable {
let service: String
let account: String
}
let request = ReadRequest(service: service, account: userAccount)
**return request.readFromSecureStore()?.data**
}
Error Message :-
expression produced error: error: /var/folders/s1/: error: no type named 'ReadRequest' in module ''
Swift._DebuggerSupport.stringForPrintObject(Swift.UnsafePointer<projectName.ReadRequest>(bitPattern: 0x13e1e2890)!.pointee)
@matthewpalmer @victor @jonallured @hermanolsson @jakemarsh @diejmon @marcelofabri @edwellbrook @larslockefeer
Hi all, I have the same issue, Xcode 10.2 and iOS simulator 12.2
Tried to erase all content and settings, haven;t helped
Getting same error as well. Definitely a problem when using this Pod on Xcode 10.2.
Still an issue. At the line specified by the OP, my crash report says:
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x9a0f3b28
Edit: I removed the Locksmith cocoapod completely. Then, I copied the Source files from Locksmith into my main project, and the error went away. So this error likely has something to do with cocoapods or project configuration.
I had the same issue before and did the following steps:
- Updated CocoaPods to 1.7.0 RC1
- Followed again the setup steps for Keychain Sharing:
- Choose your target project
- Select Capabilities
- Enable Keychain Sharing
It solved my case