Closed quetool closed 5 years ago
Seeing this same issue with our models after moving to Xcode 9.3 (Swift 4.1). I've been able to verify that the processing works fine on Xcode 9.2 (Swift 4.0.3).
We have data from the network coming in as follows:
1 : 2 elements
- key : "someCoordinateX"
- value : 94.3
Doing the follow operations results in different values based on the Xcode version the project is compiled with.
var someCoordinateX: Float?
map[kSomeCoordinateXKey].currentValue // this shows 94.3
// Xcode 9.2
someCoordinateX <- map[kSomeCoordinateXKey] // this shows 94.3
// Xcode 9.3
someCoordinateX <- map[kSomeCoordinateXKey] // this shows nil
This is with ObjectMapper v. 5.0.0
Edit: Like above, this is resolved by switching from Float
to Double
.
Edit2: This looks to be rooted in an ObjectMapper
issue. https://github.com/Hearst-DD/ObjectMapper/issues/954
I can confirm this issue as well. It won't map longitude and latitude for one of our models.
fwiw I ran into a similar issue and noticed it doesn't happen for me when running on iOS 11 sim but does on iOS 10 sim (when running in Xcode 9.3)
Looks like there has been an update to fix this in this ObjectMapper release https://github.com/Hearst-DD/ObjectMapper/releases/tag/3.2.0
I would assume we just need an update to this project to point to that release
Hi, I was using a mappable model like this
And this is the response I am parsing into that model
This was working just great until I update to Xcode 9.3 and macOS High Sierra this morning. Now BalanceData.balance is getting 0 instead of 797.76, I have to change var balance = Float() to Double() in model in order to get the correct value.