When using custom functions, the following object is returned:
var location: BLPoint?
{
"___jsonclass": "com.tipple.api.MyObject",
"created": "1591783565000",
"ownerId": "37DAA9D6-E7CB-6FB4-FF61-E37EC6BB3100",
"___class": "com.tipple.api.MyObject",
"location": "POINT(0.0033771 51.5042593)",
"objectId": "F3DB37D8-38A1-DC1D-FF2A-9AD447DC6900",
}
When accessing latitude and longitude of a BLPoint the app crashes with the following:
Thread 1: EXC_BAD_ACCESS (code=2, address=0x6000027a8320)
Hello @Adrian_Ispas
I just created an internal ticket BKNDLSS-23888 to investigate the issue.
Could you please add any additional information to describe how we can reproduce the problem.
Regards, Vlad
We have acustom function in java that returns and objects that has a location (BLPoint)
The function is written in java.
"location": "POINT(0.0033771 51.5042593)"
The property is recognized and mapped as BLPoint on swift. but when accessing its latitude and logitude properties it crashes.
Hello @Adrian_Ispas,
A new version of Swift-SDK v6.2.1.1 with fixes is released. Could you please check?
Regards,
Olha
@olhadanylova
I’m not seing v6.2.1.1 on Swift Packages.
Latests is v6.2.1 and that version fails to compile with this error.
Cocoapods.org shows 6.2.1.1 as the latest:
The Pods yes, it was updated
The Swift Package version dosn’t seem to be.
@olhadanylova I’ve changed to using Pods. but the issue is still there.
When accessing latitude/longitude the app crashes.
Hello,
we are looking into this issue, ticket BKNDLSS-23888.
Regards,
Olha
Hello @Adrian_Ispas,
A new version of Swift-SDK v6.2.4 is released. Could you check please?
Regards,
Olha
The issue seems to be fixed.
@olhadanylova thank you for the quick response
@olhadanylova
It seems that the date bug is back on this build.
Values saved as Date in backendless are returned as String and failes to convert to Date
▿ 9 elements
▿ 0 : 2 elements
- key : "startTime"
- value : "1610635630000"
▿ 1 : 2 elements
- key : "updated"
- value : "1610636315000"
▿ 2 : 2 elements
- key : "ownerId"
- value : "15E5C6A3-B854-4265-BC61-4F4EBBDAF147"
▿ 3 : 2 elements
- key : "___jsonclass"
- value : "com.tipple.api.MyObject"
▿ 4 : 2 elements
- key : "___dates___"
▿ value : 3 elements
- 0 : "1610635630000"
- 1 : "1610636315000"
- 2 : "1610647330000"
▿ 5 : 2 elements
- key : "created"
- value : "1610635630000"
▿ 6 : 2 elements
- key : "endTime"
- value : "1610647330000"
▿ 7 : 2 elements
- key : "objectId"
- value : "88EA63B9-78D2-480E-A102-47E11F6A038F"
▿ 8 : 2 elements
- key : "___class"
- value : "com.tipple.api.MyObject"
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x603000341f80'
Looks like a regression,
I’ve reopened the BKNDLSS-21294 for it. Will try to fix as soon as possible.
Regards,
Olha
We’ve checked this issue with both Java Custom Service and Codeless Custom Service and it works correctly.
Please make sure you have the latest version of Swift-SDK v6.2.4.
Regards,
Olha
1 Like
Hey Olha,
So we have been doing some further digging on our issue, you are correct it does parse the dates when its pulling back an object, but it doesn’t parse the dates if its a child object.
Scenario:
Custom Java API service is returning a parent with a 1:1 or 1:N relation, if there is a DATETIME on the child object the parse fails with the nstimeinterval failure.
This only happens on a custom service, when using Backendless find it works fine.
Hi!
Thanks for these details. I’ll check it today.
Regards,
Olha
Issue is fixed for relations. Please try with v6.2.7.
Regards,
Olha
Thanks Olha, we’ll check and come back to you. Appreciate the super speed fixing.
@olhadanylova
The issue is fixed.
Appreciate the speedy fixing.
1 Like
Thanks for your response!