Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salesforce.identity fails when iOS time setting is a specific condition. #70

Closed
hmuronaka opened this issue May 7, 2018 · 13 comments
Closed
Assignees

Comments

@hmuronaka
Copy link
Contributor

hmuronaka commented May 7, 2018

Salesforce.identity() fails when iOS Setting Time 24-Hour Time is off ( iOS displays am/pm time when the mode is off) .

This error doesn't occur iOS simulators and when iOS language is English.
iOS language was Japanese when the error occcured.

The URL below is a related document.
https://developer.apple.com/library/content/qa/qa1480/_index.html

struct Identity {
  public init(from decoder: Decoder) throws {
    ....
    // failed.
    self.lastModifiedDate = try container.decode(Date.self, forKey: .lastModifiedDate) 
  } 
}
@mike4aday mike4aday self-assigned this May 7, 2018
@mike4aday
Copy link
Owner

@hmuronaka interesting... Can you post the error message?

hmuronaka added a commit to hmuronaka/SwiftlySalesforce that referenced this issue May 8, 2018
@hmuronaka
Copy link
Contributor Author

Thank you for your reply.

This is the error message.

dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: 
"last_modified_date", intValue: nil)], debugDescription: "Date string does not match format 
expected by formatter.", underlyingError: nil))

And I sent fix code, please refer for updating.
#71

@abhisheksahay
Copy link

Hi ,
I am facing the same error message .

dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "last_modified_date", intValue: nil)], debugDescription: "Date string does not match format expected by formatter.", underlyingError: nil))

@mike4aday
Copy link
Owner

@abhisheksahay are you using the latest version of Swiftly Salesforce? Which language (Japanese, etc.)?

@abhisheksahay
Copy link

@abhisheksahay are you using the latest version of Swiftly Salesforce? Which language (Japanese, etc.)?

I am using latest version and language is english .

@mike4aday
Copy link
Owner

@abhisheksahay so far, I can't reproduce this. Could you post here the JSON response as returned by Salesforce? Thanks

@hmuronaka
Copy link
Contributor Author

Hi,
I had same problem when I log into winter19's salesforce.
It seems that date format of lastModifiedDate of Identity is changed for winter19.

@mike4aday
Copy link
Owner

Thanks @hmuronaka I'll check that ASAP.

@mike4aday
Copy link
Owner

@hmuronaka indeed... seems the date format changed in Winter '19. Thanks for letting me know. I'll update the Swiftly Salesforce code ASAP.

@abhisheksahay FYI

@abhisheksahay
Copy link

abhisheksahay commented Oct 3, 2018

Thanks @mike4aday . This issue I am facing on winter19's salesforce.

@abhisheksahay
Copy link

Hi @mike4aday ,

Please let me know When can you fix this issue?

@mike4aday
Copy link
Owner

@abhisheksahay it should be fixed with the latest release (currently 7.1.2). Let me know if you are still seeing the problem after upgrading.

@abhisheksahay
Copy link

@mike4aday Thanks, Its fixed .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants