PDA

View Full Version : Crash when using offline geocoding on IOS 8.4 Swift



gtonye
14.07.2015, 06:27
Hi,

I am using the latest SKMaps SDK(downloaded from here http://developer.skobbler.com/support#download) with IOS 8.4 and Swift.

I try to implement an offline geocoding in New York city but when I add the code as shown in the documentation:
SKSearchService.sharedInstance().searchServiceDele gate = self
SKSearchService.sharedInstance().searchResultsNumb er = 500
SKMapsService.sharedInstance().connectivityMode = SKConnectivityMode.Offline;

self.listLevel = SKListLevel.CityList

let multiStepSearchObject = SKMultiStepSearchSettings()
multiStepSearchObject.listLevel = self.listLevel
multiStepSearchObject.offlinePackageCode = "USNYCITY01"
multiStepSearchObject.searchTerm = address
multiStepSearchObject.parentIndex = 0
SKSearchService.sharedInstance().startMultiStepSea rchWithSettings(multiStepSearchObject)

When I run the code in the simulator, it crashes after the search begins.

2195

From the look of it there is an issue with the search areas.
I have downloaded the USNYCITY01 package and I am able to display the map of NY and even display things on it

2196


I also tried the code with listlevel being a countryList I have the same error.

Could you please advise and tell me what I might be doing wrong?

Thanks in advance,
Regards,

Adela_Silvia
14.07.2015, 10:29
Hi gtonye,

The issue was reported to our dev team-we'll get back to you with an answer as soon as possible

gtonye
14.07.2015, 17:04
Hi gtonye,

The issue was reported to our dev team-we'll get back to you with an answer as soon as possible

Hi Adela_Silvia,

Many thanks for your quick reply, let me know if the dev team needs any additional information to investigate the issue.

Regards,
--

gtonye
22.07.2015, 16:23
Hi Adela_Silvia,

Many thanks for your quick reply, let me know if the dev team needs any additional information to investigate the issue.

Regards,
--

Hi,

Any update?

-- Regards

Adela_Silvia
23.07.2015, 08:15
Sorry, but not yet. I'll try to push this request.

Adela_Silvia
23.07.2015, 14:39
Hi Gtonye,

Here is the solution straight from our developers:

"The problem is with the parentIndex.
For searchObjects which don't have parents please set -1 for the parent index. This will be fixed in the next release of the SDK.
Also you can test this feature with the following steps using the demo project:
1. Map JSON & download -> North America -> United states -> New York -> New York city -> Download
2. Address search - Offline -> USNCITY01 -> The list of streets will appear"

gtonye
27.07.2015, 17:49
Hi Gtonye,

Here is the solution straight from our developers:

"The problem is with the parentIndex.
For searchObjects which don't have parents please set -1 for the parent index. This will be fixed in the next release of the SDK.
Also you can test this feature with the following steps using the demo project:
1. Map JSON & download -> North America -> United states -> New York -> New York city -> Download
2. Address search - Offline -> USNCITY01 -> The list of streets will appear"


Hi Adela_Silvia,

Thank you for your reply.
I wanted to set the searchobject parent index to -1 but parentIndex is an UInt64 (for swift) therefore I can not put a negative value for it.
Also In the skobbler documentation example, the parentIndex is set to 0. How can I proceed?

2217
2218

Adela_Silvia
28.07.2015, 14:45
Please try with this value: 18446744073709551615. In case the app is still crashing, I'm afraid you'll have to wait for the next SDK update like this issue to be solved.

gtonye
03.08.2015, 07:03
Please try with this value: 18446744073709551615. In case the app is still crashing, I'm afraid you'll have to wait for the next SDK update like this issue to be solved.

Thank you Adela_Silvia, it is now working without any crash, I have another issue, but I will open another thread for it.
I'll try to add a [solved] tag to this thread.
Thank you again.

Regards,

--
Guy