Locksmith icon indicating copy to clipboard operation
Locksmith copied to clipboard

Trouble Loading Keychain Data Xcode 10.2 Swift 4

Open MayankAgarwal04 opened this issue 5 years ago • 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

MayankAgarwal04 avatar Mar 29 '19 10:03 MayankAgarwal04

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

romkoth avatar Mar 30 '19 11:03 romkoth

Getting same error as well. Definitely a problem when using this Pod on Xcode 10.2.

LaurentShala avatar Apr 03 '19 16:04 LaurentShala

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.

albertbori avatar Apr 08 '19 21:04 albertbori

I had the same issue before and did the following steps:

  1. Updated CocoaPods to 1.7.0 RC1
  2. Followed again the setup steps for Keychain Sharing:
    1. Choose your target project
    2. Select Capabilities
    3. Enable Keychain Sharing

It solved my case

felipeplets avatar May 15 '19 03:05 felipeplets