iOS port could be updated to GraphHopper version 1.0

Just fyi: there is some work going on in the currently outdated repo of the GraphHopper iOS port:

Is there any progress on this? Still cannot compile any of the ios projects on GitHub.

Did you try the pull request? If yes, can you be more specific what you did step-by-step and what problems you got (error message etc)

I followed the instructions at
git clone --recursive
cd graphhopper-ios
make class.list
make translate

running “make translate” produced the following error:

make: *** No rule to make target dependencies/hppc/com/carrotsearch/hppc/', needed by src/.translate_mark’. Stop.

I’m trying to compile graphhopper 1.0 for iOS (0.8.2 has some issues that will be hopefully fixed by this).
I used oflebbe’s graphhopper-ios as starting point but got the same error message concerning com/carrotsearch/hppc/

And there are a few things that confuse me:

  1. It seems like participates only in web target. Maybe it’s safe to remove it?
  2. GitHub - carrotsearch/hppc: High Performance Primitive Collections for Java doesn’t seem to have such class at all (I have checked releases down to 0.7.3), although here it was fetched from release 0.8.1
    Same goes for AbstractCharCollection, AbstractDoubleCollection e.t.c.
    Only was and remains part of com.carrotsearch/hppc since 0.7.0 at least.

I’m complete novice in java world so maybe I miss something there.
If @karussell could kindly provide some input on this matter this will help a lot.

I’ve managed to run iOS example app using ios_compatibility branch. I will create necessary instructions and PR’s after I do some more tests.
There are still two issues that need to be addressed:

  1. After translation from java to Obj-C one line seems to be broken.
    /graphhopper-ios/src/com/graphhopper/util/TranslationMap.m line 96 states:
    [trMap doImportWithJavaIoInputStream:[TranslationMap_class_() getResourceAsStream:JreStrcat("$$", locale, @".txt")]];
    and this produces error on localisations loading because [TranslationMap_class_() getResourceAsStream:JreStrcat("$$", locale, @".txt")] returns nil.
    The problem is that to get proper stream file name should start with “/”. So when I change line 96 to: [trMap doImportWithJavaIoInputStream:[TranslationMap_class_() getResourceAsStream:JreStrcat("$$$", @"/", locale, @".txt")]]; it works as expected.
    But this is not ideal as translated classes are not part of the repo and could be re-generated any time. I suppose this is either an error in original java code or some glitch from j2objc. I would be happy to hear any input about this. In worst case I will add this fix to instruction.

  2. Branch ios_compatibility doesn’t correlate to final 1.0 state. It seems to be branched around Because of this when I used pure 1.0 graphhopper to generate routing files they were not fully compatible. So will try to merge graphopper 1.0 to ios_compatibility branch but with my limited knowledge of java this could easily fail. It would be awesome if @karussell would be so kind to do this.

Any news here? I can’t compile the branches. I need a GraphHopper build which is working for Xcode 12, maybe Xcode 13.

Powered by Discourse